My model:
class Course(models.Model):
language = models.ForeignKey(Language)
name = models.CharField(max_length=50, unique=True, default=\'course\')
I think all 4 of these things are needed:
SET GLOBAL innodb_file_per_table = ON,
innodb_file_format = Barracuda,
innodb_large_prefix = ON;
CREATE/ALTER TABLE ...
ROW_FORMAT = DYNAMIC or COMPRESSED
This should get past the limit of 767 bytes for one column, but won't get past the 3072 bytes limit for the entire index.
In order to have a compound unique index composed of strings, normalize some of the strings. Replacing a long string with a 4-byte INT will shrink the index below the limit.