@tomei/rental
Version:
Tomei Rental Package
66 lines (63 loc) • 1.54 kB
JavaScript
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('hirerChangeRequest_Signature', {
SignatureId: {
type: Sequelize.STRING(30),
primaryKey: true,
allowNull: false,
},
RequestId: {
type: Sequelize.STRING(30),
allowNull: false,
references: {
model: 'rental_HirerChangeRequest',
key: 'RequestId',
},
onUpdate: 'CASCADE',
onDelete: 'CASCADE',
},
CustomerId: {
type: Sequelize.STRING(30),
allowNull: true,
},
JointHirerId: {
type: Sequelize.STRING(30),
allowNull: true,
},
HirerType: {
type: Sequelize.STRING(10),
allowNull: false,
},
SignedAt: {
type: Sequelize.DATE,
allowNull: true,
},
Method: {
type: Sequelize.STRING(20),
allowNull: false,
},
Remarks: {
type: Sequelize.STRING(300),
allowNull: true,
},
CreatedAt: {
type: Sequelize.DATE,
allowNull: false,
},
UpdatedAt: {
type: Sequelize.DATE,
allowNull: false,
},
UpdatedById: {
type: Sequelize.STRING(30),
allowNull: false,
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('hirerChangeRequest_Signature');
// ENUM cleanup not needed in MariaDB
},
};