Sync from /srv/compose/unified-media-manager
This commit is contained in:
14
internal/db/migrations/012_subtitle_cache.sql
Normal file
14
internal/db/migrations/012_subtitle_cache.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
-- Subtitle cache table to avoid filesystem glob on every detail request
|
||||
CREATE TABLE IF NOT EXISTS media_subtitles (
|
||||
id BIGSERIAL PRIMARY KEY,
|
||||
media_file_id BIGINT NOT NULL REFERENCES media_files(id) ON DELETE CASCADE,
|
||||
file_name TEXT NOT NULL,
|
||||
language TEXT NOT NULL,
|
||||
language_code TEXT NOT NULL,
|
||||
hi BOOLEAN NOT NULL DEFAULT false,
|
||||
forced BOOLEAN NOT NULL DEFAULT false,
|
||||
source TEXT NOT NULL DEFAULT 'downloaded',
|
||||
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_media_subtitles_file ON media_subtitles (media_file_id);
|
||||
Reference in New Issue
Block a user