openvibers/openvibe.media Commits

Content labels' migration is 0017: main could not boot with two 0016s (#278)

OP OpenVibers committed 11 days ago · 6c38245c7d · 2 files, +13 −13

Changes

ddiff --git a/migrations/0016_content_labels.sql b/migrations/0016_content_labels.sql
ddeleted file mode 100644
iindex c0b3451..0000000
---- a/migrations/0016_content_labels.sql
++++ /dev/null
@@@ -1,13 +0,0 @@
---- phase: expand
---- Content labels (L1, labels and choices, 2026-10-31; Contracts 0.257.0 common.content-labels@1).
----
---- A creator labels a VOD or a clip; MediaHub writes it through PUT /api/v1/:app/vods/:id and /clips/:id, and every
---- read (the watch page, Live's cards, the app's own manager) carries the shape. The AI may suggest a label and it is
---- stored in `suggested`; a suggestion changes nothing until the creator confirms it. A viewer's Network label prefs
---- decide what to do with a label; the label itself never hides anything.
----
---- Expand only: an older release never reads these columns, and the defaults keep every existing row label-free.
--ALTER TABLE vods ADD COLUMN IF NOT EXISTS content_labels jsonb NOT NULL DEFAULT '{"labels": [], "suggested": []}'::jsonb;
--ALTER TABLE clips ADD COLUMN IF NOT EXISTS content_labels jsonb NOT NULL DEFAULT '{"labels": [], "suggested": []}'::jsonb;
--CREATE INDEX IF NOT EXISTS vods_content_labels ON vods USING gin (content_labels);
--CREATE INDEX IF NOT EXISTS clips_content_labels ON clips USING gin (content_labels);
ddiff --git a/migrations/0017_content_labels.sql b/migrations/0017_content_labels.sql
nnew file mode 100644
iindex 0000000..c0b3451
---- /dev/null
++++ b/migrations/0017_content_labels.sql
@@@ -0,0 +1,13 @@
++-- phase: expand
++-- Content labels (L1, labels and choices, 2026-10-31; Contracts 0.257.0 common.content-labels@1).
++--
++-- A creator labels a VOD or a clip; MediaHub writes it through PUT /api/v1/:app/vods/:id and /clips/:id, and every
++-- read (the watch page, Live's cards, the app's own manager) carries the shape. The AI may suggest a label and it is
++-- stored in `suggested`; a suggestion changes nothing until the creator confirms it. A viewer's Network label prefs
++-- decide what to do with a label; the label itself never hides anything.
++--
++-- Expand only: an older release never reads these columns, and the defaults keep every existing row label-free.
++ALTER TABLE vods ADD COLUMN IF NOT EXISTS content_labels jsonb NOT NULL DEFAULT '{"labels": [], "suggested": []}'::jsonb;
++ALTER TABLE clips ADD COLUMN IF NOT EXISTS content_labels jsonb NOT NULL DEFAULT '{"labels": [], "suggested": []}'::jsonb;
++CREATE INDEX IF NOT EXISTS vods_content_labels ON vods USING gin (content_labels);
++CREATE INDEX IF NOT EXISTS clips_content_labels ON clips USING gin (content_labels);