zcash_client_sqlite: Ensure uniqueness of (hd_seed_fingerprinte, hd_account_index) pairs.

This commit is contained in:
Kris Nuttycombe 2024-03-12 11:19:19 -06:00
parent 33e943d14a
commit 328e854202
1 changed files with 1 additions and 0 deletions

View File

@ -69,6 +69,7 @@ impl<P: consensus::Parameters> RusqliteMigration for Migration<P> {
(account_type = {account_type_imported} AND hd_seed_fingerprint IS NULL AND hd_account_index IS NULL)
)
);
CREATE UNIQUE INDEX hd_account ON accounts_new (hd_seed_fingerprint, hd_account_index);
CREATE UNIQUE INDEX accounts_uivk ON accounts_new ("uivk");
CREATE UNIQUE INDEX accounts_ufvk ON accounts_new ("ufvk");
"#),