Fix migration v4 ordering and add a v3->v4 regression test (AUD-70)
schema.sql runs before the incremental migrations, so the folder index must not live there: on a v3 database the column does not exist yet and startup failed with "no such column: folder". The migration still creates the index. The regression test opens a hand-built v3 database with the current code. Co-Authored-By: Paperclip <noreply@paperclip.ing>
This commit is contained in:
@@ -39,7 +39,6 @@ CREATE TABLE IF NOT EXISTS messages (
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_messages_received_at ON messages (received_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_messages_folder ON messages (folder, received_at);
|
||||
CREATE INDEX IF NOT EXISTS idx_messages_thread_id ON messages (thread_id);
|
||||
CREATE INDEX IF NOT EXISTS idx_messages_source ON messages (source_address);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user