mirror of
https://github.com/rgrgogu/new_starr.git
synced 2026-09-27 00:12:54 +08:00
added and fix some of things
Signed-off-by: Kenneth Obsequio <k80308392@gmail.com>
This commit is contained in:
@@ -0,0 +1,15 @@
|
||||
'use strict';
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
await queryInterface.addColumn('categories', 'createdBy', { type: Sequelize.BIGINT, allowNull: true });
|
||||
await queryInterface.addColumn('categories', 'updatedBy', { type: Sequelize.BIGINT, allowNull: true });
|
||||
await queryInterface.addColumn('categories', 'deletedBy', { type: Sequelize.BIGINT, allowNull: true });
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
await queryInterface.removeColumn('categories', 'createdBy');
|
||||
await queryInterface.removeColumn('categories', 'updatedBy');
|
||||
await queryInterface.removeColumn('categories', 'deletedBy');
|
||||
},
|
||||
};
|
||||
@@ -0,0 +1,27 @@
|
||||
'use strict';
|
||||
|
||||
// Per-alert layout image, replacing the old shared sticky_banner_settings
|
||||
// singleton (see 20270101000066-create-sticky-banner-settings.js) — each
|
||||
// notification_broadcasts row now carries its own optional image, copied
|
||||
// onto admin_notifications/user_notifications at send time the same way
|
||||
// color/show_in_sticky already are.
|
||||
const TABLES = ['notification_broadcasts', 'admin_notifications', 'user_notifications'];
|
||||
|
||||
module.exports = {
|
||||
async up(queryInterface, Sequelize) {
|
||||
for (const table of TABLES) {
|
||||
await queryInterface.addColumn(table, 'image_asset_id', {
|
||||
type: Sequelize.BIGINT,
|
||||
allowNull: true,
|
||||
references: { model: 'assets', key: 'asset_id' },
|
||||
onDelete: 'SET NULL',
|
||||
});
|
||||
}
|
||||
},
|
||||
|
||||
async down(queryInterface) {
|
||||
for (const table of TABLES) {
|
||||
await queryInterface.removeColumn(table, 'image_asset_id');
|
||||
}
|
||||
},
|
||||
};
|
||||
Reference in New Issue
Block a user