UNPKG

@tomei/rental

Version:
65 lines (62 loc) 1.52 kB
'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { up: async (queryInterface, Sequelize) => { await queryInterface.createTable('rental_HirerChangeRequest', { RequestId: { type: Sequelize.STRING(30), primaryKey: true, allowNull: false, }, RentalId: { type: Sequelize.STRING(30), allowNull: false, references: { model: 'rental_Rental', key: 'RentalId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, Type: { type: Sequelize.STRING(10), allowNull: false, }, Status: { type: Sequelize.STRING(20), allowNull: false, }, RequestedAt: { type: Sequelize.DATE, allowNull: false, }, RequestedById: { type: Sequelize.STRING(30), allowNull: false, }, RequestingHirerId: { type: Sequelize.STRING(30), allowNull: false, }, RequestingHirerType: { type: Sequelize.ENUM('Main', 'Joint'), allowNull: false, }, CancelRemarks: { type: Sequelize.STRING(300), allowNull: true, }, UpdatedAt: { type: Sequelize.DATE, allowNull: false, }, UpdatedById: { type: Sequelize.STRING(30), allowNull: false, }, }); }, down: async (queryInterface, Sequelize) => { await queryInterface.dropTable('rental_HirerChangeRequest'); }, };