summaryrefslogtreecommitdiff
path: root/tests/schema
AgeCommit message (Collapse)Author
2018-04-12[2.0.x] Fixed schema test failure when running tests in reverse.Tim Graham
Follow up to 003334f8af29e2023cf7ad7d080aa9ab26a7c528. Backport of 78f8b80f9b215e50618375adce4c97795dabbb84 from master
2018-04-11[2.0.x] Fixed #29193 -- Prevented unnecessary foreign key drops when ↵Jeremy Bowman
altering a unique field. Stopped dropping and recreating foreign key constraints on other fields in the same table as the one which is actually being altered in an AlterField operation. Regression in c3e0adcad8d8ba94b33cabd137056166ed36dae0. Backport of ee17bb8a67a9e7e688da6e6f4b3be1b3a69c09b0 from master
2018-04-11[2.0.x] Tested altering a unique field when a reverse M2M relation exists.Jeremy Bowman
Backport of 003334f8af29e2023cf7ad7d080aa9ab26a7c528 from master
2017-12-22[2.0.x] Fixed #28884 -- Fixed crash on SQLite when renaming a field in a ↵Simon Charette
model referenced by a ManyToManyField. Introspected database constraints instead of relying on _meta.related_objects to determine whether or not a table or a column is referenced on rename operations. This has the side effect of ignoring both db_constraint=False and virtual fields such as GenericRelation which aren't backend by database level constraints and thus shouldn't prevent the rename operations from being performed in a transaction. Regression in 095c1aaa898bed40568009db836aa8434f1b983d. Thanks Tim for the additional tests and edits, and Mariusz for the review. Backport of 9f7772e098439f9edea3d25ab127539fc514eeb2 from master
2017-12-05[2.0.x] Refs #28876 -- Fixed incorrect foreign key constraint name for ↵Mariusz Felisiak
models with quoted db_table. Thanks Simon Charette and Tim Graham for the review and Carlos E. C. Leite for the report. Backport of fc48047586a8f92262f55d9d2bfb976325844b23 from master
2017-12-01[2.0.x] Fixed #28849 -- Fixed referenced table and column rename on SQLite.Simon Charette
Thanks Ramiro for the input and Tim for the review. Backport of 095c1aaa898bed40568009db836aa8434f1b983d from master
2017-11-15[2.0.x] Fixed #28792 -- Fixed index name truncation of namespaced tables.Simon Charette
Refs #27458, #27843. Thanks Tim and Mariusz for the review. Backport of ee85ef8315db839e5723dea19d8b971420a2ebb4 from master
2017-09-06Refs #23919 -- Replaced usage of django.utils.functional.curry() with ↵Sergey Fedoseev
functools.partial()/partialmethod().
2017-07-11Fixed #14204 -- Enforced SQLite foreign key constraints.Claude Paroz
Thanks Tim Graham for contributing to the patch and Simon Charette for advice and review.
2017-06-22Fixed #28298 -- Prevented a primary key alteration from adding a foreign key ↵Josh Schneier
constraint if db_constraint=False.
2017-06-21Refs #25530 -- Deleted deferred SQL references on delete operation.Simon Charette
2017-06-21Refs #25530 -- Renamed deferred SQL references on rename operation.Simon Charette
2017-06-20Refs #25530 -- Changed _create_index_name to take a table as first parameter.Simon Charette
2017-06-01Refs #23968 -- Removed unnecessary lists, generators, and tuple calls.Jon Dufresne
2017-06-01Fixed #26682 -- Added support for Oracle identity columns.Mariusz Felisiak
Thanks Shai Berger and Tim Graham for reviews.
2017-05-24Simplified schema.tests with ↵Mariusz Felisiak
assertForeignKeyExists()/assertForeignKeyNotExists(). Thanks Tim Graham for the review.
2017-05-24Fixed #27860 -- Dropped varchar_pattern_ops/text_pattern_ops index before ↵Mariusz Felisiak
altering char/text field in PostgreSQL. Thanks Tim Graham for the review.
2017-05-23Fixed #27859 -- Ignored db_index for TextField/BinaryField on Oracle and MySQL.Mariusz Felisiak
Thanks Zubair Alam for the initial patch and Tim Graham for the review.
2017-05-01Refs #28052 -- Cleaned up some indexes in schema tests.Tim Graham
2017-05-01Fixed #28052 -- Prevented dropping Meta.indexes when changing db_index to False.Markus Holtermann
Thanks Marc Tamlyn for the report and Ian Foote/Tim Graham for review.
2017-04-02Fixed #27928 -- Avoided SET/DROP DEFAULT unless a field changes from null to ↵Simon Charette
non-null. Thanks Christophe Pettus, Matteo Pietro Russo for reports and Tim for review.
2017-02-01Refs #23919 -- Replaced kwargs.pop() with keyword-only arguments.Vytis Banaitis
2017-01-28Fixed #27788 -- Dropped support for Oracle < 12.1.Tim Graham
2017-01-25Refs #23919 -- Replaced super(ClassName, self) with super().chillaranand
2017-01-20Refs #23919 -- Removed django.test.mock Python 2 compatibility shim.Tim Graham
2017-01-18Refs #23919 -- Removed python_2_unicode_compatible decorator usageClaude Paroz
2016-12-30Fixed #27458 -- Fixed invalid sequence/index names when using "USER"."TABLE" ↵Andrew Nester
db_table on Oracle.
2016-12-28Fixed #27631 -- Prevented execution of transactional DDL statements when ↵Simon Charette
unsupported. Executing a DDL statement during a transaction on backends that don't support it silently commits, leaving atomic() in an incoherent state. While schema_editor.execute() could technically be used to execute DML statements such usage should be uncommon as these are usually performed through the ORM. In other cases schema_editor.connection.execute() can be used to circumvent this check. Thanks Adam and Tim for the review.
2016-12-24Fixed #25492 -- Checked deferred foreign key constraints before dropping them.Simon Charette
This allows running foreign key data and schema altering operations in the same migration on PostgreSQL. Thanks Tim for review.
2016-12-23Refs #26384 -- Isolated a test model in schema tests.Simon Charette
2016-11-10Refs #27392 -- Removed "Tests that", "Ensures that", etc. from test docstrings.za
2016-10-27Fixed #27327 -- Simplified time zone handling by requiring pytz.Tim Graham
2016-09-12Fixed #27098 -- Deprecated DatabaseIntrospection.get_indexesClaude Paroz
Thanks Akshesh <aksheshdoshi@gmail.com> for help with the PostgreSQL query. Thanks Tim Graham for the review.
2016-09-09Fixed #27195 -- Stopped dropping default when adding a nullable column.Simon Charette
Thanks Rob Golding from Zapier for the report.
2016-08-12Fixed #27030 -- Added contrib.postgres.indexes.GinIndex.Akshesh
2016-08-12Fixed #20888 -- Added support for column order in class-based indexes.Akshesh
2016-08-11Fixed #24442 -- Improved SchemaEditor's index name truncation.Akshesh
2016-07-13Fixed #26889 -- Fixed missing PostgreSQL index in SchemaEditor.add_field().Jon Dufresne
2016-07-08Added strict=True to all SchemaEditor.alter_field() calls in tests.Jon Dufresne
It should help catch bugs.
2016-07-07Fixed #25317, #26090 -- Fixed swapping combinations of unique and db_index ↵Jon Dufresne
during migrations.
2016-07-07Refs #26709 -- Added 'model' argument to SchemaEditor.add/remove_index()Akshesh
This removes the dependency of the Index class on its model attribute when a name is passed to it. Thanks to Markush for discussions.
2016-07-07Fixed #26833 -- Fixed SchemaEditor._constraint_names() to handle ↵Jon Dufresne
features.uppercases_column_names.
2016-06-29Fixed #25694 -- Removed incorrect _uniq suffix on index names during migrations.Jon Dufresne
2016-06-27Refs #26034 -- Corrected a schema test to work with the correct field state.Jon Dufresne
2016-06-27Fixed #26709 -- Added class-based indexes.Akshesh
Added the AddIndex and RemoveIndex operations to use them in migrations. Thanks markush, mjtamlyn, timgraham, and charettes for review and advice.
2016-06-21Fixed #26781 -- Made table name case change a noop on SQLite.Simon Charette
SQLite disgresses from the SQL standard by ignoring case of quoted identifiers. Thanks to laozzzi for the report and Tim for the review.
2016-06-16Fixed #26747 -- Used more specific assertions in the Django test suite.Jon Dufresne
2016-05-09Fixed #25005 -- Made date and time fields with auto_now/auto_now_add use ↵Iacopo Spalletti
effective default. Thanks to Andriy Sokolovskiy for initial patch.
2016-05-07Fixed #26593 -- Leveraged deferrable_sql() in SchemaEditorMarkus Holtermann
2016-05-03Normalized "an SQL" spelling.Ville Skyttä