server/migrations/20170825171950-notifications.js
module.exports = {
up(queryInterface, Sequelize) {
return queryInterface.createTable('Notifications', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER,
},
type: {
type: Sequelize.STRING,
allowNull: false,
},
bookTitle: {
type: Sequelize.STRING,
allowNull: false,
},
username: {
allowNull: false,
type: Sequelize.STRING,
},
createdAt: {
allowNull: false,
type: Sequelize.DATE,
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE,
}
});
},
down(queryInterface /* , Sequelize */) {
return queryInterface.dropTable('Notifications');
}
};