-
-
Notifications
You must be signed in to change notification settings - Fork 57
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Database schema: Specified key was too long #221
Conversation
We need the field to be longer than 255 characters. And we still want to set a btree index, because in most of the cases, the paths will be shorter than 333 characters. The discussion is here: contao/core#5556 |
I just tried to reproduce the issue, but the tables were all created without problems. Which MySQL version are you running? |
5.6.12 |
I will give another shot as well (with newest develop). |
Are you using InnoDB? It seems you can fix it by changing the innodb_large_prefix setting. |
Using |
And still getting the exception on a fresh created database. |
No idea. Are you running MySQL in strict mode? |
That's a good question! It actually looks like that:
|
Disabling |
Yes, we are trying to maintain strict mode compatibility. |
Fixed in 84f7029. Will have to back port this to Contao 3.5. |
Nice, thanks! |
During a fresh install on
contao/install
while creating the tables:It would acutally work with
varchar(333)
- max key length = 1000 bytes, UTF-8 character uses 3 bytes, so max length of thevarchar
is 333 (see 5fbe4a9).What's the reason to use
varchar(1022)
for the fieldpath
?