feat(F-071): completed feature

This commit is contained in:
chattie
2026-08-19 19:04:41 +02:00
parent 16e4e86fbe
commit cf67f51d07
22 changed files with 495 additions and 74 deletions

View 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
`);
};