Db migration
This commit is contained in:
parent
5e7709f5ff
commit
abc38f6cae
|
@ -139,7 +139,9 @@ pub fn init_db(connection: &Connection) -> anyhow::Result<()> {
|
||||||
dirty BOOL NOT NULL)",
|
dirty BOOL NOT NULL)",
|
||||||
NO_PARAMS,
|
NO_PARAMS,
|
||||||
)?;
|
)?;
|
||||||
|
}
|
||||||
|
|
||||||
|
if version < 2 {
|
||||||
connection.execute(
|
connection.execute(
|
||||||
"CREATE INDEX i_received_notes ON received_notes(account)", NO_PARAMS)?;
|
"CREATE INDEX i_received_notes ON received_notes(account)", NO_PARAMS)?;
|
||||||
connection.execute(
|
connection.execute(
|
||||||
|
@ -152,7 +154,7 @@ pub fn init_db(connection: &Connection) -> anyhow::Result<()> {
|
||||||
"CREATE INDEX i_witness ON sapling_witnesses(height)", NO_PARAMS)?;
|
"CREATE INDEX i_witness ON sapling_witnesses(height)", NO_PARAMS)?;
|
||||||
}
|
}
|
||||||
|
|
||||||
update_schema_version(&connection, 1)?;
|
update_schema_version(&connection, 2)?;
|
||||||
|
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue