Permalink
Browse files

Merge branch 'maintain/1.0'

Conflicts:
	persistent-postgresql/persistent-postgresql.cabal
  • Loading branch information...
2 parents 507091d + 964f34d commit cbee3337403a013b23ac72232d3d53623af630b4 @snoyberg snoyberg committed Dec 5, 2012
@@ -373,7 +373,7 @@ getAlters (c1, u1) (c2, u2) =
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
@@ -385,6 +385,9 @@ getAlters (c1, u1) (c2, u2) =
: 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]
-> IO (Either Text Column)
@@ -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>

0 comments on commit cbee333

Please sign in to comment.