Commit Graph

24 Commits

Author SHA1 Message Date
Mariusz Felisiak 82da72b748
Refs #28077 -- Added opclasses to Index.__repr__().
This also removes unnecessary commas between attributes.
2020-06-17 10:32:43 +02:00
Hannes Ljungberg 8c7992f658 Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+. 2020-06-04 12:26:22 +02:00
Nick Pope 335c9c94ac Simplified imports from django.db and django.contrib.gis.db. 2020-02-04 13:20:06 +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
can febe136d4c Fixed #30397 -- Added app_label/class interpolation for names of indexes and constraints. 2019-07-08 14:57:56 +02:00
Mariusz Felisiak 8233144ca0 Changed django.db.models.indexes.Index imports to django.db.models.Index. 2019-07-08 14:19:46 +02:00
can 53209f7830 Fixed #30613 -- Moved index name validation to system checks. 2019-07-05 09:30:21 +02:00
Simon Charette b181aba7dd Refs #28478 -- Prevented database feature based skipping on tests disallowing queries.
Database features may require a connection to be established to determine
whether or not they are enabled.
2019-01-14 16:16:30 -05:00
Simon Charette a02a6fd580 Refs #28478 -- Prevented connection creation in model_indexes tests.
Entering a SchemaEditor instance creates a connection but it isn't needed
for this test.
2019-01-13 13:47:08 -05:00
Mads Jensen a906c98982 Fixed #29547 -- Added support for partial indexes.
Thanks to Ian Foote, Mariusz Felisiak, Simon Charettes, and
Markus Holtermann for comments and feedback.
2018-10-29 19:34:54 -04:00
Ian Foote 38cada7c94 Fixed #28077 -- Added support for PostgreSQL opclasses in Index.
Thanks Vinay Karanam for the initial patch.
2018-06-29 17:00:28 -04:00
Fabrizio Ettore Messina 10c0fe528a Fixed #29178 -- Allowed Index.fields to accept a tuple. 2018-03-08 10:56:55 -05:00
Mariusz Felisiak f79d9a322c
Refs #28876 -- Fixed incorrect class-based model index name generation for models with quoted db_table.
Thanks Simon Charette and Tim Graham for the review and Carlos E. C.
Leite for the report.
2017-12-05 21:05:10 +01:00
Mariusz Felisiak fb02ebe889 Fixed #28597 -- Fixed crash with the name of a model's autogenerated primary key in an Index's fields. 2017-09-18 14:06:00 -04:00
Claude Paroz 831358f23d Fixed #28465 -- Unified index SQL creation in DatabaseSchemaEditor
Thanks Tim Graham for the review.
2017-08-08 17:37:43 +02:00
Mariusz Felisiak 3297dede7f Fixed #28046 -- Added the db_tablespace parameter to class-based indexes.
Thanks Markus Holtermann and Tim Graham for reviews.
2017-06-27 21:15:15 +02:00
Jon Dufresne 0c3c37a376 Fixed #28282 -- Fixed class-based indexes name for models that only inherit Model. 2017-06-08 09:36:12 -04:00
Tim Graham 3d19d1428a Fixed #27915 -- Allowed Meta.indexes to be defined in abstract models.
Thanks Markus Holtermann for review.
2017-03-21 10:53:21 -04:00
Tim Graham b008f7cc56 Fixed #27135 -- Made index introspection return Index.suffix. 2017-02-15 20:15:02 -05:00
Akshesh c969b17ad8 Refs #26709 -- Added type check for models.Index fields argument. 2016-08-16 09:53:50 -04:00
Akshesh 311a8e8d50 Fixed #20888 -- Added support for column order in class-based indexes. 2016-08-12 15:52:16 -04:00
Akshesh 6a8372e6ec Fixed #26808 -- Added Meta.indexes for class-based indexes.
* Added the index name to its deconstruction.
* Added indexes to sqlite3.schema._remake_table() so that indexes
  aren't dropped when _remake_table() is called.

Thanks timgraham & MarkusH for review and advice.
2016-08-05 18:12:51 -04:00
Akshesh b92c6b7d56 Refs #26709 -- Replaced Index.get_name() with set_name_with_model().
This removes the dependency of the Index class on its 'model'
attribute.
2016-08-02 14:21:41 -04:00
Akshesh 156e2d59cf Fixed #26709 -- Added class-based indexes.
Added the AddIndex and RemoveIndex operations to use them in migrations.

Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
2016-06-27 10:41:01 -04:00