-- Phase 9: real product media (UI refinement pass)
--
-- Purely additive: `imageUrl` keeps its existing meaning (primary image);
-- these three columns add gallery/provenance tracking on top of it. No
-- backfill needed — existing rows get an empty array and NULL, which the
-- application already treats as "no gallery / unknown source / never
-- synced" (see src/lib/product-data/view-models.ts).

ALTER TABLE "products"
    ADD COLUMN "galleryImageUrls" TEXT[] NOT NULL DEFAULT ARRAY[]::TEXT[],
    ADD COLUMN "imageSource" TEXT,
    ADD COLUMN "imageSyncedAt" TIMESTAMP(3);
