persistent-sqlite 2.10.6.1 → 2.10.6.2
raw patch · 4 files changed
+15/−10 lines, 4 files
Files
- ChangeLog.md +4/−0
- Database/Persist/Sqlite.hs +3/−3
- persistent-sqlite.cabal +1/−1
- test/main.hs +7/−6
ChangeLog.md view
@@ -1,5 +1,9 @@ # Changelog for persistent-sqlite +## 2.10.6.2++* Move template haskell splices to be correct (and GHC 8.10 compatible) [#1034](https://github.com/yesodweb/persistent/pull/1034)+ ## 2.10.6.1 * Missing `includes` and `install-includes` cabal fields added, to allow
Database/Persist/Sqlite.hs view
@@ -717,8 +717,6 @@ <*> 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 -- internals exposed by "Database.Sqlite.Internal"@@ -809,7 +807,6 @@ { _persistentBackend :: backend -- ^ The persistent backend , _rawSqliteConnection :: Sqlite.Connection -- ^ The underlying `Sqlite.Connection` }-makeLenses ''RawSqlite instance HasPersistBackend b => HasPersistBackend (RawSqlite b) where type BaseBackend (RawSqlite b) = BaseBackend b@@ -872,3 +869,6 @@ upsert rec = withReaderT _persistentBackend . upsert rec upsertBy uniq rec = withReaderT _persistentBackend . upsertBy uniq rec putMany = withReaderT _persistentBackend . putMany++makeLenses ''RawSqlite+makeLenses ''SqliteConnectionInfo
persistent-sqlite.cabal view
@@ -1,5 +1,5 @@ name: persistent-sqlite-version: 2.10.6.1+version: 2.10.6.2 license: MIT license-file: LICENSE author: Michael Snoyman <michael@snoyman.com>
test/main.hs view
@@ -209,12 +209,12 @@ MigrationTest.specsWith db it "issue #328" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do- runMigration migrateAll+ runMigrationSilent migrateAll _ <- 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- runMigration migrateAll+ runMigrationSilent migrateAll now <- liftIO getCurrentTime tid <- insert $ Test now Just (Test now') <- get tid@@ -225,15 +225,16 @@ Sqlite.close conn return () it "issue #527" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do- runMigration migrateAll+ runMigrationSilent migrateAll 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- runMigration compositeMigrateTest+ runMigrationSilent compositeSetup+ runMigrationSilent compositeMigrateTest+ pure () it "afterException" $ asIO $ runSqliteInfo (mkSqliteConnectionInfo ":memory:") $ do- runMigration testMigrate+ runMigrationSilent testMigrate let catcher :: forall m. Monad m => SomeException -> m () catcher _ = return () _ <- insert $ Person "A" 0 Nothing