-- 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;
