@tomei/rental
Version:
Tomei Rental Package
73 lines (70 loc) • 1.68 kB
JavaScript
'use strict';
/** @type {import('sequelize-cli').Migration} */
module.exports = {
up: async (queryInterface, Sequelize) => {
await queryInterface.createTable('hirerChangeRequest_NewHirer', {
NewHirerId: {
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',
},
FullName: {
type: Sequelize.STRING(200),
allowNull: false,
},
Email: {
type: Sequelize.STRING(100),
allowNull: true,
},
IdType: {
type: Sequelize.STRING(20),
allowNull: false,
},
IdNo: {
type: Sequelize.STRING(50),
allowNull: false,
},
ContactNo: {
type: Sequelize.STRING(20),
allowNull: false,
},
Relationship: {
type: Sequelize.STRING(20),
allowNull: false,
},
Address: {
type: Sequelize.STRING(1000),
allowNull: false,
},
City: {
type: Sequelize.STRING(100),
allowNull: false,
},
State: {
type: Sequelize.STRING(100),
allowNull: false,
},
Postcode: {
type: Sequelize.STRING(20),
allowNull: false,
},
Country: {
type: Sequelize.STRING(100),
allowNull: false,
},
});
},
down: async (queryInterface, Sequelize) => {
await queryInterface.dropTable('hirerChangeRequest_NewHirer');
},
};