#24573: "Unknown column" exception after removing field in migration.
----------------------------+--------------------------------------
     Reporter:  tttomekkk   |                    Owner:  nobody
         Type:  Bug         |                   Status:  new
    Component:  Migrations  |                  Version:  1.8
     Severity:  Normal      |               Resolution:
     Keywords:              |             Triage Stage:  Unreviewed
    Has patch:  0           |      Needs documentation:  0
  Needs tests:  0           |  Patch needs improvement:  0
Easy pickings:  0           |                    UI/UX:  0
----------------------------+--------------------------------------
Changes (by tttomekkk):

 * needs_better_patch:   => 0
 * needs_tests:   => 0
 * needs_docs:   => 0


Old description:

> When removing field of base class model in my migration and than using
> `RunPython` with subclass model query I face exception
> `django.db.utils.OperationalError: (1054, "Unknown column
> 'bugapp_person.name' in 'field list'")`.  It looks like during migrating,
> current migration  state of submodel does not reflect field removal. Base
> class is alright though. Additionally, this happens only when at least
> one extra model with OTO field to base model exists.
>
> This occurs in Django 1.8. I had no problem with any of 1.7.x version,
> last tested was 1.7.7.  Simplified snippet attached below runs smoothly
> with version 1.7 and should reproduce the error in 1.8.

New description:

 When removing field of base class model in my migration and than using
 `RunPython` with subclass model query I face exception
 `django.db.utils.OperationalError: (1054, "Unknown column
 'bugapp_person.name' in 'field list'")`.  It looks like during migrating,
 current migration  state of submodel does not reflect field removal. Base
 class is alright though. Additionally, this happens only when at least one
 extra model with OTO field to base model exists.

 This occurs in Django 1.8. I had no problem with any of 1.7.x (1.7.7
 recently).  Simplified snippet attached below runs smoothly with  1.7 and
 should reproduce the error under 1.8.

--

--
Ticket URL: <https://code.djangoproject.com/ticket/24573#comment:1>
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 django-updates+unsubscr...@googlegroups.com.
To post to this group, send email to django-updates@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-updates/067.9bdd4463ce17a811f2ec1cb826401219%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to