Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Suggestions for integrating the new migrations into the `withDBOpenFromFile` function
- Loading branch information
1 parent
32e0a52
commit 7702574
Showing
4 changed files
with
44 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{- | ||
1. implement | ||
mkMigrationInterfaceFile | ||
:: MigrationInterface IO FilePath Sqlite.Connection | ||
Duplicate raw SQL statements form `getVersion` and `setVersion` | ||
withDatabaseFile = do | ||
… | ||
withConnectionPool $ \pool -> | ||
… | ||
2. implement | ||
newMigrationInterfaceInMemory | ||
:: Sqlite.Connection | ||
-> MigrationInterface IO () Sqlite.Connection | ||
backupDatabaseFile = nop | ||
withDatabaseFile = \_ -> … | ||
-- in memory, | ||
-- do not close the database context on exiting this function | ||
-} |
File renamed without changes.