UNPKG

@tomei/product

Version:

NestJS package for product module

38 lines (35 loc) 888 B
'use strict'; module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.createTable('product_CustomizeOption', { CustomizeOptionId: { allowNull: false, primaryKey: true, type: Sequelize.STRING, }, ProductId:{ type: Sequelize.STRING, references: { model: 'product_Product', key: 'ProductId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, Option: { type: Sequelize.STRING(100), }, CreatedAt: { defaultValue: new Date(), type: Sequelize.DATE, }, UpdatedAt: { defaultValue: new Date(), type: Sequelize.DATE, }, }); }, down: async (queryInterface) => { return queryInterface.dropTable('product_CustomizeOption'); }, };