@@ -43,6 +43,10 @@ static MIGRATIONS: &[&str] = &[
4343 "INSERT INTO transaction_details SELECT txid, timestamp, received, sent, fee, height FROM transaction_details_old;" ,
4444 "DROP TABLE transaction_details_old;" ,
4545 "ALTER TABLE utxos ADD COLUMN is_spent;" ,
46+ "ALTER TABLE utxos RENAME TO utxos_old;" ,
47+ "CREATE TABLE utxos (value INTEGER, keychain TEXT, vout INTEGER, txid BLOB, script BLOB, is_spent BOOLEAN DEFAULT 0);" ,
48+ "INSERT INTO utxos SELECT value, keychain, vout, txid, script, is_spent FROM utxos_old;" ,
49+ "DROP TABLE utxos_old;" ,
4650 // drop all data due to possible inconsistencies with duplicate utxos, re-sync required
4751 "DELETE FROM checksums;" ,
4852 "DELETE FROM last_derivation_indices;" ,
@@ -51,7 +55,6 @@ static MIGRATIONS: &[&str] = &[
5155 "DELETE FROM transaction_details;" ,
5256 "DELETE FROM transactions;" ,
5357 "DELETE FROM utxos;" ,
54- "DROP INDEX idx_txid_vout;" ,
5558 "CREATE UNIQUE INDEX idx_utxos_txid_vout ON utxos(txid, vout);"
5659] ;
5760
0 commit comments