David Smith
097e3a70c1
Refs #33476 -- Applied Black's 2023 stable style.
...
Black 23.1.0 is released which, as the first release of the year,
introduces the 2023 stable style. This incorporates most of last year's
preview style.
https://github.com/psf/black/releases/tag/23.1.0
2023-02-01 11:04:38 +01:00
David Wobrock
a6385b382e
Fixed #27236 -- Deprecated Meta.index_together in favor of Meta.indexes.
...
This also deprecates AlterIndexTogether migration operation.
2022-07-12 09:04:31 +02:00
David Wobrock
f8f16b3cd8
Refs #27236 -- Removed usage of Meta.index_together from indexes/introspection test models.
2022-07-11 08:30:19 +02:00
David Wobrock
a3a1290d47
Refs #27236 -- Moved models with Meta.index_together inside of test methods.
2022-06-03 06:32:11 +02:00
Mariusz Felisiak
aa8b9279e4
Fixed CoveringIndexTests.test_covering_partial_index() when DEFAULT_INDEX_TABLESPACE is set.
2022-05-03 14:22:34 +02:00
Mariusz Felisiak
fdfb3086fc
Fixed DatabaseFeatures.supports_index_column_ordering and related tests with MyISAM storage engine.
2022-04-13 11:56:24 +02:00
Mariusz Felisiak
1bdfde0857
Fixed typo in SchemaIndexesMySQLTests.test_no_index_for_foreignkey().
2022-04-13 11:56:24 +02:00
Mariusz Felisiak
7119f40c98
Refs #33476 -- Refactored code to strictly match 88 characters line length.
2022-02-07 20:37:05 +01:00
django-bot
9c19aff7c7
Refs #33476 -- Reformatted code with Black.
2022-02-07 20:37:05 +01:00
Tim Graham
76c0b32f82
Refs #26167 -- Added @skipUnlessDBFeature('supports_expression_indexes') to a test.
...
Failure observed on CockroachDB.
2021-03-08 20:12:26 +01:00
Hannes Ljungberg
83fcfc9ec8
Fixed #26167 -- Added support for functional indexes.
...
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews.
Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2021-01-13 11:47:50 +01:00
Hasan Ramezani
275dd4ebba
Fixed #32178 -- Allowed database backends to skip tests and mark expected failures.
...
Co-authored-by: Tim Graham <timograham@gmail.com>
2020-12-10 18:00:57 +01:00
Mariusz Felisiak
f7806193e6
Made indexes tests use required_db_features.
2020-09-22 10:29:59 +02:00
Hannes Ljungberg
8c7992f658
Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.
2020-06-04 12:26:22 +02:00
Jon Dufresne
3259983f56
Fixed #31233 -- Closed database connections and cursors after use.
2020-02-06 15:35:23 +01:00
Nick Pope
335c9c94ac
Simplified imports from django.db and django.contrib.gis.db.
2020-02-04 13:20:06 +01:00
Hannes Ljungberg
6d590bcf1f
Fixed #30961 -- Fixed spaces in columns list SQL generated for indexes.
2019-11-08 08:52:47 +01:00
Hannes Ljungberg
d5af43c8d1
Refs #30961 -- Added tests for columns list SQL generated for indexes.
2019-11-08 08:35:39 +01:00
Hannes Ljungberg
fa5f3291e7
Fixed #30903 -- Fixed migrations crash on PostgreSQL when adding Index with opclasses and ordering.
2019-10-24 09:33:14 +02:00
Simon Charette
34decdebf1
Fixed #30754 -- Prevented inclusion of aliases in partial index conditions.
...
SQLite doesn't repoint table aliases in partial index conditions on table
rename which breaks the documented table alteration procedure.
Thanks Pēteris Caune for the report.
2019-09-10 10:03:16 +02:00
Dan Tao
738faf9da2
Fixed #30108 -- Allowed adding foreign key constraints in the same statement that adds a field.
2019-01-29 15:42:57 -05:00
Tim Graham
b74b6736d0
Refs #29547 -- Skipped an unsupported partial index test on older versions of SQLite.
...
Follow up to e5b8626c0e
.
2018-12-26 11:20:11 -05:00
Simon Charette
e5b8626c0e
Refs #29547 -- Corrected SQLite's supports_partial_indexes feature flag.
2018-12-22 14:51:59 -05:00
Simon Charette
315357ad25
Fixed #30023 -- Prevented SQLite schema alterations while foreign key checks are enabled.
...
Prior to this change foreign key constraint references could be left pointing
at tables dropped during operations simulating unsupported table alterations
because of an unexpected failure to disable foreign key constraint checks.
SQLite3 does not allow disabling such checks while in a transaction so they
must be disabled beforehand.
Thanks ezaquarii for the report and Carlton and Tim for the review.
2018-12-15 18:51:59 -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
luz.paz
97e637a87f
Fixed typos in comments and docs.
2018-08-01 16:09:22 -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
Simon Charette
3b429c9673
Refs #25530 -- Tracked references of deferred SQL statements.
2017-06-21 00:03:31 -04:00
Simon Charette
ea91ad4c13
Refs #25530 -- Changed _create_index_name to take a table as first parameter.
2017-06-20 22:59:22 -04:00
chillaranand
d6eaf7c018
Refs #23919 -- Replaced super(ClassName, self) with super().
2017-01-25 12:23:46 -05:00
Tim Graham
f94475e526
Refs #27558 -- Isolated indexes test on MySQL.
...
MySQL schema changes must be done in TransactionTestCase.
2016-12-15 13:31:08 -05:00
Ed Morley
dd2e4d7b5d
Refs #27558 -- Added test for no index on InnoDB ForeignKey.
...
The refactor in 3f76d1402d
fixed the creation
of redundant indexes.
Forwardport of 82ce55dbbe
from stable/1.10.x
2016-12-01 13:25:48 -05:00
Ramin Farajpour Cami
967be82443
Fixed E305 flake8 warnings.
2016-11-14 12:30:46 -05:00
Adam Chainz
4f5b7eeb53
Fixed reverse accessor check failures in indexes tests.
2016-08-16 16:10:59 -04:00
Akshesh
324c1b432a
Fixed #24442 -- Improved SchemaEditor's index name truncation.
2016-08-11 14:36:31 -04:00
Jon Dufresne
3f76d1402d
Refs #26889 -- Refactored SchemaEditor to allow backend specific indexes.
2016-07-15 10:34:37 -04:00
Aaron Elliot Ross
6bf7964023
Fixed #26171 -- Made MySQL create an index on ForeignKeys with db_contraint=False.
...
Refactored "Prevented unneeded index creation on MySQL-InnoDB" (2ceb10f
)
to avoid setting db_index=False.
2016-06-28 08:22:20 -04:00
Tim Graham
92053acbb9
Fixed E128 flake8 warnings in tests/.
2016-04-08 10:12:33 -04:00
Flavio Curella
c2e70f0265
Fixed #21127 -- Started deprecation toward requiring on_delete for ForeignKey/OneToOneField
2015-07-27 18:28:13 -04:00
Shai Berger
8ca35d7c6a
Fixed Oracle build failure introduced by refs #24390 .
...
Used shorter column names to make the generated index name
fit within Oracle's limit of 30 characters
2015-03-03 00:01:21 +02:00
Tim Graham
4e8b167e4d
Fixed MySQL build failure introduced by refs #24390 .
...
Added table_name back to _create_index_sql() to prevent
duplicate index names on MySQL.
2015-03-02 13:07:34 -05:00
László Károlyi
f37c11eea3
Fixed #24390 -- Made migration index names deterministic.
2015-03-02 09:25:19 -05:00
Tim Graham
0ed7d15563
Sorted imports with isort; refs #23860 .
2015-02-06 08:16:28 -05:00
Tim Graham
2b039d966f
Removed obsolete SQL generation methods.
2015-01-18 15:58:06 -05:00
Claude Paroz
51890ce889
Applied ignore_warnings to Django tests
2014-12-30 18:16:25 +01:00
Claude Paroz
2ceb10f3b0
Fixed #14180 -- Prevented unneeded index creation on MySQL-InnoDB
...
Thanks zimnyx for the report and Simon Charette, Tim Graham for
the reviews.
2014-12-27 12:52:44 +01:00
Claude Paroz
b3ebcb22a9
Ignored deprecation warnings for CreationIndexesTests
2014-12-24 10:45:53 +01:00
Claude Paroz
9699d8446e
Moved test correction from 5b1fb0a75
2014-12-24 10:42:24 +01:00
Claude Paroz
5b1fb0a75d
Forward-ported test and release note from f46a16614
...
Refs #24015 .
2014-12-18 21:17:17 +01:00
Claude Paroz
8d7a48027e
Fixed #23954 -- Added special text/varchar PostgreSQL indexes in migrations
...
Thanks adityagupta104 for the report and Tim Graham for the review.
2014-12-04 21:27:42 +01:00