I maintain an application we use at work. Last week I updated my homestead that I use to run the application local. For some reason I now get an error when some queries run. The query used to work but it now gives the following error:
SQLSTATE[42000]: Syntax error or access violation: 1071 Specified key was too long; max key length is 1000 bytes
.
The query that produces the error is:
CREATE TABLE IF NOT EXISTS surveyswitch_data (
`survey_from` INT( 11)NOT NULL ,
`survey_to` INT( 11)NOT NULL ,
`name` VARCHAR( 255)NOT NULL ,
`value` VARCHAR( 255)NOT NULL ,
PRIMARY KEY (`survey_from` ,`survey_to` ,`name`)
) ENGINE=MYISAM;
The only thing that has changed is that I updated homestead, that includes apache and mysql. The mysql version on homestead is 5.7.28 now. On our server, where the query still works, we have mysql 5.7.27.
I already tried to change to innodb_large_prefix on. That didn't help. What setting should I change to make it work again?