Django 1.9 drop foreign key in migration
<p>I have a Django model that has a foreign key to another model:</p>

<pre><code>class Example(models.Model)
   something = models.ForeignKey(SomeModel, db_index=True)
</code></pre>

<p>I want to keep the underlying DB column as a field, but to get rid of the foreign key constraint in the database.</p>

<p>So the model will change to:</p>

<pre><code>class Example(models.Model):
   something_id = models.IntegerField() 
</code></pre>

<p>And, to be clear, <code>something_id</code> is the column that Django had created for the foreign key field.</p>

<p>I do not want to drop the column and re-create it (this is what Django does when I auto-generate migrations after changing the model as above).</p>

<p>I want to keep the field <em>but</em> I want to remove the foreign key constraint in the database with a migration. It's not clear to me how to do this with a Django migration - is there some built in support for it or do I have to run some raw SQL and, if so, how do I programatically get the name of the constraint?</p>