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>
11 lines
446 B
SQL
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 $$;
|