Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix Sqlite DB on Windows #918

Merged
merged 1 commit into from
Nov 5, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions lib/core/src/Cardano/DB/Sqlite.hs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ import Data.Maybe
import Data.Text
( Text )
import Database.Persist.Sql
( LogFunc, Migration, close', runMigrationSilent, runSqlConn )
( LogFunc, Migration, close', runMigrationQuiet, runSqlConn )
import Database.Persist.Sqlite
( SqlBackend, SqlPersistT, mkSqliteConnectionInfo, wrapConnectionInfo )
import Database.Sqlite
Expand Down Expand Up @@ -152,7 +152,7 @@ startSqliteBackend logConfig migrateAll trace fp = do
observe = bracketObserveIO logConfig traceQuery Debug "query"
let runQuery :: SqlPersistT IO a -> IO a
runQuery cmd = withMVar lock $ const $ observe $ runSqlConn cmd backend
migrations <- runQuery $ runMigrationSilent migrateAll
migrations <- runQuery $ runMigrationQuiet migrateAll
dbLog trace $ MsgMigrations (length migrations)
pure $ SqliteContext backend runQuery fp trace

Expand Down
4 changes: 2 additions & 2 deletions nix/.stack.nix/default.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions nix/.stack.nix/persistent-sqlite.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

115 changes: 115 additions & 0 deletions nix/.stack.nix/persistent-template.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

118 changes: 118 additions & 0 deletions nix/.stack.nix/persistent.nix

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 5 additions & 5 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,15 @@ extra-deps:
- quickcheck-state-machine-0.6.0
- command-0.1.1

# persistent-sqlite with CASCADE DELETE support
# persistent-2.10.2 with CASCADE DELETE support for SQLite.
#
# See: https://github.com/input-output-hk/persistent/tree/cardano-wallet
- git: https://github.com/input-output-hk/persistent
commit: 79f2ece07eafae005a703c8eda1bd2420b5e07b5
commit: 107787ecc4c8a112375493cd66574f788f950fce
subdirs:
- persistent-sqlite
- persistent-template-2.7.2
- persistent-2.10.1
- persistent
- persistent-sqlite
- persistent-template

# cardano-crypto
- git: https://github.com/input-output-hk/cardano-crypto
Expand Down