Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
231 changes: 146 additions & 85 deletions persistent-mysql/Database/Persist/MySQL.hs

Large diffs are not rendered by default.

6 changes: 5 additions & 1 deletion persistent-mysql/test/main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ import qualified UniqueTest
import qualified UpsertTest
import qualified CustomConstraintTest
import qualified LongIdentifierTest
import qualified ForeignKey

type Tuple a b = (a, b)

Expand Down Expand Up @@ -102,7 +103,7 @@ instance Arbitrary (DataTypeTableGeneric backend) where
setup :: (HasCallStack, MonadUnliftIO m) => Migration -> ReaderT SqlBackend m ()
setup migration = do
printMigration migration
_ <- runMigrationSilent migration
_ <- runMigrationUnsafe migration
pure ()

main :: IO ()
Expand All @@ -128,8 +129,10 @@ main = do
, MigrationColumnLengthTest.migration
, TransactionLevelTest.migration
-- , LongIdentifierTest.migration
, ForeignKey.compositeMigrate
]
PersistentTest.cleanDB
ForeignKey.cleanDB

hspec $ do
xdescribe "This is pending on MySQL because you can't have DEFAULT CURRENT_DATE" $ do
Expand Down Expand Up @@ -178,6 +181,7 @@ main = do
UpsertTest.Don'tUpdateNull
UpsertTest.UpsertPreserveOldKey

ForeignKey.specsWith db
MpsNoPrefixTest.specsWith db
MpsCustomPrefixTest.specsWith db
EmptyEntityTest.specsWith db (Just (runMigrationSilent EmptyEntityTest.migration))
Expand Down
4 changes: 4 additions & 0 deletions persistent-postgresql/ChangeLog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## (Unreleased) 2.11.0.0

* Foreign Key improvements [#1121] https://github.com/yesodweb/persistent/pull/1121
* It is now supported to refer to a table with an auto generated Primary Kay
* It is now supported to refer to non-primary fields, using the keyword `References`

* Implement interval support. [#1053](https://github.com/yesodweb/persistent/pull/1053)
* [#1060](https://github.com/yesodweb/persistent/pull/1060)
* The QuasiQuoter now supports `OnDelete` and `OnUpdate` cascade options.
Expand Down
Loading