fix(10-01): move library_id index to migration 6 to fix existing DB startup

On existing databases, CREATE TABLE IF NOT EXISTS audio_files is a no-op
but the standalone CREATE INDEX on library_id would fail because the
column doesn't exist until migration 6 runs. The migration already
creates this index, so removing it from the schema file is correct.
This commit is contained in:
2026-03-09 10:48:11 -04:00
parent 9ff850fe23
commit 75b2a349eb
+3 -2
View File
@@ -19,5 +19,6 @@ CREATE TABLE IF NOT EXISTS audio_files (
CREATE INDEX IF NOT EXISTS idx_audio_files_recording_id
ON audio_files(recording_id);
CREATE INDEX IF NOT EXISTS idx_audio_files_library_id
ON audio_files(library_id);
-- idx_audio_files_library_id is created by migration 6 (not here) because
-- on existing databases this schema file is a no-op (CREATE TABLE IF NOT EXISTS)
-- and the library_id column doesn't exist until the migration adds it.