#28884: RenameField crashes with AttributeError when renaming a ManyToManyField
(sqlite3)
-------------------------------------+-------------------------------------
Reporter: Emanuele Di Giacomo | Owner: Simon
| Charette
Type: Bug | Status: closed
Component: Migrations | Version: 2.0
Severity: Release blocker | Resolution: fixed
Keywords: sqlite3 sqlite | Triage Stage: Accepted
Has patch: 1 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-------------------------------------+-------------------------------------
Changes (by Tim Graham <timograham@…>):
* status: assigned => closed
* resolution: => fixed
Comment:
In [changeset:"9f7772e098439f9edea3d25ab127539fc514eeb2" 9f7772e]:
{{{
#!CommitTicketReference repository=""
revision="9f7772e098439f9edea3d25ab127539fc514eeb2"
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 095c1aaa898bed40568009db836aa8434f1b983d.
Thanks Tim for the additional tests and edits, and Mariusz for the review.
}}}
--
Ticket URL: <https://code.djangoproject.com/ticket/28884#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/068.fd6d27961f0afb0d60728bf148d8724d%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.