Expand description
Long content columns on MySQL.
The framework renders an unbounded String as TEXT on MySQL, which
holds 65,535 bytes; Postgres text and SQLite TEXT are unbounded. A
long StreamField body, translation blob or snippet overflows it: strict
mode refuses the save (ERROR 1406) and non-strict mode truncates the
JSON. Until the framework maps these to a long type,
widen_long_text converts them in place.
Its text columns also inherit MySQL’s default collation, which is
case- and accent-insensitive, so /ABOUT served /about and slugs
Hero and hero could not coexist. exact_identity_columns gives
the columns the CMS looks things up by a case- and accent-sensitive
collation instead.
Functions§
- exact_
identity_ columns - On MySQL, give the CMS’s identity columns a case- and accent-sensitive
collation (
utf8mb4_0900_as_cson MySQL 8), keeping each column’s type, nullability and default. Returns how many columns it changed; a no-op off MySQL and on a column already converted. - widen_
long_ text - On MySQL, turn every
TEXTcolumn that a registered model declares as an unboundedStringintoLONGTEXT, keeping its nullability and collation. Returns how many columns it changed.