feat(F-103): completed feature

This commit is contained in:
chattie
2026-08-21 07:55:18 +02:00
parent 5177a851aa
commit c07776822d
40 changed files with 886 additions and 156 deletions

View File

@@ -0,0 +1,23 @@
/**
* Adds description and explicit card colors (background + text) to categories.
* - description: visible category description (AI can fill it when empty).
* - bg_color / text_color: hex colors used by category cards in the storefront.
* All columns are nullable — existing categories remain unaffected.
*/
export const up = (pgm) => {
pgm.sql(`
ALTER TABLE categories_categories
ADD COLUMN IF NOT EXISTS description TEXT NULL DEFAULT NULL,
ADD COLUMN IF NOT EXISTS bg_color VARCHAR(20) NULL DEFAULT NULL,
ADD COLUMN IF NOT EXISTS text_color VARCHAR(20) NULL DEFAULT NULL
`);
};
export const down = (pgm) => {
pgm.sql(`
ALTER TABLE categories_categories
DROP COLUMN IF EXISTS description,
DROP COLUMN IF EXISTS bg_color,
DROP COLUMN IF EXISTS text_color
`);
};