Skip a list of migrations in Django
The django knows about applied migrations is only through migration history table. So if there is no record about applied migration it will think that this migration is not applied. Django does not check real db state against migration files.
I have migrations 0001_something, 0002_something, 0003_something in a third-party app and all of them are applied to the database by my own app. I simply want to skip these three migrations. One option is to run the following command
python manage.py migrate <third_party_app_name> 0003 --fake
But I don't want to run this command manually. I was thinking if there can be any method by which I can specify something in settings to skip these migrations. I would simply run python manage.py migrate and it would automatically recognize that 3 migrations need to be faked. Or if there is any way to always fake 0001, 0002 and 0003.
If this was in my own app, I could simply remove the migration files but it is a third party app installed via. pip and I don't want to change that.