UNPKG

@tomei/sso

Version:
73 lines (70 loc) 1.69 kB
'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.createTable('sso_GroupSystemAccess', { GroupSystemAccessId: { type: Sequelize.INTEGER, allowNull: false, primaryKey: true, autoIncrement: true, }, GroupCode: { type: Sequelize.STRING(10), allowNull: false, references: { model: 'sso_Group', key: 'GroupCode', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, SystemCode: { type: Sequelize.STRING(10), allowNull: false, references: { model: 'sso_System', key: 'SystemCode', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, Status: { type: Sequelize.STRING(10), allowNull: false, defaultValue: 'Active', }, CreatedById: { type: Sequelize.INTEGER, allowNull: false, references: { model: 'sso_User', key: 'UserId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, CreatedAt: { type: Sequelize.DATE, allowNull: false, }, UpdatedById: { type: Sequelize.INTEGER, allowNull: false, references: { model: 'sso_User', key: 'UserId', }, onUpdate: 'CASCADE', onDelete: 'CASCADE', }, UpdatedAt: { type: Sequelize.DATE, allowNull: false, }, }); }, async down(queryInterface) { await queryInterface.dropTable('sso_GroupSystemAccess'); }, };