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>If you really want to do that.Try</p>

<ul>
<li><p>Add entries in <code>django_migrations</code> table like</p>

<pre><code>app                 name                         applied
&lt;thirdpartyname&gt;    003_something #without .py   2014-04-16 14:12:30.839899+08 #some date before now
</code></pre></li>
</ul>

python django django-models django-migrations