Files
toho-miku/migrations/20220417130917-create-guild.js

38 lines
905 B
JavaScript

'use strict';
module.exports = {
async up(queryInterface, Sequelize) {
await queryInterface.createTable('Guilds', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
guildId: {
type: Sequelize.BIGINT,
allowNull: false
},
adminRoleId: {
type: Sequelize.BIGINT,
},
active: {
type: Sequelize.INTEGER,
allowNull: false,
defaultValue: 1
},
createdAt: {
allowNull: false,
type: Sequelize.DATE,
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP')
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE,
defaultValue: Sequelize.literal('CURRENT_TIMESTAMP')
}
});
},
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('Guilds');
}
};