Skip a list of migrations in Django
<p>I have migrations <code>0001_something</code>, <code>0002_something</code>, <code>0003_something</code> 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</p>

<p><code>python manage.py migrate &lt;third_party_app_name&gt; 0003 --fake</code></p>

<p>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 <code>python manage.py migrate</code> and it would automatically recognize that 3 migrations need to be faked. Or if there is any way to always fake <code>0001</code>, <code>0002</code> and <code>0003</code>.</p>

<p>If this was in my own app, I could simply remove the migration files but it is a third party app installed via. <code>pip</code> and I don't want to change that.</p>

<p>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.</p>

python django django-models django-migrations