django-squash
django-squash copied to clipboard
Hello again, sorry I missed your answer. So I plan to reopen issue, cause I tried to squash my migrations again :)
Hello again, sorry I missed your answer. So I plan to reopen issue, cause I tried to squash my migrations again :)
I get this error again:
Traceback (most recent call last):
File "manage.py", line 21, in <module>
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 419, in execute_from_command_line
utility.execute()
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django/core/management/__init__.py", line 413, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django/core/management/base.py", line 354, in run_from_argv
self.execute(*args, **cmd_options)
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django/core/management/base.py", line 398, in execute
output = self.handle(*args, **options)
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django/core/management/base.py", line 89, in wrapped
res = handle_func(*args, **kwargs)
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django_squash/management/commands/squash_migrations.py", line 102, in handle
squashed_changes = autodetector.squash(
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django_squash/management/commands/lib/autodetector.py", line 241, in squash
self.convert_migration_references_to_objects(real_loader, graph, changes)
File "/Users/f.eremeev/haut_ai_team/sasuke/backend/saas_core/venv/lib/python3.8/site-packages/django_squash/management/commands/lib/autodetector.py", line 202, in convert_migration_references_to_objects
dependency = tuple(migrations[-1])
IndexError: list index out of range
I have 126 migrations. I think that I don't have self referencing migrations, only merge migrations, referencing others. I think I didn't have any monkey patches. But maybe you could give one little example, how this could be performed. My django-named packages:
pip list | grep django
django-extensions 3.1.3
django-pglocks 1.0.4
django-polymorphic 3.0.0
django-prometheus 2.1.0
django-squash 0.0.6
djangorestframework 3.12.4
djangorestframework-csv 2.1.1
flake8-django 1.1.2
pytest-django 4.2.0
I don't know where could I start debugging =/
Originally posted by @eremeevfd in https://github.com/kingbuzzman/django-squash/issues/5#issuecomment-866655775
Sorry for the late reply, but without your migrations I'm not sure how i can help you. If you can copy all your <app>/migrations/* and add them somewhere, so I can replicate it. You can delete all the operations = [...] but i need the dependencies = [...].
Or if you can create a dummy project where you can replicate your issue without giving too much away of your code/project? I would love to help you.
Cheers.
@eremeevfd ?
@eremeevfd ?
@eremeevfd ? I will close this if I don't get a reply soon.