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

15 lines
336 B
JavaScript

'use strict'
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.addIndex('notifications', {
unique: true,
fields: ['action', 'type']
}).catch(e => {})
},
down: (queryInterface, Sequelize) => {
return queryInterface.removeIndex('notifications',
['actions', 'type'])
}
}