Skip to content

Commit

Permalink
[ADP-3214] Refactor Cardano.Wallet.DB.Sqlite (#4223)
Browse files Browse the repository at this point in the history
In preparation for the improvement of the database initialization logic,
this pull request refactors the `Cardano.Wallet.DB.Sqlite` module.

- [x] split off a module `Cardano.DB.Sqlite.ForeignKeys`
- [x] split off a module `Cardano.DB.Sqlite.Migration.Old`
- [x] move `handleConstraint` to its only usage site
- [x] Restructure the logging type for the old manual migrations
- [x] Change `newInMemorySqliteContext` to use `run*Migration`
- [x] Split `destroyDBHandle` into retrying and non-retrying close

### Issue number

ADP-3214
  • Loading branch information
HeinrichApfelmus authored Nov 13, 2023
2 parents a0e4638 + 178432d commit 88d0fff
Show file tree
Hide file tree
Showing 10 changed files with 478 additions and 298 deletions.
2 changes: 2 additions & 0 deletions lib/wallet/cardano-wallet.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -216,6 +216,8 @@ library
Cardano.Api.Extra
Cardano.DB.Sqlite
Cardano.DB.Sqlite.Delete
Cardano.DB.Sqlite.ForeignKeys
Cardano.DB.Sqlite.Migration.Old
Cardano.Pool.DB
Cardano.Pool.DB.Log
Cardano.Pool.DB.Model
Expand Down
Loading

0 comments on commit 88d0fff

Please sign in to comment.