#22460 closed Bug (fixed)
Fix of removal of a ForeignKey field in a migration in MySQL
Reported by: | motiejus | Owned by: | nobody |
---|---|---|---|
Component: | Migrations | Version: | dev |
Severity: | Normal | Keywords: | |
Cc: | Triage Stage: | Accepted | |
Has patch: | yes | Needs documentation: | no |
Needs tests: | no | Patch needs improvement: | no |
Easy pickings: | no | UI/UX: | no |
Description
Consider the following:
- A model has a ForeignKey() field.
- Migration tries to remove it.
- BAM! in MySQL:
OperationalError: (1025, "Error on rename of './test_myapp/test_rfk_rider' to './test_myapp/#sql2-3398-2e8' (errno: 152)")
Here is a patch with a regression test: https://github.com/django/django/pull/2571
Change History (3)
comment:1 by , 11 years ago
Triage Stage: | Unreviewed → Accepted |
---|
comment:2 by , 11 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Note:
See TracTickets
for help on using tickets.
In 0e45669fa9eb82c6de8e226c6da53ab5e88575f5: