Modify ↓
Ticket #333 (closed defect: fixed)
Changing from ForeignKey to ManyToManyField Causes Indentation Error in backwards()
| Reported by: | tclancy@… | Owned by: | andrew |
|---|---|---|---|
| Priority: | minor | Milestone: | 0.7 |
| Component: | migrations | Version: | 0.6.2 |
| Keywords: | Cc: |
Description
This may be a result of the fact I was adding a new table at the same time I was changing from a FK to a M2M field, but this happened to me twice. The backwards method looks like:
def backwards(self, orm):
# Deleting model 'ProductPromotion'
db.delete_table('products_productpromotion')
models = {
# stripped for brevity
}
which causes the forwards migration to fail given the improper indentation.
Attachments
Change History
comment:2 Changed 3 years ago by andrew
- Status changed from new to assigned
- Milestone set to 0.7
Two questions:
- What Django version are you running?
- Are you running off of the 0.6.2 release, or the slightly-different version in trunk?
comment:3 Changed 3 years ago by tclancy@…
Django 1.1.1 - final
0.6.2 according to init.py. Is that the right place to check?
comment:4 Changed 3 years ago by andrew
- Status changed from assigned to infoneeded
This should be fixed now in 0.7 - could you confirm?
Note: See
TracTickets for help on using
tickets.

I just re-attempted this without the (unrelated) new table complication and ran into the same indentation issue.