From 62767f0702e6497d08fea702b747fd6e7fa72b8c Mon Sep 17 00:00:00 2001 From: valued mammal Date: Mon, 26 May 2025 10:10:24 -0400 Subject: [PATCH] fix(rusqlite_impl): Fix derived spks create table statement Do not reference last revealed table, in case none are revealed. Correct SQL column name. --- crates/chain/src/rusqlite_impl.rs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/crates/chain/src/rusqlite_impl.rs b/crates/chain/src/rusqlite_impl.rs index ca13115b..6f3eaf71 100644 --- a/crates/chain/src/rusqlite_impl.rs +++ b/crates/chain/src/rusqlite_impl.rs @@ -539,13 +539,12 @@ impl keychain_txout::ChangeSet { pub fn schema_v1() -> String { format!( "CREATE TABLE {} ( \ - descriptor_id TEXT NOT NULL REFERENCES {}, \ + descriptor_id TEXT NOT NULL, \ spk_index INTEGER NOT NULL, \ spk BLOB NOT NULL, \ - PRIMARY KEY (descriptor_id, index) \ + PRIMARY KEY (descriptor_id, spk_index) \ ) STRICT", Self::DERIVED_SPKS_TABLE_NAME, - Self::LAST_REVEALED_TABLE_NAME, ) } -- 2.49.0