fix(migrations): add background_image_url column to hero_slides table
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

This commit is contained in:
Vadym Samoilenko 2026-06-04 12:56:50 +01:00
parent 4547d5aacf
commit 028d14ea17

View file

@ -4,6 +4,7 @@ CREATE TABLE IF NOT EXISTS home_page_hero_slides (
_order integer NOT NULL,
_parent_id integer NOT NULL REFERENCES home_page(id) ON DELETE CASCADE,
background_image_id integer REFERENCES media(id) ON DELETE SET NULL,
background_image_url varchar,
type varchar,
title varchar,
subtitle varchar,
@ -14,3 +15,5 @@ CREATE TABLE IF NOT EXISTS home_page_hero_slides (
);
CREATE INDEX IF NOT EXISTS home_page_hero_slides_parent_idx ON home_page_hero_slides (_parent_id);
CREATE INDEX IF NOT EXISTS home_page_hero_slides_order_idx ON home_page_hero_slides (_order);
-- Add background_image_url if table already exists (idempotent)
ALTER TABLE home_page_hero_slides ADD COLUMN IF NOT EXISTS background_image_url varchar;