27👍
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
10👍
From the docs:
be warned that using –fake runs the risk of putting the migration state table into a state where manual recovery will be needed to make migrations run correctly.
So I suggest you to simply remove faked migrations from django_migrations
table.
- [Django]-What's the difference between ContentType and MimeType?
- [Django]-How to add button next to Add User button in Django Admin Site
- [Django]-Django equivalent of SQL not in
Source:stackexchange.com