@@ -0,0 +1,24 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.addColumn('admin_notifications', 'broadcast_id', {
|
||||
type: Sequelize.BIGINT,
|
||||
allowNull: true,
|
||||
references: { model: 'notification_broadcasts', key: 'broadcast_id' },
|
||||
onDelete: 'SET NULL',
|
||||
});
|
||||
|
||||
await queryInterface.addColumn('user_notifications', 'broadcast_id', {
|
||||
type: Sequelize.BIGINT,
|
||||
allowNull: true,
|
||||
references: { model: 'notification_broadcasts', key: 'broadcast_id' },
|
||||
onDelete: 'SET NULL',
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
await queryInterface.removeColumn('user_notifications', 'broadcast_id');
|
||||
await queryInterface.removeColumn('admin_notifications', 'broadcast_id');
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user