Merge remote-tracking branch 'origin/main' into feat/audiobooks
# Conflicts: # go.sum
This commit is contained in:
@@ -1058,6 +1058,7 @@ CREATE TABLE public.users (
|
||||
username text,
|
||||
password_hash text,
|
||||
role text,
|
||||
permissions text[] DEFAULT '{}'::text[] NOT NULL,
|
||||
enabled boolean DEFAULT true,
|
||||
library_ids integer[],
|
||||
max_streams integer DEFAULT 6,
|
||||
|
||||
@@ -0,0 +1,2 @@
|
||||
DROP INDEX IF EXISTS idx_downloaded_subtitles_provider_created;
|
||||
DROP INDEX IF EXISTS idx_downloaded_subtitles_created;
|
||||
@@ -0,0 +1,5 @@
|
||||
CREATE INDEX IF NOT EXISTS idx_downloaded_subtitles_created
|
||||
ON downloaded_subtitles (created_at DESC);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_downloaded_subtitles_provider_created
|
||||
ON downloaded_subtitles (provider, created_at DESC);
|
||||
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE public.users
|
||||
DROP COLUMN IF EXISTS permissions;
|
||||
@@ -0,0 +1,6 @@
|
||||
ALTER TABLE public.users
|
||||
ADD COLUMN IF NOT EXISTS permissions text[] NOT NULL DEFAULT '{}'::text[];
|
||||
|
||||
UPDATE public.users
|
||||
SET permissions = '{}'::text[]
|
||||
WHERE permissions IS NULL;
|
||||
Reference in New Issue
Block a user