[Solved]-Django 1.7 makemigrations freezing/hanging


You should try disabling all of your installed_apps and seeing if that solves the problem. If it does, isolate the one causing the issues. Then set debugging traces.


Django 1.7 had this bug apparently that can cause migrations for a large enough number of models to freak out. They said they were doing something about this, and seems like they might have fixed it in 1.7.1.


It’s the third entry, and there’s a few more improvements that may be connected to this.

Heard it first in this talk, hope it solves your problem: https://www.youtube.com/watch?v=bjIXZ-XX2SM


Are there open connections to the database you’re migrating? If so, that is probably the reason your migration hangs. See this south bug for more information. I realise that Django 1.7 does not use south and that bug refers specifically to south. Migrations are built directly in Django 1.7, but since other people have the same problem, I fear this issue is still around.


I had exactly the same issue, and as suggested in another answer i tried to eliminate applications in INSTALLED_APPS and then found my app which was causing this behavior.

Finally this line of code was the cause:

import fabric

when i removed it everything worked fine.


I noticed (following first django tutorial) that adding new field to the model class causes makemigrations to hang. Editing existing field, removing field, adding new model class – it all works, only adding new field to existing class hangs. Im not sure if this is also the case in 1.8 version.

Edit: this only happens in git bash under windows 7. when I try windows cmd console – it works.


Leave a comment