I\'m using django 1.9.6. I recently deleted my migrations and ran migrate --run-syncdb
and makemigrations my_app
. Today I added a new field to one of m
Delete every past migration files and __pycache__ files except __init__ then:
python manage.py makemigrations yourApp
After that make sure that the db is the same as the code in model.py (remove new changes) and run next line:
python manage.py migrate --fake-initial
Now add all your changes in the model.py and run next lines:
python manage.py makemigrations
python manage.py migrate
Best Regards, Kristian