#21280 closed Bug (fixed)
Avoid generating empty migrations on serialization failures
Reported by: | Tim Graham | Owned by: | |
---|---|---|---|
Component: | Migrations | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | no | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
If a model fails to serialize, an empty migration file will be generated which needs to be removed manually. You'll get an error like "django.db.migrations.loader.BadMigrationError: Migration 0001_initial in app auth has no Migration class" if you try to migrate without doing so.
We should either verify that there won't be any errors before creating the migration file or remove the empty file if there is an error.
Change History (3)
comment:1 by , 11 years ago
comment:2 by , 11 years ago
Owner: | set to |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
Submitted a simple fix: https://github.com/django/django/pull/1761