diff --git a/zcash_client_sqlite/src/wallet/init.rs b/zcash_client_sqlite/src/wallet/init.rs index 609897d4a..cb50cb77c 100644 --- a/zcash_client_sqlite/src/wallet/init.rs +++ b/zcash_client_sqlite/src/wallet/init.rs @@ -392,8 +392,7 @@ mod tests { FOREIGN KEY (to_account) REFERENCES accounts(account), CONSTRAINT tx_output UNIQUE (tx, output_pool, output_index), CONSTRAINT note_recipient CHECK ( - (to_address IS NOT NULL OR to_account IS NOT NULL) - AND NOT (to_address IS NOT NULL AND to_account IS NOT NULL) + (to_address IS NOT NULL) != (to_account IS NOT NULL) ) )", "CREATE TABLE transactions ( diff --git a/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs b/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs index 5debe5db6..c67777660 100644 --- a/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs +++ b/zcash_client_sqlite/src/wallet/init/migrations/sent_notes_to_internal.rs @@ -60,8 +60,7 @@ impl RusqliteMigration for Migration { FOREIGN KEY (to_account) REFERENCES accounts(account), CONSTRAINT tx_output UNIQUE (tx, output_pool, output_index), CONSTRAINT note_recipient CHECK ( - (to_address IS NOT NULL OR to_account IS NOT NULL) - AND NOT (to_address IS NOT NULL AND to_account IS NOT NULL) + (to_address IS NOT NULL) != (to_account IS NOT NULL) ) ); INSERT INTO sent_notes_new (