Skip to content

Commit 8650662

Browse files
committed
Merge origin/master into getByNullDocumentation
2 parents 1c66f6e + bb5b7b5 commit 8650662

19 files changed

Lines changed: 2195 additions & 1098 deletions

File tree

.github/workflows/haskell.yml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -86,7 +86,6 @@ jobs:
8686
restore-keys: |
8787
${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
8888
${{ runner.os }}-${{ matrix.ghc }}-
89-
- run: cabal v2-build all --disable-optimization --only-dependencies $CONFIG
9089
- run: cabal v2-build all --disable-optimization $CONFIG
9190
- run: cabal v2-test all --disable-optimization $CONFIG --test-options "--fail-on-focus"
9291
- run: cabal v2-bench all --disable-optimization $CONFIG

cabal.project

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ allow-newer:
1818
, postgresql-simple:base
1919
, postgresql-simple:template-haskell
2020
, bytestring-lexing:base
21+
, postgresql-simple-interval:persistent
2122

2223
source-repository-package
2324
type: git

persistent-mysql/ChangeLog.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
# Changelog for persistent-mysql
22

3+
## 2.13.1.6
4+
5+
* [#1610](https://github.com/yesodweb/persistent/pull/1610)
6+
* Added `NoAction` as a `CascadeAction`
7+
38
## 2.13.1.5
49

510
* [#1526](https://github.com/yesodweb/persistent/pull/1526)

persistent-mysql/Database/Persist/MySQL.hs

Lines changed: 11 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -854,7 +854,7 @@ getColumn
854854
"CASCADE" -> Just Cascade
855855
"SET NULL" -> Just SetNull
856856
"SET DEFAULT" -> Just SetDefault
857-
"NO ACTION" -> Nothing
857+
"NO ACTION" -> Just NoAction
858858
_ ->
859859
error $ "Unexpected value in parseCascadeAction: " <> show txt
860860

@@ -1506,15 +1506,18 @@ data HandleUpdateCollision record where
15061506
-- | Only copy the field if it is not equal to the provided value.
15071507
CopyUnlessEq
15081508
:: (PersistField typ)
1509-
=> EntityField record typ -> typ -> HandleUpdateCollision record
1509+
=> EntityField record typ
1510+
-> typ
1511+
-> HandleUpdateCollision record
15101512

15111513
-- | Copy the field into the database only if the value in the
15121514
-- corresponding record is non-@NULL@.
15131515
--
15141516
-- @since 2.6.2
15151517
copyUnlessNull
15161518
:: (PersistField typ)
1517-
=> EntityField record (Maybe typ) -> HandleUpdateCollision record
1519+
=> EntityField record (Maybe typ)
1520+
-> HandleUpdateCollision record
15181521
copyUnlessNull field = CopyUnlessEq field Nothing
15191522

15201523
-- | Copy the field into the database only if the value in the
@@ -1527,7 +1530,8 @@ copyUnlessNull field = CopyUnlessEq field Nothing
15271530
-- @since 2.6.2
15281531
copyUnlessEmpty
15291532
:: (Monoid.Monoid typ, PersistField typ)
1530-
=> EntityField record typ -> HandleUpdateCollision record
1533+
=> EntityField record typ
1534+
-> HandleUpdateCollision record
15311535
copyUnlessEmpty field = CopyUnlessEq field Monoid.mempty
15321536

15331537
-- | Copy the field into the database only if the field is not equal to the
@@ -1540,7 +1544,9 @@ copyUnlessEmpty field = CopyUnlessEq field Monoid.mempty
15401544
-- @since 2.6.2
15411545
copyUnlessEq
15421546
:: (PersistField typ)
1543-
=> EntityField record typ -> typ -> HandleUpdateCollision record
1547+
=> EntityField record typ
1548+
-> typ
1549+
-> HandleUpdateCollision record
15441550
copyUnlessEq = CopyUnlessEq
15451551

15461552
-- | Copy the field directly from the record.

persistent-mysql/persistent-mysql.cabal

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
name: persistent-mysql
2-
version: 2.13.1.5
2+
version: 2.13.1.6
33
license: MIT
44
license-file: LICENSE
55
author: Felipe Lessa <felipe.lessa@gmail.com>, Michael Snoyman
@@ -40,7 +40,7 @@ library
4040
, monad-logger
4141
, mysql >=0.2.1 && <0.3
4242
, mysql-simple >=0.4.7 && <0.5
43-
, persistent >=2.13.3 && <3
43+
, persistent >=2.18 && <3
4444
, resource-pool
4545
, resourcet >=1.1
4646
, text >=1.2

persistent-postgresql/ChangeLog.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,30 @@
11
# Changelog for persistent-postgresql
22

3+
# 2.14.2.0
4+
5+
* [#1614](https://github.com/yesodweb/persistent/pull/1614)
6+
* Generate migrations to create foreign key constraints while adding new foreign key columns (previously you had to generate migrations twice to create foreign key constraints)
7+
8+
# 2.14.1.0
9+
10+
* [#1612](https://github.com/yesodweb/persistent/pull/1612)
11+
* Speed up migrations by avoiding N+1 queries.
12+
You can now migrate a large set of entities much faster, by using the new `migrateEntitiesStructured` function.
13+
14+
# 2.14.0.1
15+
16+
* [#1610](https://github.com/yesodweb/persistent/pull/1610)
17+
* Update suggested migrations to handle `NoAction` as a `CascadeAction`
18+
19+
## 2.14.0.0
20+
21+
* [#1604](https://github.com/yesodweb/persistent/pull/1604)
22+
* Changed the representation of intervals to use the `Interval` type from [the `postgresql-simple-interval` package](https://hackage.haskell.org/package/postgresql-simple-interval).
23+
This changes the behavior of `PgInterval` for very small and very large values.
24+
* Previously `PgInterval 0.000_000_9` would be rounded to `0.000_001` seconds, but now it is truncated to 0 seconds.
25+
* Previously `PgInterval 9_223_372_036_854.775_808` would overflow and throw a SQL error, but now it saturates to `9_223_372_036_854.775_807` seconds.
26+
* The SQL representation of `PgInterval` now always includes the `interval` prefix, like `interval '1 second'`.
27+
328
## 2.13.7.0
429

530
* [#1600](https://github.com/yesodweb/persistent/pull/1600)

0 commit comments

Comments
 (0)