The new index on movies.tmdb_collection_id was in video_schema.sql, which executescript runs BEFORE _ensure_columns adds the column on existing DBs — so 'CREATE INDEX ... ON movies(tmdb_collection_id)' failed with 'no such column' and the whole video DB init aborted (500s on every /api/video/* call). Moved the index to _POST_INDEXES (runs after the ALTERs), matching the pattern the code comments already prescribe. The CREATE TABLE columns stay (fresh DBs) + the ALTER migration stays (existing DBs); only the index moved. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||