Updated models and migrations to new spec

This commit is contained in:
2022-08-17 19:36:47 +02:00
parent bc075805e2
commit 05804cb78a
22 changed files with 336 additions and 86 deletions

View File

@@ -0,0 +1,36 @@
'use strict';
module.exports = {
async up (queryInterface, Sequelize) {
await queryInterface.createTable('Bot', {
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('Bot');
}
};