django1/django/db
Simon Charette 9f7772e098 Fixed #28884 -- Fixed crash on SQLite when renaming a field in a 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 095c1aaa89.

Thanks Tim for the additional tests and edits, and Mariusz for the review.
2017-12-22 15:19:05 -05:00
..
backends Fixed #28884 -- Fixed crash on SQLite when renaming a field in a model referenced by a ManyToManyField. 2017-12-22 15:19:05 -05:00
migrations Fixed #28909 -- Simplified code using tuple/list/set/dict unpacking. 2017-12-11 07:08:45 -05:00
models Refs #27985 -- Reallowed using __exact=None as an alias for __isnull=True if a custom lookup class with lookup_name != None is registered as the exact lookup. 2017-12-12 17:11:58 -10:00
__init__.py Refs #23919 -- Stopped inheriting from object to define new style classes. 2017-01-19 08:39:46 +01:00
transaction.py Fix a typo in django/db/transaction.py 2017-04-19 16:36:06 +02:00
utils.py Refs #23919 -- Used "raise from" instead of __cause__ in reraising backend-specific database exceptions. 2017-04-25 08:29:54 +02:00