Opened 10 years ago

Last modified 10 years ago

#24573 closed Bug

"Unknown column" exception after removing field in migration. — at Initial Version

Reported by: Tomasz Główka Owned by: nobody
Component: Migrations Version: 1.8
Severity: Release blocker Keywords:
Cc: joostrijneveld@… Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

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.

Change History (2)

by Tomasz Główka, 10 years ago

Attachment: 0001_inital.py added

by Tomasz Główka, 10 years ago

Attachment: traceback.py added
Note: See TracTickets for help on using tickets.
Back to Top