From d552d974401f08b95185b72b9e6e0492a2ff76ba Mon Sep 17 00:00:00 2001 From: sbcrumb Date: Fri, 17 Oct 2025 21:09:42 -0400 Subject: [PATCH] db: insert tables --- VERSION | 2 +- core/database.py | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/VERSION b/VERSION index 0bee604..3f684d2 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.3.3 +2.3.4 diff --git a/core/database.py b/core/database.py index 35710b2..a39dd62 100644 --- a/core/database.py +++ b/core/database.py @@ -126,6 +126,7 @@ class NFOGuardDatabase: dateadded TIMESTAMP, source VARCHAR(100), last_updated TIMESTAMP NOT NULL, + has_video_file BOOLEAN DEFAULT FALSE, PRIMARY KEY (imdb_id, season, episode), FOREIGN KEY (imdb_id) REFERENCES series(imdb_id) ) @@ -158,6 +159,7 @@ class NFOGuardDatabase: # Create indexes for PostgreSQL cursor.execute("CREATE INDEX IF NOT EXISTS idx_episodes_imdb ON episodes(imdb_id)") + cursor.execute("CREATE INDEX IF NOT EXISTS idx_episodes_video ON episodes(has_video_file)") cursor.execute("CREATE INDEX IF NOT EXISTS idx_movies_video ON movies(has_video_file)") cursor.execute("CREATE INDEX IF NOT EXISTS idx_history_imdb ON processing_history(imdb_id)")