I'm working on a Django project, and had some trouble which a coworker helped me overcome. However, when we were investigating the issue, she deleted a migration because it seemed to cause some issues. At the end, the issue wasn't related to that, but she left the company now.
The project seemed fine, until I tried to apply a change to a model and run "makemigrations" and "migrate", and saw some errors, stating that Migration <migration_name> is applied before its dependency <migration2> on database 'default'
.
For what I saw online and my coworker told me, I decided to delete the local database and the migrations and re-do them. But when I tried to make the migrations from scratch, some errors appeared, and I tried to recover the migrations in our production server and copy them to my local project, to maybe migrate those instead of generating them on my local project.
However, I still can't run the project properly, even with the "good" migrations I got from the production server, it still says that a migration is applied before its dependency. I tried migrating each migration individually, with
python manage.py migrate project_name migration_name
But it says the same exact error, so I don't know if my syntax is incorrect or what am I not understanding. What would you recommend me do, or what could be wrong with what I've done? I'm relatively new to Django, so I don't know where to look anymore.