Shumiland/migrations/0014_birthday_patterns.sql
Vadym Samoilenko 83283ed43c
Some checks are pending
CI / Type Check (push) Waiting to run
CI / Lint (push) Waiting to run
CI / Unit Tests (push) Waiting to run
Deploy / Build & Push Image (push) Waiting to run
Deploy / Deploy to VPS (push) Blocked by required conditions
feat(home): CMS-managed birthday card background patterns
Admins can now upload custom pattern images for green and orange
pricing cards via Home Page → День народження → Паттерн зелених/оранжевої карток.
Falls back to static /images/figma/card-pattern-*.png if not set.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-05 12:39:05 +01:00

15 lines
817 B
SQL

-- 0014: birthday card background pattern media fields on home_page global
-- Live table: two nullable FK columns referencing media
ALTER TABLE "home_page"
ADD COLUMN IF NOT EXISTS "birthday_intro_pattern_green_id" integer
REFERENCES "media"("id") ON DELETE SET NULL ON UPDATE NO ACTION,
ADD COLUMN IF NOT EXISTS "birthday_intro_pattern_orange_id" integer
REFERENCES "media"("id") ON DELETE SET NULL ON UPDATE NO ACTION;
-- Versions table: same columns on the version snapshot table
ALTER TABLE "_home_page_v"
ADD COLUMN IF NOT EXISTS "version_birthday_intro_pattern_green_id" integer
REFERENCES "media"("id") ON DELETE SET NULL ON UPDATE NO ACTION,
ADD COLUMN IF NOT EXISTS "version_birthday_intro_pattern_orange_id" integer
REFERENCES "media"("id") ON DELETE SET NULL ON UPDATE NO ACTION;