Db migration

This commit is contained in:
Hanh 2022-03-16 19:51:09 +08:00
parent 5e7709f5ff
commit abc38f6cae
1 changed files with 3 additions and 1 deletions

View File

@ -139,7 +139,9 @@ pub fn init_db(connection: &Connection) -> anyhow::Result<()> {
dirty BOOL NOT NULL)",
NO_PARAMS,
)?;
}
if version < 2 {
connection.execute(
"CREATE INDEX i_received_notes ON received_notes(account)", NO_PARAMS)?;
connection.execute(
@ -152,7 +154,7 @@ pub fn init_db(connection: &Connection) -> anyhow::Result<()> {
"CREATE INDEX i_witness ON sapling_witnesses(height)", NO_PARAMS)?;
}
update_schema_version(&connection, 1)?;
update_schema_version(&connection, 2)?;
Ok(())
}