Django MySQL Add ForeignKey
<p>In Django when I change a column, regardless of its datatype, to a foreignkey reference, it doesn't seem to be working.  As an example:</p>

<p><strong>models.py From:</strong></p>

<pre><code>company_id = models.IntegerField(db_column='Company ID', blank=True, null=True)
</code></pre>

<p><strong>models.py To:</strong></p>

<pre><code>company_id = models.ForeignKey('TblCompanies', db_column='Company ID', null=True, on_delete=models.CASCADE)
</code></pre>

<p>When I makemigrations &amp; migrate it shows as "OK"; no issues.  But when I check the DB, it doesn't show these changes as foreign keys, but instead indexes.  </p>

<p>I'm not an SQL server guru by any means, but generally when I start apps <em>from scratch</em>, this is not a problem.  I would see foreign keys right away.  In the KEY_COLUMN_USAGE table I would see the associated reference_table _schema, table_name and column_name.  </p>

<p>In this case I am converting a web site and am bringing over the data from the old SQL server.  In the above mentioned table and columns, they show as NULL.  </p>

<p>What am I missing here?</p>

<p>Here is the output of CREATE TABLE <code>tbl Communications</code> which uses two foreign keys.  The reference tables SHOULD be <code>tbl Customers</code>.<code>Company ID</code> and <code>tbl Contacts</code>.<code>Contact ID</code></p>

<pre><code>    tbl Communications | CREATE TABLE `tbl Communications` (
  `Comm ID` int(11) NOT NULL AUTO_INCREMENT,
  `Contact ID` int(11) DEFAULT '0',
  `Rep` varchar(50) DEFAULT NULL,
  `DateTime` datetime DEFAULT NULL,
  `Type` varchar(50) DEFAULT NULL,
  `Notes` longtext,
  `Task ID` int(11) DEFAULT '0',
  `Initiator` varchar(50) DEFAULT NULL,
  `Alert` varchar(50) DEFAULT NULL,
  `Date Entered` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `Company ID` int(11),
  KEY `Comm ID` (`Comm ID`),
  KEY `Contact ID` (`Contact ID`),
  KEY `DateTime` (`DateTime`),
  KEY `Task ID` (`Task ID`),
  KEY `tbl Communications_Company ID_2dac354a_uniq` (`Company ID`),
  KEY `tbl Communications_Contact ID_01d40200_uniq` (`Contact ID`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8
</code></pre>