gancio-upstream/server/migrations/20191025150200-notifications.js
2019-10-28 17:33:20 +01:00

36 lines
840 B
JavaScript

'use strict'
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.createTable('notifications', {
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
type: Sequelize.INTEGER
},
filters: Sequelize.JSON,
email: Sequelize.STRING,
remove_code: Sequelize.STRING,
action: {
type: Sequelize.ENUM,
values: ['Create', 'Update', 'Delete']
},
type: {
type: Sequelize.ENUM,
values: ['mail', 'admin_email', 'ap']
},
createdAt: {
allowNull: false,
type: Sequelize.DATE
},
updatedAt: {
allowNull: false,
type: Sequelize.DATE
}
})
},
down: (queryInterface, Sequelize) => {
return queryInterface.dropTable('notifications')
}
}