persistent-sqlite 2.10.5 → 2.10.5.1
raw patch · 4 files changed
+10/−4 lines, 4 files
Files
- ChangeLog.md +4/−0
- Database/Persist/Sqlite.hs +1/−1
- persistent-sqlite.cabal +1/−1
- test/main.hs +4/−2
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for persistent-sqlite +## 2.10.5.1++* a fix for template-haskell 2.16, GHC 8.10 alpha [#993](https://github.com/yesodweb/persistent/pull/993) @simonmichael+ ## 2.10.5 * Foreign keys table constraints are correctly generated [#945](https://github.com/yesodweb/persistent/pull/945) @kderme
Database/Persist/Sqlite.hs view
@@ -704,7 +704,6 @@ , _fkEnabled :: Bool -- ^ if foreign-key constraints are enabled. , _extraPragmas :: [Text] -- ^ additional pragmas to be set on initialization } deriving Show-makeLenses ''SqliteConnectionInfo instance FromJSON SqliteConnectionInfo where parseJSON v = modifyFailure ("Persistent: error loading SqliteConnectionInfo: " ++) $@@ -714,6 +713,7 @@ <*> o .: "fkEnabled" <*> o .:? "extraPragmas" .!= [] +makeLenses ''SqliteConnectionInfo -- | Like `withSqliteConnInfo`, but exposes the internal `Sqlite.Connection`. -- For power users who want to manually interact with SQLite's C API via
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 2.10.5+version: 2.10.5.1 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>
test/main.hs view
@@ -9,6 +9,8 @@ {-# LANGUAGE TemplateHaskell #-} {-# LANGUAGE TypeFamilies #-} {-# LANGUAGE UndecidableInstances #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE DerivingStrategies #-} import SqliteInit @@ -208,7 +210,7 @@ it "issue #328" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do runMigration migrateAll- _ <- insert . Test $ read "2014-11-30 05:15:25.123"+ _ <- insert . Test $ read "2014-11-30 05:15:25.123Z" [Single x] <- rawSql "select strftime('%s%f',time) from test" [] liftIO $ x `shouldBe` Just ("141732452525.123" :: String) it "issue #339" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do@@ -224,7 +226,7 @@ return () it "issue #527" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do runMigration migrateAll- insertMany_ $ replicate 1000 (Test $ read "2014-11-30 05:15:25.123")+ insertMany_ $ replicate 1000 (Test $ read "2014-11-30 05:15:25.123Z") it "properly migrates to a composite primary key (issue #669)" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do runMigration compositeSetup