Opened 9 years ago

Last modified 9 years ago

#25793 closed Bug

Removing an MTI model generates an incorrect migration — at Version 1

Reported by: Ned Batchelder Owned by: nobody
Component: Migrations Version: 1.8
Severity: Normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description (last modified by Ned Batchelder)

I had a model that inherited from two other models but added no fields of its own. When I removed the model and generated the migration, it was an invalid migration. It deleted each field individually, and then dropped the table. The problem is that you cannot drop the last field in a table, so the migration will not run.

A demonstration is at https://github.com/nedbat/django_issue_25793

Change History (1)

comment:1 by Ned Batchelder, 9 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.
Back to Top