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