I got this error ModuleNotFoundError: No module named 'django.db.migrations.migration' after i tried these below steps
python3 manage.py migrate --fake resources zero (resources is my
app name)find . -path "*/migrations/*.py" -not -name "__init__.py" -deletefind . -path "*/migrations/*.pyc" -deletepython3 manage.py showmigrationsNote: used PostgreSQL
How to resolve this issue?
By running those commands you might have accidentally deleted the migrations module. Try reinstalling Django via pip.
pip uninstall django
pip install django
Take note of the version of Django you are using. In case you aren't using the latest version for your python environment install using the following command
pip install django==<version goes here>
Edit:-
Drop the existing database schema. Delete the migrations folder and recreate an empty one in its place.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With