8.4.4: Exception executing CREATE TABLE VARCHAR(256) Specified key too long
Permalink
Hello,
Some websites, depending on database settings, throw exceptions when a 256 long key is used:
Does it only happen with DBs set up without unicode? Is there a solution to fix the exception without reducing the key length, e.g. changing from ANSI to Unicode or something? Or what should be the max length of the key? Is this concrete5 related or DB related?
Thank you.
Some websites, depending on database settings, throw exceptions when a 256 long key is used:
Does it only happen with DBs set up without unicode? Is there a solution to fix the exception without reducing the key length, e.g. changing from ANSI to Unicode or something? Or what should be the max length of the key? Is this concrete5 related or DB related?
Thank you.
I believe the max for VARCHAR is 255 characters and you have 256
Looks like this is DB server related. Most servers are configured with the full utf8 charset 'utf8mb4' using 4 bytes per character, some are with just utf8 'utf8' using 3 bytes and some are latin1 using just 1 byte. This creates exceptions during installation with DB table setup using string keys.
How can I know the DB configuration with Doctrine setup? Or should I limit the max char length to the worst case of 'utf8mb4', i.e. 191?
What does concrete5's Doctrine use by default: utf8 or utf8mb4?
Is that server or concrete5 related?
How can I know the DB configuration with Doctrine setup? Or should I limit the max char length to the worst case of 'utf8mb4', i.e. 191?
What does concrete5's Doctrine use by default: utf8 or utf8mb4?
Is that server or concrete5 related?