Corrupted Migration?

2015-09-30 Thread Daniel Chen
Hi all, A migration I was running (manage.py migrate) died in the middle. I deleted the migration file, fixed the problem (wrong default value), recreated the migration, and re-ran it. But now, I'm getting an inconsistent state (error message: [Model] has no field named [field]). When I check t

Re: Corrupted Migration?

2015-09-30 Thread Daniel Chen
en at the model level. So, now I'm stuck with a model state that the previous migrations don't capture. On Wednesday, September 30, 2015 at 5:08:22 AM UTC-7, Mike Dewhirst wrote: > > On 30/09/2015 4:16 PM, Daniel Chen wrote: > > Hi all, > > > > A migration I was

Re: Corrupted Migration?

2015-09-30 Thread Daniel Chen
te Y. My database is still in state X. Does that make sense? On Wednesday, September 30, 2015 at 4:10:18 PM UTC-7, Mike Dewhirst wrote: > > On 1/10/2015 6:51 AM, Daniel Chen wrote: > > Thanks for the reply. I should have mentioned that I tried all of that: > > the problem i

Re: Corrupted Migration?

2015-10-02 Thread Daniel Chen
@Mike: I'm using Python 2.7.10 and Django 1.7. I'm not sure the ticket applies, but I appreciate the link! @James: Sorry, I misspoke! [field] actually corresponds to a old field in state X. Before adding the new fields in state Y, the migration is trying to remove some old fields in state X but

Re: Corrupted Migration?

2015-10-02 Thread Daniel Chen
@Mike: I'm using Python 2.7.10 and Django 1.7. I'm not sure the ticket applies, but I appreciate the link! @James: Sorry, I misspoke! [field] actually corresponds to a old field in state X. Before adding the new fields in state Y, the migration is trying to remove some old fields in state X but

Re: Corrupted Migration?

2015-10-20 Thread Daniel Chen
Hi all, Thanks for all the help! Sorry for the incredibly slow response, but I just wanted to give an update: The problem was that I was trying to remove a foreign key (let's call that foreign key "book", referencing a "book" table). I had to manually go into the migration and add '_id' (e.g.,

Re: Corrupted Migration?

2015-10-22 Thread Daniel Chen
RemoveField operation below the AlterUniqueTogether operation in the migration file. (Also, it turns out that removing the "_id" suffix didn't matter after all). Thanks again for the help, everyone! On Tuesday, October 20, 2015 at 10:18:02 PM UTC-7, Daniel Chen wrote: > &g