socialbot/migrations/20220207180926-create-message.js

27 lines
586 B
JavaScript
Raw Normal View History

2022-02-06 20:42:11 +01:00
'use strict';
module.exports = {
2022-02-07 07:29:07 +01:00
async up(queryInterface, Sequelize) {
await queryInterface.createTable('Messages', {
2022-02-06 20:42:11 +01:00
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
2022-02-07 07:29:07 +01:00
body: {
2022-02-06 20:42:11 +01:00
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
2022-02-07 07:29:07 +01:00
async down(queryInterface, Sequelize) {
await queryInterface.dropTable('Messages');
2022-02-06 20:42:11 +01:00
}
};