Files
toho-miku/migrations/20220817100736-create-bot.js
Jan Groß 51e90dee8a Add helper function for bot settings
and fix registration check always returning true
2022-08-19 14:14:24 +02:00

37 lines
828 B
JavaScript

'use strict';
module.exports = {
async up (queryInterface, Sequelize) {
await queryInterface.createTable('Bots', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
maintenance: {
type: Sequelize.BOOLEAN,
allowNull: false,
defaultValue: false
},
adminIDs: {
type: Sequelize.STRING
},
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('Bots');
}
};