If you want to remove all database migration settings and start from zero base
you can use “migrate –fake”.
Follow the bellow process will helps you to reset your jango database env.

[delete migration file]

go to your app folder then you will see folder name “migration” delete all the contents inside that folder except __init__.py

[make new migrations]

python manage.py makemigrations

[reset migration]

python manage.py migrate --fake <app-name> zero

[migrate new data base]

python manage.py migrate

 

 

Categories: Django

Leave a Reply

Your email address will not be published. Required fields are marked *