Generated migration blocks my application

66 views
Skip to first unread message

Oliver Meinusch

unread,
Nov 26, 2014, 3:19:35 PM11/26/14
to django...@googlegroups.com
Hello everybody,

I am very big fan of Django. I found Django and Python after several years of php development and working with Python and Django feels like loosing all chains you have never known about ;)
In my free time I am developing a web application and cms for my local theatre group. Because I use a lot of open source code I decided to release my application under the MIT license and maybe some other person may use it. If not, it's okay too. I learn a lot. 
The beginning of my project was with Django 1.5 and currently I try to migrate from django 1.6 to django 1.7. Of course, I want to use migrations because it removes a lot of pain upgrading the application on the live environment.

My environment is windows 7 x64 with Python 2.7.8 (default, Jun 30 2014, 16:03:49) [MSC v.1500 32 bit (Intel)] on win32 with the following packages installed:

Django==1.7.1
Pillow==2.6.1
Unidecode==0.04.16
django
-countries==3.0.1
django
-iban==0.3.0
django
-thumbs==0.4
icalendar
==3.8.4
markdown2
==2.3.0
psycopg2
==2.5.4
pytz
==2014.9
virtualenv
==1.11.6
virtualenvwrapper
-powershell==12.7.8
zxcvbn
==1.0


I created the migrations for all apps and tested after every migration my application (.\manage.py test). This works always, but once.

I created my last migration, for an app called organization. After this, without any problems, I run my test again. But nothing happens. One CPU core is utilized with 100% and even travis-ci.org aborts after ten minutes.

After I canceled the migrate I checked the database. There's only an empty table called django_migrations.

I have commited my migration-branch to GitHub. There you can see my full organization/0001_initial.py. I do not post it here because it has about 300 lines. I think, it's kind of a recursion problem but I have no idea where to start. I tried to uncomment some dependencies-entries in the initial-file but this does not help.

What is the problem with my last migration? How can I solve it? This problem is currently a really hard blocker and I have no ideas since days. Frankly, this forum/user-group is my last hope.

Oliver Meinusch

unread,
Nov 29, 2014, 4:39:17 AM11/29/14
to django...@googlegroups.com
I solved the problem by myself using the debugger to see there IS a recursion problem with dependecies. I created a migration file by my own which applies to fields to models which needs my first model. Now my problem is gone.

Markus Holtermann

unread,
Nov 29, 2014, 8:28:50 AM11/29/14
to django...@googlegroups.com
Hey Oliver,

Can you try out the current 1.7 development branch. There is a fix [1] for a recursion problem in the migration graph. Would be interesting if that fixes your problem. Thanks.


/Markus

Oliver Meinusch

unread,
Nov 29, 2014, 11:43:12 AM11/29/14
to django...@googlegroups.com
Hi Markus,

thanks for your answer. As stated, I already solved my problem. I am happy and can focus on my development :) Sorry, that I can not contribute any further investigation.
Reply all
Reply to author
Forward
0 new messages