Files
ds-galo/backend/migrations/000012_video_support.up.sql
iu d38ede0201 feat(video): add video upload with remux/transcode playback
Add video as a media kind in photos: streaming upload with per-kind
limits, ffprobe metadata, poster frame reusing the image variant
pipeline, and a playback object (remux when web-compatible, else
h264/yuv420p/aac transcode). Video jobs run on a separate pool with a
long lease. Frontend gains a video viewer, grid badge/duration and
video upload.
2026-10-11 20:37:53 +03:00

14 lines
686 B
SQL

-- Video support: media kind and duration on photos, a playback object role, and
-- a job kind distinguishing short image work from long transcoding work.
ALTER TABLE photos ADD COLUMN IF NOT EXISTS kind text NOT NULL DEFAULT 'image'
CHECK (kind IN ('image', 'video'));
ALTER TABLE photos ADD COLUMN IF NOT EXISTS duration_ms bigint;
ALTER TABLE photo_objects DROP CONSTRAINT IF EXISTS photo_objects_role_check;
ALTER TABLE photo_objects ADD CONSTRAINT photo_objects_role_check
CHECK (role IN ('original', 'thumb', 'medium', 'preview', 'playback'));
ALTER TABLE variant_jobs ADD COLUMN IF NOT EXISTS kind text NOT NULL DEFAULT 'image'
CHECK (kind IN ('image', 'video'));