We have made modifications to our models and are encountering unexpected errors. We deleted our databases and recreated them, as well as the ‘pycache’ and ‘migrations’ folders. We then recreated the migrations folder in each app with an ‘init.py’ file. However, when we ran ‘makemigrations’ in Django, it still created old model migration files, specifically in ‘0002_initial.py’, even though those models were nowhere to be found. We also tried deleting the database and recreating it with a different name, but we still encountered errors related to mismatched relations.
We have tried everything, including resetting all, fake migrating, zero attempts, restarting the PC, running in another text editor, and shutting down the PC. However, we are still encountering the same problem.
I believe that there may be a bug in Django that needs to be fixed, as we have also raised many issues in the community, but have not received any solutions.
still, refer to the modified model name.:
For more reference, regarding our problem related to this event, that guy did not get any solution too: Resetting migrations