feat(F-071): completed feature
This commit is contained in:
21
project/migrations/030_category_emoji_color.js
Normal file
21
project/migrations/030_category_emoji_color.js
Normal file
@@ -0,0 +1,21 @@
|
||||
/* eslint-disable camelcase */
|
||||
/**
|
||||
* F-071: Adds emoji and color columns to categories_categories.
|
||||
* Allows admin to set a representative emoji and card color per category.
|
||||
* Both columns are nullable — existing categories remain unaffected.
|
||||
*/
|
||||
export const up = (pgm) => {
|
||||
pgm.sql(`
|
||||
ALTER TABLE categories_categories
|
||||
ADD COLUMN IF NOT EXISTS emoji VARCHAR(10) NULL DEFAULT NULL,
|
||||
ADD COLUMN IF NOT EXISTS color TEXT NULL DEFAULT NULL
|
||||
`);
|
||||
};
|
||||
|
||||
export const down = (pgm) => {
|
||||
pgm.sql(`
|
||||
ALTER TABLE categories_categories
|
||||
DROP COLUMN IF EXISTS emoji,
|
||||
DROP COLUMN IF EXISTS color
|
||||
`);
|
||||
};
|
||||
Reference in New Issue
Block a user