gancio/server/migrations/20191025150200-notifications.js

37 lines
840 B
JavaScript
Raw Normal View History

2019-10-28 17:33:20 +01:00
'use strict'
2019-10-25 18:43:49 +02:00
module.exports = {
up: (queryInterface, Sequelize) => {
2019-10-28 17:33:20 +01:00
return queryInterface.createTable('notifications', {
2019-10-25 18:43:49 +02:00
id: {
allowNull: false,
autoIncrement: true,
primaryKey: true,
2019-10-28 17:33:20 +01:00
type: Sequelize.INTEGER
2019-10-25 18:43:49 +02:00
},
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')
}
2019-10-28 17:33:20 +01:00
}