summaryrefslogtreecommitdiff
path: root/tests/constraints/models.py
AgeCommit message (Collapse)Author
2025-03-01Fixed #36198 -- Implemented unresolved transform expression replacement.Simon Charette
This allows the proper resolving of F("field__transform") when performing constraint validation. Thanks Tom Hall for the report and Sarah for the test.
2024-10-10Fixed #35103 -- Used provided error code and message when fields is set ↵gabn88
without a condition on UniqueConstraint.
2024-08-12Fixed #35575 -- Added support for constraint validation on GeneratedFields.Mark Gensler
2024-08-05Fixed #35638 -- Updated validate_constraints to consider db_default.David Sanders
2024-03-01Refs #35234 -- Deprecated CheckConstraint.check in favor of .condition.Simon Charette
Once the deprecation period ends CheckConstraint.check() can become the documented method that performs system checks for BaseConstraint subclasses.
2023-08-04Fixed #34754 -- Fixed JSONField check constraints validation on NULL values.Simon Charette
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 5c23d9f0c32f166c81ecb6f3f01d5077a6084318. Thanks Alexandre Collet for the report.
2023-02-24Refs #34338 -- Fixed isolation of constraints tests.Mariusz Felisiak
Regression in 5b3d3e400ab9334ba429ca360c9818c6dfc3a51b.
2022-05-10Fixed #30581 -- Added support for Meta.constraints validation.Gagaro
Thanks Simon Charette, Keryn Knight, and Mariusz Felisiak for reviews.
2022-05-05Refs #30581 -- Moved CheckConstraint tests for conditional expressions to ↵Mariusz Felisiak
migrations.test_operations. This allows avoiding warning in tests about using RawSQL in CheckConstraints.
2022-02-07Refs #33476 -- Reformatted code with Black.django-bot
2020-07-27Fixed #31815 -- Fixed schema value encoding on PostgreSQL.Mariusz Felisiak
2020-06-04Refs #30913 -- Added system checks for covering indexes and unique ↵Mariusz Felisiak
constraints support.
2020-06-04Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.Hannes Ljungberg
2020-04-30Fixed #20581 -- Added support for deferrable unique constraints.Ian Foote
2020-04-17Refs #31351 -- Made partial constraints tests use required_db_features.Mariusz Felisiak
This will notably silence the warnings issued when running the test suite on MySQL and MariaDB.
2019-11-21Fixed #30484 -- Added conditional expressions support to CheckConstraint.Simon Charette
2019-08-12Refs #11964 -- Made constraint support check respect required_db_features.Simon Charette
This will notably silence the warnings issued when running the test suite on MySQL.
2019-07-08Fixed #30397 -- Added app_label/class interpolation for names of indexes and ↵can
constraints.
2019-01-12Fixed #30062 -- Added support for unique conditional constraints.Paveł Tyślacki
2018-11-13Fixed #29641 -- Added support for unique constraints in Meta.constraints.Simon Charette
This constraint is similar to Meta.unique_together but also allows specifying a name. Co-authored-by: Ian Foote <python@ian.feete.org>
2018-10-02Refs #11964 -- Changed CheckConstraint() signature to use keyword-only ↵Simon Charette
arguments. Also renamed the `constraint` argument to `check` to better represent which part of the constraint the provided `Q` object represents.
2018-07-10Fixed #11964 -- Added support for database check constraints.Ian Foote