title: Django Migration Error with MySQL: BLOB/TEXT column 'id' used in key specification without a key length"
body: <p>We have Django Model, use Binary Field for ID.</p>
  
  <pre><code># Create your models here.
  class Company(models.Model):
      id = models.BinaryField(max_length=16, primary_key=True)
      name = models.CharField(max_length=12)
  
      class Meta:
          db_table = "company"
  </code></pre>
  
  <p>We use MySQL Database and have error when migrate.</p>
  
  <pre><code>  File "/home/cuongtran/Downloads/sample/venv/lib/python3.5/site-packages/MySQLdb/connections.py", line 270, in query
      _mysql.connection.query(self, query)
  django.db.utils.OperationalError: (1170, "BLOB/TEXT column 'id' used in key specification without a key length")
  </code></pre>
  
  <p>Do you have any solution? We need to use MySQL and want to use the Binary Field for ID.</p>
  
  <p>Thank you!</p>