site_videos.products (the old product column is kept and copied); one floating video per product checks the overlap and names it. The floating player starts muted, with a sound button that says its state and an expand button to the large player. A vertical video stands upright on the floating and the large player. The home's videos move to its foot as muted looping cards that play only on screen, not at all with reduced motion, and open the large player. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
9 lines
656 B
SQL
9 lines
656 B
SQL
-- Round 5, D7: the same video can appear on more than one product page. The
|
|
-- old single `product` column stays for compatibility; the code reads
|
|
-- `products`. One floating video per product is still enforced in the API.
|
|
ALTER TABLE dtf_local.site_videos ADD COLUMN IF NOT EXISTS products text[] NOT NULL DEFAULT '{}';
|
|
UPDATE dtf_local.site_videos SET products=ARRAY[product] WHERE product IS NOT NULL AND products='{}';
|
|
ALTER TABLE dtf_local.site_videos DROP CONSTRAINT IF EXISTS site_videos_products_check;
|
|
ALTER TABLE dtf_local.site_videos ADD CONSTRAINT site_videos_products_check
|
|
CHECK (products <@ ARRAY['file','avulsa','uvfile','uv']::text[]);
|