Only try to drop the uniquetx index if it exists.

Solves a corner case after a crash.
This commit is contained in:
Owain G. Ainsworth 2013-05-29 17:54:46 +01:00
parent 752ca5dfbb
commit a2e3fd92b0

View file

@ -64,7 +64,7 @@ var txqueries []string = []string{
txtmpFetchLocationByShaStmt: "SELECT blockid, txoff, txlen FROM txtmp WHERE key = ?;",
txMigrateCopy: "INSERT INTO tx (key, blockid, txoff, txlen, data) SELECT key, blockid, txoff, txlen, data FROM txtmp;",
txMigrateClear: "DELETE from txtmp;",
txMigratePrep: "DROP index uniquetx;",
txMigratePrep: "DROP index IF EXISTS uniquetx;",
txMigrateFinish: "CREATE UNIQUE INDEX IF NOT EXISTS uniquetx ON tx (key);",
txMigrateCount: "SELECT COUNT(*) FROM txtmp;",
txPragmaVacuumOn: "PRAGMA auto_vacuum = FULL;",