The two new partial indexes (idx_video_wishlist_video/_channel on source_id / parent_source_id) were in video_schema.sql, which runs via executescript() BEFORE the column ALTERs. On a fresh DB the CREATE TABLE includes the columns so it's fine, but on an existing (pre-bridge) DB the table already exists without them, so 'CREATE INDEX ... ON video_wishlist(source_id)' threw 'no such column' and the whole init rolled back — the video side wouldn't load at all. Move those two indexes out of the schema into VideoDatabase._ensure_indexes(), run AFTER _ensure_columns(). Regression test simulates a pre-source DB and asserts the in-place upgrade + the youtube path both work. 81 DB tests green. |
||
|---|---|---|
| .. | ||
| __init__.py | ||
| music_database.py | ||
| personalized_schema.py | ||
| video_database.py | ||
| video_schema.sql | ||