Sync from /srv/compose/unified-media-manager

This commit is contained in:
Christopher Mayor
2026-04-24 10:45:19 -07:00
commit 7dbd00e537
132 changed files with 25394 additions and 0 deletions

View File

@@ -0,0 +1,21 @@
-- Fix: migration 003 was tracked but ALTER TABLE statements did not persist.
-- Re-apply the schema changes to download_clients.
-- Add missing columns
ALTER TABLE download_clients ADD COLUMN IF NOT EXISTS url TEXT;
ALTER TABLE download_clients ADD COLUMN IF NOT EXISTS api_key TEXT;
ALTER TABLE download_clients ADD COLUMN IF NOT EXISTS category TEXT NOT NULL DEFAULT 'umm';
ALTER TABLE download_clients ADD COLUMN IF NOT EXISTS priority INTEGER NOT NULL DEFAULT 0;
ALTER TABLE download_clients ADD COLUMN IF NOT EXISTS protocol TEXT NOT NULL DEFAULT 'nzb';
-- Migrate existing rows: combine host+port into url
UPDATE download_clients SET url = 'http://' || host || ':' || port::text WHERE url IS NULL;
-- Now url should be populated — make it NOT NULL
ALTER TABLE download_clients ALTER COLUMN url SET NOT NULL;
-- Drop old columns
ALTER TABLE download_clients DROP COLUMN IF EXISTS host;
ALTER TABLE download_clients DROP COLUMN IF EXISTS port;
ALTER TABLE download_clients DROP COLUMN IF EXISTS username;
ALTER TABLE download_clients DROP COLUMN IF EXISTS password;