gancio-upstream/server/migrations/20201103161446-notification_queue.js

21 lines
811 B
JavaScript
Raw Normal View History

'use strict'
module.exports = {
up: (queryInterface, Sequelize) => {
return queryInterface.bulkInsert('notifications', [
// send AP message
2020-11-03 23:37:28 +01:00
{ action: 'Create', type: 'ap', filters: '{ "is_visible": true }', createdAt: new Date(), updatedAt: new Date() },
{ action: 'Update', type: 'ap', filters: '{ "is_visible": true }', createdAt: new Date(), updatedAt: new Date() },
{ action: 'Delete', type: 'ap', filters: '{ "is_visible": true }', createdAt: new Date(), updatedAt: new Date() },
// send anon event to admin
2020-11-03 23:37:28 +01:00
{ action: 'Create', type: 'admin_email', filters: '{ "is_visible": false }', createdAt: new Date(), updatedAt: new Date() }
2020-11-03 23:41:18 +01:00
]).catch(e => { })
},
down: (queryInterface, Sequelize) => {
return queryInterface.bulkDelete('notification')
}
}