gancio/server/migrations/20191025150506-notifications_index.js

16 lines
338 B
JavaScript
Raw Normal View History

2019-10-25 18:43:49 +02:00
'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'])
}
};