Reputation: 807
In my project which is based on django-1.8.2 I was facing some problems with migrations so i ran command
python manage.py migrate --fake
But it faked all the migrations which this command is meant for. But now python manage.py migrate
command is not doing or applying any migration. I want to undo the faked migrations so that I can apply the migrations to database. I want to apply the existing migrations to the database.
Upvotes: 24
Views: 15448
Reputation: 308849
For each app, you can fake the migrations back to where they were before you faked them.
python manage.py migrate --fake myapp 00XX_last_migration
where 00XX_last_migration
is the last migration that you actually ran for your app myapp
.
Or, if you haven't actually run any migrations for that app yet:
python manage.py migrate --fake myapp zero
Upvotes: 29