UNPKG

@tomei/sso

Version:
79 lines (76 loc) 1.76 kB
'use strict'; /** @type {import('sequelize-cli').Migration} */ module.exports = { async up(queryInterface, Sequelize) { await queryInterface.createTable('sso_System', { SystemCode: { type: Sequelize.STRING(30), allowNull: false, primaryKey: true, }, Name: { type: Sequelize.STRING(200), allowNull: false, }, Description: { type: Sequelize.STRING(500), allowNull: false, }, AccessURL: { type: Sequelize.STRING(2000), allowNull: true, }, GooglePlayURL: { type: Sequelize.STRING(2000), allowNull: true, }, AppleStoreURL: { type: Sequelize.STRING(2000), allowNull: true, }, APIKey: { type: Sequelize.STRING(255), allowNull: true, }, APISecret: { type: Sequelize.STRING(255), allowNull: true, }, Status: { type: Sequelize.STRING(10), allowNull: false, }, 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_System'); }, };