UNPKG

@tomei/product

Version:

NestJS package for product module

57 lines (54 loc) 1.36 kB
'use strict'; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.createTable('product_PlatformCategoryMapping', { MappingId: { allowNull: false, primaryKey: true, type: Sequelize.STRING, }, Code: { allowNull: false, type: Sequelize.STRING(10), references: { model: 'product_Category', key: 'Code', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, Platform: { type: Sequelize.STRING(30), }, PlatformCategoryName: { type: Sequelize.STRING(200), }, PlatformCategoryId: { type: Sequelize.STRING, }, Status: { type: Sequelize.ENUM(['Active', 'Deleted']), defaultValue: 'Active', }, CreatedById: { type: Sequelize.STRING, }, CreatedAt: { allowNull: false, defaultValue: new Date(), type: Sequelize.DATE, }, UpdatedById: { type: Sequelize.STRING, }, UpdatedAt: { allowNull: false, defaultValue: new Date(), type: Sequelize.DATE, }, }); }, down: async (queryInterface) => { return queryInterface.dropTable('product_PlatformCategoryMapping'); }, };