stremio/apps/master-api/prisma/migrations/20260901180000_viewer_iptv_access/migration.sql
Jos Vooges | STH 5524b3269d Add live IPTV TV tab to Android app with per-viewer access.
Expose client IPTV endpoints and admin toggle so viewers with IPTV access get a setup-box-style channel guide and live player in the TV app.

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-09-01 17:31:05 +02:00

11 lines
446 B
SQL

ALTER TABLE "viewer_users" ADD COLUMN IF NOT EXISTS "iptv_access" BOOLEAN NOT NULL DEFAULT false;
ALTER TABLE "viewer_users" ADD COLUMN IF NOT EXISTS "iptv_addon_token_id" TEXT;
DO $$ BEGIN
ALTER TABLE "viewer_users"
ADD CONSTRAINT "viewer_users_iptv_addon_token_id_fkey"
FOREIGN KEY ("iptv_addon_token_id") REFERENCES "addon_tokens"("id")
ON DELETE SET NULL ON UPDATE CASCADE;
EXCEPTION
WHEN duplicate_object THEN NULL;
END $$;