persistent-postgresql 1.1.0 → 1.1.1
raw patch · 2 files changed
+7/−3 lines, 2 files
Files
Database/Persist/Postgresql.hs view
@@ -177,8 +177,9 @@ LibPQ.TuplesOk -> return () _ -> do msg <- LibPQ.resStatus status+ mmsg <- LibPQ.resultErrorMessage ret fail $ "Postgresql.withStmt': bad result status " ++- show status ++ " (" ++ show msg ++ ")"+ show status ++ " (" ++ (maybe (show msg) (show . (,) msg) mmsg) ++ ")" -- Get number and type of columns cols <- LibPQ.nfields ret@@ -372,7 +373,7 @@ getAltersU :: [(DBName, [DBName])] -> [(DBName, [DBName])] -> [AlterTable]- getAltersU [] old = map (DropConstraint . fst) old+ getAltersU [] old = map DropConstraint $ filter (not . isManual) $ map fst old getAltersU ((name, cols):news) old = case lookup name old of Nothing -> AddUniqueConstraint name cols : getAltersU news old@@ -383,6 +384,9 @@ else DropConstraint name : AddUniqueConstraint name cols : getAltersU news old'++ -- Don't drop constraints which were manually added.+ isManual (DBName x) = "__manual_" `T.isPrefixOf` x getColumn :: (Text -> IO Statement) -> DBName -> [PersistValue]
persistent-postgresql.cabal view
@@ -1,5 +1,5 @@ name: persistent-postgresql-version: 1.1.0+version: 1.1.1 license: MIT license-file: LICENSE author: Felipe Lessa, Michael Snoyman <michael@snoyman.com>