gancio-upstream/server/migrations/20200215153310-create-announcement.js

28 lines
No EOL
652 B
JavaScript

module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('announcements', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
title: Sequelize.STRING,
announcement: {
type: Sequelize.STRING
},
visible: Sequelize.BOOLEAN,
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
})
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('announcements')
}
}