UNPKG

@tomei/product

Version:

NestJS package for product module

53 lines (50 loc) 1.24 kB
'use strict'; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.createTable('store_Product', { ProductId: { allowNull: false, primaryKey: true, type: Sequelize.STRING, references: { model: 'product_Product', key: 'ProductId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, StoreId: { allowNull: false, primaryKey: true, type: Sequelize.STRING, references: { model: 'store_Store', key: 'StoreId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, Status: { type: Sequelize.ENUM(['Active', 'Removed']), defaultValue: 'Active', }, AddedById: { type: Sequelize.STRING, }, AddedAt: { type: Sequelize.DATE, defaultValue: new Date(), }, RemovedById: { type: Sequelize.STRING, }, RemovedAt: { type: Sequelize.DATE, defaultValue: new Date(), }, }); }, down: async (queryInterface) => { await queryInterface.dropTable('store_Product'); }, };