Django throws that error if there is more than one “end migration”, or leaf node in the migrations dependency tree. I guess in your case the dependency tree would look something like this:
That the issue comes from the fact that in that project there were model changes that created additional migrations that diverge from the core codebase (for example, the
0040_auto_20210726_2000 migration doesn’t appear in the core app). Then, when you pulled the changes that include the new migrations, there are two leaf nodes and Django doesn’t know which one should apply first.
So there’s two posible methods to solve this problem:
Modify one of the migrations and add as a dependency the other leaf node so there is only one path (modifying the
dependencies attribute inside the
makemigrations --merge to let Django handle it for you, like you already did. It should have created an additional migration file, you can check it and see if everything there makes sense. If not, you can revert to the point previous to the conflict using
python manage.py migrate oppia [migration_name] and use the first method.
If you didn’t find any issue, likely the
--merge command worked correctly, but it would be good to double check in that migration file.