UNPKG

@tomei/rental

Version:
42 lines (39 loc) 977 B
'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.createTable('rental_AgreementHistory', { HistoryId: { type: Sequelize.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, }, MediaId: { type: Sequelize.STRING(30), allowNull: false, }, ActivityCompleted: { type: Sequelize.STRING(200), allowNull: false, }, AgreementNo: { type: Sequelize.STRING(30), allowNull: false, references: { model: 'rental_Agreement', key: 'AgreementNo', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, CreatedAt: { type: Sequelize.DATE, allowNull: false, }, }); }, async down(queryInterface, Sequelize) { await queryInterface.dropTable('rental_AgreementHistory'); }, };