summaryrefslogtreecommitdiff
path: root/tests/schema
AgeCommit message (Collapse)Author
2023-02-01[4.0.x] Refs #33476 -- Applied Black's 2023 stable style.David Smith
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 Backport of 097e3a70c1481ee7b042b2edd91b2be86fb7b5b6 from main.
2022-02-08[4.0.x] Refs #33476 -- Refactored code to strictly match 88 characters line ↵Mariusz Felisiak
length. Backport of 7119f40c9881666b6f9b5cf7df09ee1d21cc8344 from main.
2022-02-08[4.0.x] Refs #33476 -- Reformatted code with Black.django-bot
Backport of 9c19aff7c7561e3a82978a272ecdaad40dda5c00 from main.
2021-09-01Fixed #33080 -- Preserved nullability of textual fields on Oracle.Mariusz Felisiak
Thanks Matt Hoskins for the report.
2021-09-01Fixed typo in tests/schema/tests.py docstrings.Mariusz Felisiak
2021-07-27Refs #32956 -- Changed "afterwards" to "afterward" in docs and comments.David Smith
This also removes unnecessary comments with the previous spelling. AP Stylebook has a short entry to advise the preferred spelling for "en-us". "Afterwards" is preferred in British English.
2021-07-15Refs #32508 -- Raised Type/ValueError instead of using "assert" in ↵Daniyal
django.db.models. Co-authored-by: Mariusz Felisiak <felisiak.mariusz@gmail.com>
2021-06-10Fixed #32832 -- Fixed adding BLOB/TEXT nullable field with default on MySQL ↵Mariusz Felisiak
8.0.13+. Regression in d4ac23bee1c84d8e4610350202ac068fc90f38c0. Thanks Omkar Deshpande for the report.
2021-05-28Fixed #32676 -- Prevented migrations from rendering related field attributes ↵David Wobrock
when not passed during initialization. Thanks Simon Charette for the implementation idea.
2021-05-28Refs #32779 -- Changed ↵Hannes Ljungberg
DatabaseSchemaEditor._unique_sql()/_create_unique_sql() to take fields as second parameter.
2021-05-24Fixed #32777 -- Passed table reference as a string to ↵Hannes Ljungberg
DatabaseSchemaEditor._index_columns().
2021-05-21Fixed #32503 -- Fixed altering BLOB/TEXT field to non-nullable with default ↵Yuekui Li
on MySQL 8.0.13+. MySQL 8.0.13+ supports defaults for BLOB/TEXT but not in the ALTER COLUMN statement. Regression in 6b16c91157512587017e9178d066ed1a683e7795. Thanks Matt Westcott for the report.
2021-04-26Fixed isolation of test_rename_table_renames_deferred_sql_references().Mariusz Felisiak
2021-02-23Fixed #30916 -- Added support for functional unique constraints.Hannes Ljungberg
Thanks Ian Foote and Mariusz Felisiak for reviews.
2021-02-09Fixed #32425 -- Fixed adding nullable field with default on MySQL.Jordan Bae
Thanks Simon Charette for the review.
2021-01-13Fixed #26167 -- Added support for functional indexes.Hannes Ljungberg
Thanks Simon Charette, Mads Jensen, and Mariusz Felisiak for reviews. Co-authored-by: Markus Holtermann <info@markusholtermann.eu>
2020-12-10Fixed #32178 -- Allowed database backends to skip tests and mark expected ↵Hasan Ramezani
failures. Co-authored-by: Tim Graham <timograham@gmail.com>
2020-11-13Refs #32120 -- Fixed test_add_inline_fk_index_update_data for ↵Tim Graham
DatabaseFeatures.indexes_foreign_keys. This test creates an index with editor.add_index() so it's present regardless of the database's behavior. Reverted the change from ede9fac75807fe5810df66280a60e7068cc97e4a.
2020-10-28Made small readability improvements.Martin Thoma
2020-10-20Fixed #32120 -- Added DatabaseFeatures.indexes_foreign_keys.Tim Graham
2020-10-15Fixed #25253 -- Made AlterField operation a noop when changing attributes ↵Çağıl Uluşahin
that don't affect the schema.
2020-10-06Fixed #32073 -- Skipped collation tests on PostgreSQL < 10.Mariusz Felisiak
PostgreSQL < 10 doesn't support ICU collations. Thanks Hannes Ljungberg for the report.
2020-09-21Fixed #31777 -- Added support for database collations to Char/TextFields.Tom Carrick
Thanks Simon Charette and Mariusz Felisiak for reviews.
2020-08-24Fixed #24533 -- Dropped PostgreSQL sequence and Oracle identity when ↵Tim Graham
migrating away from AutoField.
2020-08-24Added assertions for the results of migrating an integer pk to AutoField.Tim Graham
2020-08-17Fixed #31888 -- Avoided module-level MySQL queries in tests.Ahmad A. Hussein
2020-07-22Fixed #31805 -- Fixed SchemaTests.tearDown() when table names are ↵Mariusz Felisiak
case-insensitive.
2020-07-22Fixed #31797 -- Skipped schema tests on specific MariaDB versions.Mariusz Felisiak
test_alter_not_unique_field_to_primary_key() test is affected by https://jira.mariadb.org/browse/MDEV-19598 on MariaDB 10.4.4 to 10.5.1. test_alter_pk_with_self_referential_field() test is affected by https://jira.mariadb.org/browse/MDEV-22775 on MariaDB 10.4 series from 10.4.13.
2020-06-24Fixed #31735 -- Fixed migrations crash on namespaced inline FK addition on ↵Simon Charette
PostgreSQL. The namespace of the constraint must be included when making the constraint immediate. Regression in 22ce5d0031bd795ade081394043833e82046016c. Thanks Rodrigo Estevao for the report.
2020-06-04Fixed #30913 -- Added support for covering indexes on PostgreSQL 11+.Hannes Ljungberg
2020-06-04Refs #31630 -- Added CharField and IntegerField to ↵Tim Graham
DatabaseFeatures.introspected_field_types. CockroachDB introspects CharField as TextField and IntegerField as BigIntegerField.
2020-06-04Fixed #31630 -- Replaced introspection features with ↵Hasan Ramezani
DatabaseFeatures.introspected_field_types.
2020-03-23Added missing Meta.apps to a schema model.Tim Graham
2020-02-20Corrected typo in test docstring.Jon Dufresne
2020-02-04Simplified imports from django.db and django.contrib.gis.db.Nick Pope
2019-12-23Fixed #31106 -- Fixed migrations crash on PostgreSQL 10+ when adding FK ↵Mariusz Felisiak
constraints inline and changing data. This allows adding foreign key constraints inline and changing data in the same migration on PostgreSQL 10+. Regression in 738faf9da2a5cd03148a36375db80746c99c9623. Thanks Janne Rönkkö for the report and Simon Charette for the implementation idea and review.
2019-10-29Used more specific unittest assertions in tests.Nick Pope
* assertIsNone()/assertIsNotNone() instead of comparing to None. * assertLess() for < comparisons. * assertIs() for 'is' expressions. * assertIsInstance() for isinstance() expressions. * rounding of assertAlmostEqual() for round() expressions. * assertIs(..., True/False) instead of comparing to True/False. * assertIs()/assertIsNot() for ==/!= comparisons. * assertNotEqual() for == comparisons. * assertTrue()/assertFalse() instead of comparing to True/False.
2019-10-17Refs #28816 -- Prevented silencing data loss when decreasing ↵Hasan Ramezani
CharField.max_length for ArrayField.base_field on PostgreSQL.
2019-09-25Fixed #30800 -- Fixed migrations crash when altering a field with custom ↵Mariusz Felisiak
db_type(). Regression in 1378d665a1c85897d951f2ca9618b848fdbba2e7.
2019-09-11Refs #27338 -- Added tests for altering CharField with primary_key=True to ↵Mariusz Felisiak
AutoField on PostgreSQL. Fixed in 91b2bc3e70be2632baad86488fb03cf02848b5b6.
2019-09-05Made SchemaTests.test_alter_db_table_case run only on backends where table ↵Hasan Ramezani
names are case-insensitive.
2019-08-23Fixed typos in test names and a comment.Min ho Kim
2019-08-02Fixed #30661 -- Added models.SmallAutoField.Nick Pope
2019-08-01Refs #30664 -- Fixed migrations crash when altering AutoField/BigAutoField ↵Mariusz Felisiak
with quoted db_column on PostgreSQL.
2019-08-01Fixed #30664 -- Fixed migrations crash when altering table on SQLite or ↵Ngalim Siregar
altering AutoField/BigAutoField on PostgreSQL for models with quoted db_table.
2019-07-19Fixed #30593 -- Added support for check constraints on MariaDB 10.2+.Hasan Ramezani
2019-07-08Changed django.db.models.indexes.Index imports to django.db.models.Index.Mariusz Felisiak
2019-05-21Fixed #28816 -- Prevented silencing data loss when decreasing ↵Hasan Ramezani
CharField.max_length on PostgreSQL.
2019-04-08Fixed #30266 -- Kept a sequence owner when altering an ↵Dolan Antenucci
AutoField/BigAutoField on PostgreSQL.
2019-03-17Refs #30172 -- Prevented removing a model Meta's index/unique_together from ↵Paveł Tyślacki
removing Meta constraints/indexes.