mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
25 lines
758 B
JavaScript
25 lines
758 B
JavaScript
'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');
|
|
},
|
|
};
|