UNPKG

@tomei/rental

Version:
53 lines (50 loc) 1.49 kB
'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.createTable('rental_JointHirer', { HirerId: { type: Sequelize.STRING(30), allowNull: false, primaryKey: true, }, RentalId: { type: Sequelize.STRING(30), allowNull: false, references: { model: 'rental_Rental', key: 'RentalId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, CustomerId: { type: Sequelize.STRING(30), allowNull: false, }, CustomerType: { type: Sequelize.STRING(30), allowNull: false, }, CreatedById: { type: Sequelize.STRING(30), allowNull: false, }, CreatedAt: { type: Sequelize.DATE, allowNull: false, }, UpdatedById: { type: Sequelize.STRING(30), allowNull: false, }, UpdatedAt: { type: Sequelize.DATE, allowNull: false, }, }); }, async down(queryInterface) { await queryInterface.dropTable('rental_JointHirer'); }, };