phemellc / yii2-settings

Yii2 Settings Module
Other
151 stars 74 forks source link

migratoin error #73

Open celsoft opened 6 years ago

celsoft commented 6 years ago

clip2net_171222165553

schmunk42 commented 6 years ago

Which database in which version do you use?

celsoft commented 6 years ago

clip2net_171225081436

askobara commented 6 years ago

There is a problem with your default charset of the table. Here you could look for explaining what is happens. As a temporary solution I suggest changing of charset to latin1.

askobara commented 6 years ago

Related to #42 and #52

schmunk42 commented 6 years ago

Please do not change the charset to latin1. We need to find another solution.

schmunk42 commented 6 years ago

Based on this answer it should actually be OK, since the field is VARCHAR(255) and it's UTF8 which has 3 bytes, which should sum up to 765.

But this is for MySQL, not Percona .... the question is, if Percona has the same values, since the error complains about exceeding a key length of 1000, which could be related to Percona using UTF8MB4 with 4 bytes per char(?)

Could someone on Percona debug this by setting the key length to 249 (or 250), which should result in a key length of 996 (or 1000) and therefore work.

CC: @handcode

askobara commented 6 years ago

Why not? Whats wrong with latin1? I guess, using utf8 symbols as keys for settings is not a common solution

schmunk42 commented 6 years ago

Might not be common, but I'd rather prefer a bit shorter key, than having one column in my DB which is not UTF8.