#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
-------------------------------------+-------------------------------------

Comment (by Tim Graham <timograham@…>):

 In [changeset:"b40a1d774d6e7dc0a3663a69c3a8a9b8793d31ff" b40a1d7]:
 {{{
 #!CommitTicketReference repository=""
 revision="b40a1d774d6e7dc0a3663a69c3a8a9b8793d31ff"
 [2.0.x] 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.

 Backport of 9f7772e098439f9edea3d25ab127539fc514eeb2 from master
 }}}

-- 
Ticket URL: <https://code.djangoproject.com/ticket/28884#comment:6>
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.79d044b29258b105ef276dbf41d6f662%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to