UNPKG

@tomei/sso

Version:
43 lines (40 loc) 981 B
'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.createTable('sso_UserPasswordHistory', { HistoryId: { type: Sequelize.STRING(30), primaryKey: true, allowNull: false, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, UserId: { type: Sequelize.INTEGER, allowNull: false, references: { model: 'sso_User', key: 'UserId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, PasswordHash: { type: Sequelize.STRING(225), allowNull: false, }, CreatedAt: { type: Sequelize.DATE, allowNull: false, }, UpdatedAt: { type: Sequelize.DATE, allowNull: false, }, }); }, async down(queryInterface, Sequelize) { await queryInterface.dropTable('sso_UserPasswordHistory'); }, };