Skip to content

Commit 62767f0

Browse files
committed
fix(rusqlite_impl): Fix derived spks create table statement
Do not reference last revealed table, in case none are revealed. Correct SQL column name.
1 parent 603f133 commit 62767f0

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

crates/chain/src/rusqlite_impl.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -539,13 +539,12 @@ impl keychain_txout::ChangeSet {
539539
pub fn schema_v1() -> String {
540540
format!(
541541
"CREATE TABLE {} ( \
542-
descriptor_id TEXT NOT NULL REFERENCES {}, \
542+
descriptor_id TEXT NOT NULL, \
543543
spk_index INTEGER NOT NULL, \
544544
spk BLOB NOT NULL, \
545-
PRIMARY KEY (descriptor_id, index) \
545+
PRIMARY KEY (descriptor_id, spk_index) \
546546
) STRICT",
547547
Self::DERIVED_SPKS_TABLE_NAME,
548-
Self::LAST_REVEALED_TABLE_NAME,
549548
)
550549
}
551550

0 commit comments

Comments
 (0)