1
0
mirror of https://github.com/django/django.git synced 2024-12-30 21:16:26 +00:00
Commit Graph

16 Commits

Author SHA1 Message Date
Simon Charette
3a1863319c [4.2.x] Fixed #34754 -- Fixed JSONField check constraints validation on NULL values.
The __isnull lookup of JSONField must special case
Value(None, JSONField()) left-hand-side in order to be coherent with
its convoluted null handling.

Since psycopg>=3 offers no way to pass a NULL::jsonb the issue is
resolved by optimizing IsNull(Value(None), True | False) to
True | False.

Regression in 5c23d9f0c3.

Thanks Alexandre Collet for the report.

Backport of 3434dbd39d from main
2023-08-04 10:58:53 +02:00
Gagaro
667105877e Fixed #30581 -- Added support for Meta.constraints validation.
Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
2022-05-10 11:22:23 +02:00
Mariusz Felisiak
27b07a3246
Refs #30581 -- Moved CheckConstraint tests for conditional expressions to migrations.test_operations.
This allows avoiding warning in tests about using RawSQL in
CheckConstraints.
2022-05-05 06:44:34 +02:00
django-bot
9c19aff7c7 Refs #33476 -- Reformatted code with Black. 2022-02-07 20:37:05 +01:00
Mariusz Felisiak
f4e93919e4
Fixed #31815 -- Fixed schema value encoding on PostgreSQL. 2020-07-27 06:39:02 +02:00
Mariusz Felisiak
f83b44075d Refs #30913 -- Added system checks for covering indexes and unique constraints support. 2020-06-04 12:26:25 +02:00
Hannes Ljungberg
8c7992f658 Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+. 2020-06-04 12:26:22 +02:00
Ian Foote
c226c6cb32 Fixed #20581 -- Added support for deferrable unique constraints. 2020-04-30 10:43:50 +02:00
Mariusz Felisiak
4c9886085b
Refs #31351 -- Made partial constraints tests use required_db_features.
This will notably silence the warnings issued when running the test
suite on MySQL and MariaDB.
2020-04-17 07:45:52 +02:00
Simon Charette
e9a0e1d4f6 Fixed #30484 -- Added conditional expressions support to CheckConstraint. 2019-11-21 11:56:35 +01:00
Simon Charette
8b3e1b6e9e Refs #11964 -- Made constraint support check respect required_db_features.
This will notably silence the warnings issued when running the test
suite on MySQL.
2019-08-12 06:44:37 +02:00
can
febe136d4c Fixed #30397 -- Added app_label/class interpolation for names of indexes and constraints. 2019-07-08 14:57:56 +02:00
Paveł Tyślacki
b69f8eb04c Fixed #30062 -- Added support for unique conditional constraints. 2019-01-12 09:50:20 -05:00
Simon Charette
db13bca60a Fixed #29641 -- Added support for unique constraints in Meta.constraints.
This constraint is similar to Meta.unique_together but also allows
specifying a name.

Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13 17:57:27 -05:00
Simon Charette
9142bebff2 Refs #11964 -- Changed CheckConstraint() signature to use keyword-only arguments.
Also renamed the `constraint` argument to `check` to better represent which
part of the constraint the provided `Q` object represents.
2018-10-02 10:53:04 -04:00
Ian Foote
952f05a6db Fixed #11964 -- Added support for database check constraints. 2018-07-10 15:32:33 -04:00