packages feed

persistent-postgresql 2.12.1.1 → 2.13.0.0

raw patch · 7 files changed

+267/−161 lines, 7 filesdep +http-api-datadep +path-piecesdep ~persistentPVP ok

version bump matches the API change (PVP)

Dependencies added: http-api-data, path-pieces

Dependency ranges changed: persistent

API changes (from Hackage documentation)

Files

ChangeLog.md view
@@ -1,5 +1,11 @@ # Changelog for persistent-postgresql ++## 2.13.0.0++* [#1225](https://github.com/yesodweb/persistent/pull/1225)+    * Support `persistent-2.13.0.0` making SQlBackend internal+ # 2.12.1.1  * [#1235](https://github.com/yesodweb/persistent/pull/1235)
Database/Persist/Postgresql.hs view
@@ -55,6 +55,8 @@ import qualified Database.PostgreSQL.Simple.TypeInfo.Static as PS import qualified Database.PostgreSQL.Simple.Types as PG +import Data.Proxy (Proxy(..))+import qualified Data.List.NonEmpty as NEL import Control.Arrow import Control.Exception (Exception, throw, throwIO) import Control.Monad@@ -103,6 +105,7 @@ import System.Environment (getEnvironment)  import Database.Persist.Sql+import Database.Persist.SqlBackend import qualified Database.Persist.Sql.Util as Util  -- | A @libpq@ connection string.  A simple example of connection@@ -348,14 +351,15 @@ -- and connection. createBackend :: LogFunc -> NonEmpty Word               -> IORef (Map.Map Text Statement) -> PG.Connection -> SqlBackend-createBackend logFunc serverVersion smap conn = do-    SqlBackend+createBackend logFunc serverVersion smap conn =+    maybe id setConnPutManySql (upsertFunction putManySql serverVersion) $+    maybe id setConnUpsertSql (upsertFunction upsertSql' serverVersion) $+    setConnInsertManySql insertManySql' $+    maybe id setConnRepsertManySql (upsertFunction repsertManySql serverVersion) $+    mkSqlBackend MkSqlBackendArgs         { connPrepare    = prepare' conn         , connStmtMap    = smap         , connInsertSql  = insertSql'-        , connInsertManySql = Just insertManySql'-        , connUpsertSql  = upsertFunction upsertSql' serverVersion-        , connPutManySql = upsertFunction putManySql serverVersion         , connClose      = PG.close conn         , connMigrateSql = migrate'         , connBegin      = \_ mIsolation -> case mIsolation of@@ -368,14 +372,12 @@         , connCommit     = const $ PG.commit   conn         , connRollback   = const $ PG.rollback conn         , connEscapeFieldName = escapeF-        , connEscapeTableName = escapeE . entityDB+        , connEscapeTableName = escapeE . getEntityDBName         , connEscapeRawName = escape         , connNoLimit    = "LIMIT ALL"         , connRDBMS      = "postgresql"         , connLimitOffset = decorateSQLWithLimitOffset "LIMIT ALL"         , connLogFunc = logFunc-        , connMaxParams = Nothing-        , connRepsertManySql = upsertFunction repsertManySql serverVersion         }  prepare' :: PG.Connection -> Text -> IO Statement@@ -390,15 +392,17 @@  insertSql' :: EntityDef -> [PersistValue] -> InsertSqlResult insertSql' ent vals =-    case entityPrimary ent of-        Just _pdef -> ISRManyKeys sql vals-        Nothing -> ISRSingle (sql <> " RETURNING " <> escapeF (fieldDB (entityId ent)))+    case getEntityId ent of+        EntityIdNaturalKey _pdef ->+            ISRManyKeys sql vals+        EntityIdField field ->+            ISRSingle (sql <> " RETURNING " <> escapeF (fieldDB field))   where     (fieldNames, placeholders) = unzip (Util.mkInsertPlaceholders ent escapeF)     sql = T.concat         [ "INSERT INTO "-        , escapeE $ entityDB ent-        , if null (entityFields ent)+        , escapeE $ getEntityDBName ent+        , if null (getEntityFieldsDatabase ent)             then " DEFAULT VALUES"             else T.concat                 [ "("@@ -413,7 +417,7 @@ upsertSql' ent uniqs updateVal =     T.concat         [ "INSERT INTO "-        , escapeE (entityDB ent)+        , escapeE (getEntityDBName ent)         , "("         , T.intercalate "," fieldNames         , ") VALUES ("@@ -432,7 +436,7 @@     wher = T.intercalate " AND " $ map (singleClause . snd) $ NEL.toList uniqs      singleClause :: FieldNameDB -> Text-    singleClause field = escapeE (entityDB ent) <> "." <> (escapeF field) <> " =?"+    singleClause field = escapeE (getEntityDBName ent) <> "." <> (escapeF field) <> " =?"  -- | SQL for inserting multiple rows at once and returning their primary keys. insertManySql' :: EntityDef -> [[PersistValue]] -> InsertSqlResult@@ -442,13 +446,13 @@     (fieldNames, placeholders)= unzip (Util.mkInsertPlaceholders ent escapeF)     sql = T.concat         [ "INSERT INTO "-        , escapeE (entityDB ent)+        , escapeE (getEntityDBName ent)         , "("         , T.intercalate "," fieldNames         , ") VALUES ("         , T.intercalate "),(" $ replicate (length valss) $ T.intercalate "," placeholders         , ") RETURNING "-        , Util.commaSeparated $ Util.dbIdColumnsEsc escapeF ent+        , Util.commaSeparated $ NEL.toList $ Util.dbIdColumnsEsc escapeF ent         ]  @@ -789,7 +793,7 @@             return $ Right $ migrationText exists' old''         (errs, _) -> return $ Left errs   where-    name = entityDB entity+    name = getEntityDBName entity     (newcols', udefs, fdefs) = postgresMkColumns allDefs entity     migrationText exists' old''         | not exists' =@@ -827,7 +831,7 @@     -> Maybe AlterDB mkForeignAlt entity fdef = pure $ AlterColumn tableName_ addReference   where-    tableName_ = entityDB entity+    tableName_ = getEntityDBName entity     addReference =         AddReference             (foreignRefTableDBName fdef)@@ -860,23 +864,23 @@             Just _ ->                 cols             _ ->-                filter (\c -> cName c /= fieldDB (entityId entity) ) cols+                filter (\c -> Just (cName c) /= fmap fieldDB (getEntityIdField entity) ) cols      name =-        entityDB entity+        getEntityDBName entity     idtxt =-        case entityPrimary entity of-            Just pdef ->+        case getEntityId entity of+            EntityIdNaturalKey pdef ->                 T.concat                     [ " PRIMARY KEY ("-                    , T.intercalate "," $ map (escapeF . fieldDB) $ compositeFields pdef+                    , T.intercalate "," $ map (escapeF . fieldDB) $ NEL.toList $ compositeFields pdef                     , ")"                     ]-            Nothing ->-                let defText = defaultAttribute $ fieldAttrs $ entityId entity-                    sType = fieldSqlType $ entityId entity+            EntityIdField field ->+                let defText = defaultAttribute $ fieldAttrs field+                    sType = fieldSqlType field                 in  T.concat-                        [ escapeF $ fieldDB (entityId entity)+                        [ escapeF $ fieldDB field                         , maySerial sType defText                         , " PRIMARY KEY UNIQUE"                         , mayDefault defText@@ -947,7 +951,7 @@      stmt <- getter sqlv     let vals =-            [ PersistText $ unEntityNameDB $ entityDB def+            [ PersistText $ unEntityNameDB $ getEntityDBName def             ]     columns <- with (stmtQuery stmt vals) (\src -> runConduit $ src .| processColumns .| CL.consume)     let sqlc = T.concat@@ -994,7 +998,7 @@                $ groupBy ((==) `on` fst) rows     processColumns =         CL.mapM $ \x'@((PersistText cname) : _) -> do-            col <- liftIO $ getColumn getter (entityDB def) x' (Map.lookup cname refMap)+            col <- liftIO $ getColumn getter (getEntityDBName def) x' (Map.lookup cname refMap)             pure $ case col of                 Left e -> Left e                 Right c -> Right $ Left c@@ -1005,7 +1009,7 @@ safeToRemove def (FieldNameDB colName)     = any (elem FieldAttrSafeToRemove . fieldAttrs)     $ filter ((== FieldNameDB colName) . fieldDB)-    $ keyAndEntityFields def+    $ NEL.toList $ keyAndEntityFields def  getAlters :: [EntityDef]           -> EntityDef@@ -1248,15 +1252,15 @@                  refAdd Nothing = []                 refAdd (Just colRef) =-                    case find ((== crTableName colRef) . entityDB) defs of+                    case find ((== crTableName colRef) . getEntityDBName) defs of                         Just refdef-                            | _oldName /= fieldDB (entityId edef)+                            | Just _oldName /= fmap fieldDB (getEntityIdField edef)                             ->                             [AddReference-                                (entityDB edef)+                                (getEntityDBName edef)                                 (crConstraintName colRef)                                 [name]-                                (Util.dbIdColumnsEsc escapeF refdef)+                                (NEL.toList $ Util.dbIdColumnsEsc escapeF refdef)                                 (crFieldCascade colRef)                             ]                         Just _ -> []@@ -1269,7 +1273,7 @@                         else refDrop ref' ++ refAdd ref                 modNull = case (isNull, isNull') of                             (True, False) ->  do-                                guard $ name /= fieldDB (entityId edef)+                                guard $ Just name /= fmap fieldDB (getEntityIdField edef)                                 pure (IsNull col)                             (False, True) ->                                 let up = case def of@@ -1328,19 +1332,19 @@     -> ColumnReference     -> Maybe AlterDB getAddReference allDefs entity cname cr@ColumnReference {crTableName = s, crConstraintName=constraintName} = do-    guard $ cname /= fieldDB (entityId entity)+    guard $ Just cname /= fmap fieldDB (getEntityIdField entity)     pure $ AlterColumn         table         (AddReference s constraintName [cname] id_ (crFieldCascade cr)         )   where-    table = entityDB entity+    table = getEntityDBName entity     id_ =         fromMaybe             (error $ "Could not find ID of entity " ++ show s)             $ do-                entDef <- find ((== s) . entityDB) allDefs-                return $ Util.dbIdColumnsEsc escapeF entDef+                entDef <- find ((== s) . getEntityDBName) allDefs+                return $ NEL.toList $ Util.dbIdColumnsEsc escapeF entDef  showColumn :: Column -> Text showColumn (Column n nu sqlType' def gen _defConstraintName _maxLen _ref) = T.concat@@ -1661,7 +1665,7 @@ maximumIdentifierLength = 63  udToPair :: UniqueDef -> (ConstraintNameDB, [FieldNameDB])-udToPair ud = (uniqueDBName ud, map snd $ uniqueFields ud)+udToPair ud = (uniqueDBName ud, map snd $ NEL.toList $ uniqueFields ud)  mockMigrate :: [EntityDef]          -> (Text -> IO Statement)@@ -1672,7 +1676,7 @@         ([], old'') -> return $ Right $ migrationText False old''         (errs, _) -> return $ Left errs   where-    name = entityDB entity+    name = getEntityDBName entity     migrationText exists' old'' =         if not exists'             then createText newcols fdefs udspair@@ -1706,49 +1710,46 @@ -- with the difference that an actual database is not needed. mockMigration :: Migration -> IO () mockMigration mig = do-  smap <- newIORef $ Map.empty-  let sqlbackend = SqlBackend { connPrepare = \_ -> do-                                             return Statement-                                                        { stmtFinalize = return ()-                                                        , stmtReset = return ()-                                                        , stmtExecute = undefined-                                                        , stmtQuery = \_ -> return $ return ()-                                                        },-                             connInsertManySql = Nothing,-                             connInsertSql = undefined,-                             connUpsertSql = Nothing,-                             connPutManySql = Nothing,-                             connStmtMap = smap,-                             connClose = undefined,-                             connMigrateSql = mockMigrate,-                             connBegin = undefined,-                             connCommit = undefined,-                             connRollback = undefined,-                             connEscapeFieldName = escapeF,-                             connEscapeTableName = escapeE . entityDB,-                             connEscapeRawName = escape,-                             connNoLimit = undefined,-                             connRDBMS = undefined,-                             connLimitOffset = undefined,-                             connLogFunc = undefined,-                             connMaxParams = Nothing,-                             connRepsertManySql = Nothing-                             }-      result = runReaderT $ runWriterT $ runWriterT mig-  resp <- result sqlbackend-  mapM_ T.putStrLn $ map snd $ snd resp+    smap <- newIORef $ Map.empty+    let sqlbackend =+            mkSqlBackend MkSqlBackendArgs+                { connPrepare = \_ -> do+                    return Statement+                        { stmtFinalize = return ()+                        , stmtReset = return ()+                        , stmtExecute = undefined+                        , stmtQuery = \_ -> return $ return ()+                        }+                , connInsertSql = undefined+                , connStmtMap = smap+                , connClose = undefined+                , connMigrateSql = mockMigrate+                , connBegin = undefined+                , connCommit = undefined+                , connRollback = undefined+                , connEscapeFieldName = escapeF+                , connEscapeTableName = escapeE . getEntityDBName+                , connEscapeRawName = escape+                , connNoLimit = undefined+                , connRDBMS = undefined+                , connLimitOffset = undefined+                , connLogFunc = undefined+                }+        result = runReaderT $ runWriterT $ runWriterT mig+    resp <- result sqlbackend+    mapM_ T.putStrLn $ map snd $ snd resp  putManySql :: EntityDef -> Int -> Text putManySql ent n = putManySql' conflictColumns fields ent n   where-    fields = entityFields ent-    conflictColumns = concatMap (map (escapeF . snd) . uniqueFields) (entityUniques ent)+    fields = getEntityFieldsDatabase ent+    conflictColumns = concatMap (map (escapeF . snd) . NEL.toList . uniqueFields) (getEntityUniques ent)  repsertManySql :: EntityDef -> Int -> Text repsertManySql ent n = putManySql' conflictColumns fields ent n   where-    fields = keyAndEntityFields ent-    conflictColumns = escapeF . fieldDB <$> entityKeyFields ent+    fields = NEL.toList $ keyAndEntityFields ent+    conflictColumns = NEL.toList $ escapeF . fieldDB <$> getEntityKeyFields ent  -- | This type is used to determine how to update rows using Postgres' -- @INSERT ... ON CONFLICT KEY UPDATE@ functionality, exposed via@@ -1860,11 +1861,7 @@ upsertManyWhere [] _ _ _ = return () upsertManyWhere records fieldValues updates filters = do     conn <- asks projectBackend-    let uniqDef = -- onlyOneUniqueDef (Nothing :: Maybe record)-            case entityUniques (entityDef (Nothing :: Maybe record)) of-                [uniq] -> uniq-                _ -> error "impossible due to OnlyOneUniqueKey constraint"-            -- TODO: use onlyOneUniqueDef when it's exported+    let uniqDef = onlyOneUniqueDef (Proxy :: Proxy record)     uncurry rawExecute $         mkBulkUpsertQuery records conn fieldValues updates filters uniqDef @@ -1927,12 +1924,12 @@     fieldDbToText = escapeF . fieldDB     entityDef' = entityDef records     conflictColumns =-        map (escapeF . snd) $ uniqueFields uniqDef+        map (escapeF . snd) $ NEL.toList $ uniqueFields uniqDef     firstField = case entityFieldNames of         [] -> error "The entity you're trying to insert does not have any fields."         (field:_) -> field-    entityFieldNames = map fieldDbToText (entityFields entityDef')-    nameOfTable = escapeE . entityDB $ entityDef'+    entityFieldNames = map fieldDbToText (getEntityFieldsDatabase entityDef')+    nameOfTable = escapeE . getEntityDBName $ entityDef'     copyUnlessValues = map snd fieldsToMaybeCopy     recordValues = concatMap (map toPersistValue . toPersistFields) records     recordPlaceholders =@@ -1994,7 +1991,7 @@     fieldDbToText = escapeF . fieldDB     mkAssignment f = T.concat [f, "=EXCLUDED.", f] -    table = escapeE . entityDB $ ent+    table = escapeE . getEntityDBName $ ent     columns = Util.commaSeparated $ map fieldDbToText fields     placeholders = map (const "?") fields     updates = map (mkAssignment . fieldDbToText) fields@@ -2025,7 +2022,5 @@  postgresMkColumns :: [EntityDef] -> EntityDef -> ([Column], [UniqueDef], [ForeignDef]) postgresMkColumns allDefs t =-    mkColumns allDefs t (emptyBackendSpecificOverrides-        { backendSpecificForeignKeyName = Just refName-        }-    )+    mkColumns allDefs t+    $ setBackendSpecificForeignKeyName refName emptyBackendSpecificOverrides
persistent-postgresql.cabal view
@@ -1,5 +1,5 @@ name:            persistent-postgresql-version:         2.12.1.1+version:         2.13.0.0 license:         MIT license-file:    LICENSE author:          Felipe Lessa, Michael Snoyman <michael@snoyman.com>@@ -16,7 +16,7 @@  library     build-depends:   base                  >= 4.9      && < 5-                   , persistent            >= 2.12.1.0 && < 2.13+                   , persistent            >= 2.13     && < 3                    , aeson                 >= 1.0                    , attoparsec                    , blaze-builder@@ -54,6 +54,7 @@                      CustomConstraintTest                      PgIntervalTest                      UpsertWhere+                     ImplicitUuidSpec     ghc-options:     -Wall      build-depends:   base                 >= 4.9 && < 5@@ -76,6 +77,8 @@                    , text                    , time                    , transformers+                   , path-pieces+                   , http-api-data                    , unliftio-core                    , unliftio                    , unordered-containers
test/ArrayAggTest.hs view
@@ -43,7 +43,7 @@             , UserPT "c" $ Just "d"             , UserPT "e"   Nothing             , UserPT "g" $ Just "h" ]-          escape <- asks connEscapeRawName+          escape <- getEscapeRawNameFunction           let query = T.concat [ "SELECT array_agg(", escape dbField, ") "                                , "FROM ", escape "UserPT"                                ]
+ test/ImplicitUuidSpec.hs view
@@ -0,0 +1,75 @@+{-# LANGUAGE DataKinds #-}+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE ExistentialQuantification #-}+{-# LANGUAGE FlexibleInstances #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-}+{-# LANGUAGE MultiParamTypeClasses #-}+{-# LANGUAGE OverloadedStrings #-}+{-# LANGUAGE QuasiQuotes #-}+{-# LANGUAGE StandaloneDeriving #-}+{-# LANGUAGE TemplateHaskell #-}+{-# LANGUAGE TypeApplications #-}+{-# LANGUAGE TypeFamilies #-}+{-# LANGUAGE UndecidableInstances #-}++module ImplicitUuidSpec where++import PgInit++import Data.Proxy+import Database.Persist.Postgresql++import Database.Persist.ImplicitIdDef+import Database.Persist.ImplicitIdDef.Internal (fieldTypeFromTypeable)++share+    [ mkPersist (sqlSettingsUuid "uuid_generate_v1mc()")+    , mkEntityDefList "entities"+    ]+    [persistLowerCase|++WithDefUuid+    name        Text sqltype=varchar(80)++    deriving Eq Show Ord++|]++implicitUuidMigrate :: Migration+implicitUuidMigrate = do+    runSqlCommand $ rawExecute "CREATE EXTENSION IF NOT EXISTS \"uuid-ossp\"" []+    migrateModels entities++wipe :: IO ()+wipe = runConnAssert $ do+    rawExecute "DROP TABLE with_def_uuid;" []+    runMigration implicitUuidMigrate++itDb :: String -> SqlPersistT (LoggingT (ResourceT IO)) a -> SpecWith (Arg (IO ()))+itDb msg action = it msg $ runConnAssert $ void action++pass :: IO ()+pass = pure ()++spec :: Spec+spec = describe "ImplicitUuidSpec" $ before_ wipe $ do+    describe "WithDefUuidKey" $ do+        it "works on UUIDs" $ do+            let withDefUuidKey = WithDefUuidKey (UUID "Hello")+            pass+    describe "getEntityId" $ do+        let Just idField = getEntityIdField (entityDef (Proxy @WithDefUuid))+        it "has a UUID SqlType" $ asIO $ do+            fieldSqlType idField `shouldBe` SqlOther "UUID"+        it "is an implicit ID column" $ asIO $ do+            fieldIsImplicitIdColumn idField `shouldBe` True++    describe "insert" $ do+        itDb "successfully has a default" $ do+            let matt = WithDefUuid+                    { withDefUuidName =+                        "Matt"+                    }+            k <- insert matt+            mrec <- get k+            mrec `shouldBe` Just matt
test/PgInit.hs view
@@ -1,3 +1,5 @@+{-# LANGUAGE DerivingStrategies #-}+{-# LANGUAGE GeneralizedNewtypeDeriving #-} {-# LANGUAGE OverloadedStrings #-} {-# LANGUAGE ScopedTypeVariables #-} {-# OPTIONS_GHC -fno-warn-orphans #-}@@ -18,6 +20,7 @@     , module Control.Monad.Trans.Reader     , module Control.Monad     , module Database.Persist.Sql+    , module Database.Persist.SqlBackend     , module Database.Persist     , module Database.Persist.Sql.Raw.QQ     , module Init@@ -27,12 +30,16 @@     , BS.ByteString     , Int32, Int64     , liftIO-    , mkPersist, mkMigrate, share, sqlSettings, persistLowerCase, persistUpperCase+    , mkPersist, migrateModels, mkMigrate, share, sqlSettings, persistLowerCase, persistUpperCase+    , mkEntityDefList+    , setImplicitIdDef     , SomeException     , Text     , TestFn(..)     , LoggingT     , ResourceT+    , UUID(..)+    , sqlSettingsUuid     ) where  import Init@@ -53,37 +60,54 @@        , (==@)        , (@/=)        , (@==)+       , UUID(..)+       , sqlSettingsUuid        )  -- re-exports import Control.Exception (SomeException) import Control.Monad (forM_, liftM, replicateM, void, when) import Control.Monad.Trans.Reader-import Data.Aeson (Value(..))+import Data.Aeson (ToJSON, FromJSON, Value(..)) import Database.Persist.Postgresql.JSON () import Database.Persist.Sql.Raw.QQ+import Database.Persist.SqlBackend import Database.Persist.TH        ( MkPersistSettings(..)        , mkMigrate+       , migrateModels        , mkPersist        , persistLowerCase        , persistUpperCase        , share        , sqlSettings+       , setImplicitIdDef+       , mkEntityDefList        ) import Test.Hspec-       (Spec, afterAll_, before, beforeAll, describe, fdescribe, fit, it,-       before_, SpecWith, Arg, hspec)+       ( Arg+       , Spec+       , SpecWith+       , afterAll_+       , before+       , beforeAll+       , before_+       , describe+       , fdescribe+       , fit+       , hspec+       , it+       ) import Test.Hspec.Expectations.Lifted import Test.QuickCheck.Instances () import UnliftIO+import qualified Data.Text.Encoding as TE  -- testing import Test.HUnit (Assertion, assertBool, assertFailure, (@=?), (@?=)) import Test.QuickCheck  import Control.Monad (unless, (>=>))- import Control.Monad.IO.Unlift (MonadUnliftIO) import Control.Monad.Logger import Control.Monad.Trans.Resource (ResourceT, runResourceT)
test/main.hs view
@@ -20,6 +20,7 @@ import Data.Time import Test.QuickCheck +import qualified ImplicitUuidSpec import qualified ArrayAggTest import qualified CompositeTest import qualified ForeignKey@@ -130,74 +131,76 @@       , MigrationTest.migrationMigrate       , PgIntervalTest.pgIntervalMigrate       , UpsertWhere.upsertWhereMigrate+      , ImplicitUuidSpec.implicitUuidMigrate       ]     PersistentTest.cleanDB     ForeignKey.cleanDB    hspec $ do-    RenameTest.specsWith runConnAssert-    DataTypeTest.specsWith runConnAssert-        (Just (runMigrationSilent dataTypeMigrate))-        [ TestFn "text" dataTypeTableText-        , TestFn "textMaxLen" dataTypeTableTextMaxLen-        , TestFn "bytes" dataTypeTableBytes-        , TestFn "bytesTextTuple" dataTypeTableBytesTextTuple-        , TestFn "bytesMaxLen" dataTypeTableBytesMaxLen-        , TestFn "int" dataTypeTableInt-        , TestFn "intList" dataTypeTableIntList-        , TestFn "intMap" dataTypeTableIntMap-        , TestFn "bool" dataTypeTableBool-        , TestFn "day" dataTypeTableDay-        , TestFn "time" (DataTypeTest.roundTime . dataTypeTableTime)-        , TestFn "utc" (DataTypeTest.roundUTCTime . dataTypeTableUtc)-        , TestFn "jsonb" dataTypeTableJsonb-        ]-        [ ("pico", dataTypeTablePico) ]-        dataTypeTableDouble-    HtmlTest.specsWith-        runConnAssert-        (Just (runMigrationSilent HtmlTest.htmlMigrate))+      ImplicitUuidSpec.spec+      RenameTest.specsWith runConnAssert+      DataTypeTest.specsWith runConnAssert+          (Just (runMigrationSilent dataTypeMigrate))+          [ TestFn "text" dataTypeTableText+          , TestFn "textMaxLen" dataTypeTableTextMaxLen+          , TestFn "bytes" dataTypeTableBytes+          , TestFn "bytesTextTuple" dataTypeTableBytesTextTuple+          , TestFn "bytesMaxLen" dataTypeTableBytesMaxLen+          , TestFn "int" dataTypeTableInt+          , TestFn "intList" dataTypeTableIntList+          , TestFn "intMap" dataTypeTableIntMap+          , TestFn "bool" dataTypeTableBool+          , TestFn "day" dataTypeTableDay+          , TestFn "time" (DataTypeTest.roundTime . dataTypeTableTime)+          , TestFn "utc" (DataTypeTest.roundUTCTime . dataTypeTableUtc)+          , TestFn "jsonb" dataTypeTableJsonb+          ]+          [ ("pico", dataTypeTablePico) ]+          dataTypeTableDouble+      HtmlTest.specsWith+          runConnAssert+          (Just (runMigrationSilent HtmlTest.htmlMigrate)) -    EmbedTest.specsWith runConnAssert-    EmbedOrderTest.specsWith runConnAssert-    LargeNumberTest.specsWith runConnAssert-    ForeignKey.specsWith runConnAssert-    UniqueTest.specsWith runConnAssert-    MaxLenTest.specsWith runConnAssert-    Recursive.specsWith runConnAssert-    SumTypeTest.specsWith runConnAssert (Just (runMigrationSilent SumTypeTest.sumTypeMigrate))-    MigrationTest.specsWith runConnAssert-    MigrationOnlyTest.specsWith runConnAssert+      EmbedTest.specsWith runConnAssert+      EmbedOrderTest.specsWith runConnAssert+      LargeNumberTest.specsWith runConnAssert+      ForeignKey.specsWith runConnAssert+      UniqueTest.specsWith runConnAssert+      MaxLenTest.specsWith runConnAssert+      Recursive.specsWith runConnAssert+      SumTypeTest.specsWith runConnAssert (Just (runMigrationSilent SumTypeTest.sumTypeMigrate))+      MigrationTest.specsWith runConnAssert+      MigrationOnlyTest.specsWith runConnAssert -        (Just-            $ runMigrationSilent MigrationOnlyTest.migrateAll1-            >> runMigrationSilent MigrationOnlyTest.migrateAll2-        )-    PersistentTest.specsWith runConnAssert-    ReadWriteTest.specsWith runConnAssert-    PersistentTest.filterOrSpecs runConnAssert-    RawSqlTest.specsWith runConnAssert-    UpsertTest.specsWith-        runConnAssert-        UpsertTest.Don'tUpdateNull-        UpsertTest.UpsertPreserveOldKey+          (Just+              $ runMigrationSilent MigrationOnlyTest.migrateAll1+              >> runMigrationSilent MigrationOnlyTest.migrateAll2+          )+      PersistentTest.specsWith runConnAssert+      ReadWriteTest.specsWith runConnAssert+      PersistentTest.filterOrSpecs runConnAssert+      RawSqlTest.specsWith runConnAssert+      UpsertTest.specsWith+          runConnAssert+          UpsertTest.Don'tUpdateNull+          UpsertTest.UpsertPreserveOldKey -    MpsNoPrefixTest.specsWith runConnAssert-    MpsCustomPrefixTest.specsWith runConnAssert-    EmptyEntityTest.specsWith runConnAssert (Just (runMigrationSilent EmptyEntityTest.migration))-    CompositeTest.specsWith runConnAssert-    TreeTest.specsWith runConnAssert-    PersistUniqueTest.specsWith runConnAssert-    PrimaryTest.specsWith runConnAssert-    CustomPersistFieldTest.specsWith runConnAssert-    CustomPrimaryKeyReferenceTest.specsWith runConnAssert-    MigrationColumnLengthTest.specsWith runConnAssert-    EquivalentTypeTestPostgres.specs-    TransactionLevelTest.specsWith runConnAssert-    LongIdentifierTest.specsWith runConnAssertUseConf -- Have at least one test use the conf variant of connecting to Postgres, to improve test coverage.-    JSONTest.specs-    CustomConstraintTest.specs-    UpsertWhere.specs-    PgIntervalTest.specs-    ArrayAggTest.specs-    GeneratedColumnTestSQL.specsWith runConnAssert+      MpsNoPrefixTest.specsWith runConnAssert+      MpsCustomPrefixTest.specsWith runConnAssert+      EmptyEntityTest.specsWith runConnAssert (Just (runMigrationSilent EmptyEntityTest.migration))+      CompositeTest.specsWith runConnAssert+      TreeTest.specsWith runConnAssert+      PersistUniqueTest.specsWith runConnAssert+      PrimaryTest.specsWith runConnAssert+      CustomPersistFieldTest.specsWith runConnAssert+      CustomPrimaryKeyReferenceTest.specsWith runConnAssert+      MigrationColumnLengthTest.specsWith runConnAssert+      EquivalentTypeTestPostgres.specs+      TransactionLevelTest.specsWith runConnAssert+      LongIdentifierTest.specsWith runConnAssertUseConf -- Have at least one test use the conf variant of connecting to Postgres, to improve test coverage.+      JSONTest.specs+      CustomConstraintTest.specs+      UpsertWhere.specs+      PgIntervalTest.specs+      ArrayAggTest.specs+      GeneratedColumnTestSQL.specsWith runConnAssert