feat: Add migration for keyset_id as foreign key in SQLite database #634
No reviewers
Labels
No labels
DB & Storage
Deployment
Error Handling & Logging
Maintenance
Payment Backend
backport
backport v0.13.x
backport v0.14.x
backport v0.15.x
bindings
blocked
bug
cdk-sql
ci
cli
deps
documentation
duplicate
enhancement
good first issue
help wanted
invalid
keep-open
ldk-node-ui
migrations
mint
mutation-testing
needs rebase
needs review
new nut
nut change
question
ready
rust-version
rustfmt
stacked hold
stale
testing
wallet
weekly-report
wontfix
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
cashubtc/cdk!634
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "keyset_foreign_key"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
closes #628
Notes to the reviewers
Suggested CHANGELOG Updates
CHANGED
ADDED
REMOVED
FIXED
Checklist
just final-checkbefore committingcc @ok300
Do these have to be created at the beginning, when they'll be (re-)created anyway further down below?
@ -878,1 +890,4 @@tracing::error!("Error adding proof: {:?}", err);transaction.rollback().await.map_err(Error::from)?;return Err(Error::from(err).into());}The error matching is becoming quite complex. Instead it, why not change the query to
INSERT ON CONFLICT IGNOREorINSERT OR IGNORE? I think that would automatically cover both relevant error types:y)We wouldn't know why a proof wasn't inserted, but if that's important, we could 1-2 validation steps before the query (check if proof's PK
yis known, check if foreign key is valid).@ -878,1 +890,4 @@tracing::error!("Error adding proof: {:?}", err);transaction.rollback().await.map_err(Error::from)?;return Err(Error::from(err).into());}Address in c6f3318
I think we still want to error and rollback when there is a fk error
Good point