I'm having a constant problem. As I'm working with several branches in a project, sometimes I go back in an old branch, I bring branch updated to old so I do not have to be creating old bank migration. So every time of the problem with migrations. Sometimes it's an absurd mistake and I delete everything, the migrations, the base and recomecho. This works, so the migration files are different. So when I'm going to migrate the error because it's missing a file or dependency.
I would like to understand the process that I have to do to avoid or solve these problems. Remembering that I have an environment in production, that even if it is not available to the user, this type of problem can probably happen.
In my case the problem is this:
django.db.migrations.exceptions.NodeNotFoundError: Migration comunidade.0011_auto_20170608_1556 dependencies reference nonexistent parent node ('comunidade', '0010_auto_20170605_1809')
When I enter the file, it has a dependency on the file:
0010_auto_20170605_1809
But you do not have this file. For it was probably deleted or something. I could try manually switching to the last file, 0002_auto_20170621_1721
. However, it has validation in the bank, I think it is not the ideal.
I tried to make migrate zero, but the error keeps on giving. I made a --fake (they already told me it's pork) and nothing.
I need some hint. I'm using Django 1.10 and Python 3.4