From 808634faaf913dd7931e97f65a92f286fa7ee567 Mon Sep 17 00:00:00 2001 From: Henry Till Date: Sat, 8 Jun 2024 22:15:27 -0700 Subject: [PATCH] Revert "sqlite: rename migration table" This reverts commit 244ce6045ebe0f8718d29b49e22d7396a281e328. --- src/application/sqlite.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/application/sqlite.rs b/src/application/sqlite.rs index e84dd77..e41f748 100644 --- a/src/application/sqlite.rs +++ b/src/application/sqlite.rs @@ -353,17 +353,17 @@ fn migrate( } else if schema_version == SchemaVersion::new(1) { let tx = connection.transaction()?; { - tx.execute_batch("ALTER TABLE entries RENAME TO entries_v0")?; + tx.execute_batch("ALTER TABLE entries RENAME TO entries_v1")?; tx.execute_batch(CREATE_TABLE)?; let sql = "\ INSERT INTO entries (id, keyid, timestamp, description, identity, ciphertext, meta) SELECT id, ?1, timestamp, description, identity, ciphertext, meta -FROM entries_v0 +FROM entries_v1 "; let mut stmt = tx.prepare(sql)?; stmt.execute([config.key_id()])?; - tx.execute_batch("DROP TABLE entries_v0")?; + tx.execute_batch("DROP TABLE entries_v1")?; } tx.commit()?; migrate(connection, config, SchemaVersion::new(2))