Modify

Ticket #333 (closed defect: fixed)

Opened 4 years ago

Last modified 3 years ago

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:1 Changed 4 years ago by tclancy@…

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

comment:2 Changed 4 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 4 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 4 years ago by andrew

  • Status changed from assigned to infoneeded

This should be fixed now in 0.7 - could you confirm?

comment:5 Changed 4 years ago by andrew

  • Status changed from infoneeded to closed
  • Resolution set to fixed

comment:6 Changed 4 years ago by tclancy@…

Sorry, I've been postponing this reminder forever.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.