mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
units,lesson as standalone
This commit is contained in:
@@ -0,0 +1,57 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
// ─── notification_broadcasts ────────────────────────────────────────────
|
||||
await queryInterface.addColumn('notification_broadcasts', 'show_in_sticky', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
});
|
||||
|
||||
await queryInterface.addColumn('notification_broadcasts', 'show_in_notifications', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true,
|
||||
});
|
||||
|
||||
// ─── admin_notifications (admin bell) ───────────────────────────────────
|
||||
await queryInterface.addColumn('admin_notifications', 'show_in_notifications', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true,
|
||||
});
|
||||
|
||||
// Not used by admin UI right now, but keeps filtering semantics symmetric.
|
||||
await queryInterface.addColumn('admin_notifications', 'show_in_sticky', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
});
|
||||
|
||||
// ─── user_notifications (client notifications + sticky banner) ────────
|
||||
await queryInterface.addColumn('user_notifications', 'show_in_notifications', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: true,
|
||||
});
|
||||
|
||||
await queryInterface.addColumn('user_notifications', 'show_in_sticky', {
|
||||
type: Sequelize.BOOLEAN,
|
||||
allowNull: false,
|
||||
defaultValue: false,
|
||||
});
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
await queryInterface.removeColumn('user_notifications', 'show_in_sticky');
|
||||
await queryInterface.removeColumn('user_notifications', 'show_in_notifications');
|
||||
|
||||
await queryInterface.removeColumn('admin_notifications', 'show_in_sticky');
|
||||
await queryInterface.removeColumn('admin_notifications', 'show_in_notifications');
|
||||
|
||||
await queryInterface.removeColumn('notification_broadcasts', 'show_in_notifications');
|
||||
await queryInterface.removeColumn('notification_broadcasts', 'show_in_sticky');
|
||||
},
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user