-- Phase 3b (2026-07-09): 음악 영상화 발주
-- 의존성: 2026-07-03-phase3a-music.sql(music_tracks) 적용 후
-- 적용: 클라우드 Supabase + NAS self-host 양쪽

INSERT INTO products (id, name, price, category, is_active)
VALUES ('music_video', '음악 영상화', 30000, 'software', true)
ON CONFLICT (id) DO NOTHING;

ALTER TABLE music_tracks
  ADD COLUMN IF NOT EXISTS video_status text NOT NULL DEFAULT 'none'
    CHECK (video_status IN ('none','requested','in_progress','delivered')),
  ADD COLUMN IF NOT EXISTS video_url text,
  ADD COLUMN IF NOT EXISTS video_order_id uuid;
