Commit Graph

23 Commits

Author SHA1 Message Date
Mariusz Felisiak f4e93919e4
Fixed #31815 -- Fixed schema value encoding on PostgreSQL. 2020-07-27 06:39:02 +02:00
Hannes Ljungberg 30e3d2d78d
Fixed #31745 -- Added error messages when using UniqueConstraint.include/opclasses with deferrable. 2020-06-29 06:41:23 +02:00
Hannes Ljungberg 7edc6e53a7 Fixed #31702 -- Added support for PostgreSQL opclasses in UniqueConstraint. 2020-06-16 07:19:00 +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
ElizabethU 54ea290e5b Fixed #30651 -- Made __eq__() methods return NotImplemented for not implemented comparisons.
Changed __eq__ to return NotImplemented instead of False if compared to
an object of the same type, as is recommended by the Python data model
reference. Now these models can be compared to ANY (or other objects
with __eq__ overwritten) without returning False automatically.
2019-10-01 17:58:19 +02: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
Hasan Ramezani 1fc2c70f76 Fixed #30593 -- Added support for check constraints on MariaDB 10.2+. 2019-07-19 11:05:06 +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
Paveł Tyślacki f4c0c0b0aa Added tests for Check/UniqueConstraint.__eq__(). 2019-01-12 09:24:22 -05:00
Paveł Tyślacki 647be06538 Renamed variables after generalization of constraints.
Follow up to 8eae094638.
2019-01-10 18:54:41 -05:00
Paveł Tyślacki 0123b67f6b Fixed #30060 -- Moved SQL generation for indexes and constraints to SchemaEditor. 2019-01-01 09:39:58 -05:00
Mariusz Felisiak d5f4ce9849
Fixed #29949 -- Refactored db introspection identifier converters.
Removed DatabaseIntrospection.table_name_converter()/column_name_converter()
and use instead DatabaseIntrospection.identifier_converter().

Removed DatabaseFeatures.uppercases_column_names.

Thanks Tim Graham for the initial patch and review and Simon Charette
for the review.
2018-11-21 09:06:50 +01: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 dba4a634ba Refs #29641 -- Refactored database schema constraint creation.
Added a test for constraint names in the database.

Updated SQLite introspection to use sqlparse to allow reading the
constraint name for table check and unique constraints.

Co-authored-by: Ian Foote <python@ian.feete.org>
2018-11-13 15:25:44 -05:00
Simon Charette 24dc7d8940 Refs #29641 -- Extracted reusable CheckConstraint logic into a base class. 2018-10-02 13:11:18 -04: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 9a0e0d966a Refs #11964 -- Renamed a database check constraint test. 2018-09-25 11:14:45 -04:00
Ian Foote 952f05a6db Fixed #11964 -- Added support for database check constraints. 2018-07-10 15:32:33 -04:00