title: django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')
body: <p>My model:</p>
  
  <pre><code>class Course(models.Model):
      language = models.ForeignKey(Language)
      name = models.CharField(max_length=50, unique=True, default='course')
      title = models.CharField(max_length=1024, default='no title')
      foreign_title = models.CharField(max_length=1024, default='no title', blank=True)
      header = models.CharField(max_length=1024, default='', blank=True)
      description = models.TextField(null=True, blank=True)
  
      def __str__(self):
          return self.title
  
      def __unicode__(self):
          return u'%s' % self.title
  </code></pre>
  
  <p>I am add "unique_together":</p>
  
  <pre><code>class Course(models.Model):
      language = models.ForeignKey(Language)
      name = models.CharField(max_length=50, unique=True, default='course')
      title = models.CharField(max_length=1024, default='no title')
      foreign_title = models.CharField(max_length=1024, default='no title', blank=True)
      header = models.CharField(max_length=1024, default='', blank=True)
      description = models.TextField(null=True, blank=True)
  
      class Meta:
          unique_together = ['language', 'name', 'title']
  
      def __str__(self):
          return self.title
  
      def __unicode__(self):
          return u'%s' % self.title
  </code></pre>
  
  <p>In-migration time getting the error:</p>
  
  <pre><code> django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 767 bytes')
  </code></pre>
  
  <p>My DB is: 
      mysql  Ver 15.1 Distrib 10.0.17-MariaDB, for debian-linux-gnu (x86_64) using readline 5.2</p>
  
  <p>I tried to increase the length of the index mysql:</p>
  
  <pre><code>MariaDB [(none)]&gt; set global innodb_file_format = BARRACUDA;
  Query OK, 0 rows affected (0.00 sec)
  
  MariaDB [(none)]&gt; set global innodb_large_prefix = ON;
  Query OK, 0 rows affected (0.00 sec)
  </code></pre>
  
  <p>But this is still not enough:</p>
  
  <pre><code>django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 3072 bytes')
  </code></pre>
  
  <p>The problem index length. How to specify the length limit Django index?</p>