Migrations File too Large preventing Migrate

29 views
Skip to first unread message

Yoo

unread,
May 19, 2019, 10:11:47 PM5/19/19
to Django users

In Django 2.2, I run makemigrations then migrate. I wait approx. 5-7 minutes and then I get "Fatal Python error: Cannot recover from stack overflow." "Current thread 0x0002094 (most recent call first):" yada yada "File "manage.py", line 17 in main "File manage.py line 21 in <module>"


End. I check the migrations file and the file is 4000 lines of code large. What do I do in this case? Should I make my own migration files, and if so, how?

Joe Reitman

unread,
May 20, 2019, 8:12:44 PM5/20/19
to Django users
Can you show us the model your trying to migrate?

Yoo

unread,
May 21, 2019, 11:15:57 AM5/21/19
to Django users
https://stackoverflow.com/q/56213264/10973829
Originally, I posted this in StackOverflow. Not getting any responses. I looked over all my migration files, and it seems like they get continuously larger.
There are more “Test” tables than what you see in the migration files; what I’ve done was split the models.py files into multiple “apps” inside a model directory.
I’m using Django-Tagulous, and I’ve made 3 custom Tagulous tables. Some of the 99 x3 tables are connected to 1 and up to 3 tag fields. The each 99 are different in attribution, but on average they have 8 fields. I first migrated 99 tables. The next 99 would not migrate.

Peter Mudoko

unread,
May 21, 2019, 2:28:45 PM5/21/19
to django...@googlegroups.com
On Mon, 20 May 2019, 05:11 Yoo, <andrek...@gmail.com> wrote:

In Django 2.2, I run makemigrations then migrate. I wait approx. 5-7 minutes and then I get "Fatal Python error: Cannot recover from stack overflow." "Current thread 0x0002094 (most recent call first):" yada yada "File "manage.py", line 17 in main "File manage.py line 21 in <module>"


End. I check the migrations file and the file is 4000 lines of code large. What do I do in this case? Should I make my own migration files, and if so, how?

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users...@googlegroups.com.
To post to this group, send email to django...@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2f2f6361-6061-48bd-8b7f-f5297a25f8b8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages