Key length limitation in Mysql
When using utf8_general_ci collation in mysql, "Specified key was too long; max key length is 767 bytes" occurs. According to this post: http://stackoverflow.com/a/16820166, I modified all sa.String(length=256) to length=255 and it worked. How can we solve this problem? Should I just modify the migrations script, or create a new migration script? If I modify the old scripts, those who is already using mysql will have inconsistent column length; if I create a new script, the problem still happens because the old migration scripts will be run first.
You need to alter models.py and then generate a new migration script caravel db migrate -m "adjusting key length".
But older scripts will be run first, right? So for the clean install, the initiation will stop before the new script I create is run.
What kind of database do you use in production? Have you tried mysql? I think there are some compatibility issues - like SQLite has auto increment in primary keys by default but mysql does not.
We use MySQL in production and it works well for us.