Relax fk constraints.

This commit is contained in:
Kevin Gorham 2021-05-04 17:37:17 -04:00
parent 5a5100395a
commit 3828a814b5
No known key found for this signature in database
GPG Key ID: CCA55602DF49FC38
1 changed files with 3 additions and 1 deletions

View File

@ -212,7 +212,9 @@ pub fn init_accounts_table<P: consensus::Parameters>(
pub fn drop_accounts_table<P: consensus::Parameters>(
wdb: &WalletDb<P>,
) -> Result<(), SqliteClientError> {
wdb.conn.execute( "DROP TABLE accounts;", NO_PARAMS, )?;
wdb.conn.execute_batch(
"PRAGMA foreign_keys = OFF; DROP TABLE accounts; PRAGMA foreign_keys = ON;"
)?;
Ok(())
}