src/migrations/20190822010033-create-app-notification.js
'use strict';
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('AppNotifications', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
articleSlug: {
type: Sequelize.STRING
},
receiverId: {
type: Sequelize.INTEGER
},
category: {
type: Sequelize.STRING
},
read: {
type: Sequelize.BOOLEAN
},
message: {
type: Sequelize.STRING
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
});
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('AppNotifications');
}
};