From 3828a814b5d2f8d6ec9111cea8c6c91caf18d26d Mon Sep 17 00:00:00 2001 From: Kevin Gorham Date: Tue, 4 May 2021 17:37:17 -0400 Subject: [PATCH] Relax fk constraints. --- zcash_client_sqlite/src/wallet/init.rs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/zcash_client_sqlite/src/wallet/init.rs b/zcash_client_sqlite/src/wallet/init.rs index 0e7c81df9..211dfedc5 100644 --- a/zcash_client_sqlite/src/wallet/init.rs +++ b/zcash_client_sqlite/src/wallet/init.rs @@ -212,7 +212,9 @@ pub fn init_accounts_table( pub fn drop_accounts_table( wdb: &WalletDb

, ) -> 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(()) }