When using SQLAlchemy and Unicode fields having unique length of 256 we get
a unique index length of 256 * 3 = 768 bytes, and 767 are allowed!
This causes an error:
"sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 1071
(42000): Specified key was too long; max key length is 767 bytes"
While the length of the 255 is quite enough to store uuid4 - hashes.
When using SQLAlchemy and Unicode fields having unique length of 256 we get a unique index length of 256 * 3 = 768 bytes, and 767 are allowed! This causes an error: "sqlalchemy.exc.ProgrammingError: (mysql.connector.errors.ProgrammingError) 1071 (42000): Specified key was too long; max key length is 767 bytes"
While the length of the 255 is quite enough to store uuid4 - hashes.