Skip to content

Migrator

text()

text() — returns any

Available in: tabledefinition Category: Table Definition Functions

Adds text columns to table definition. In MySQL databases, you can specify different text sizes:

  • Regular TEXT (65KB) - default when no size is specified
  • MEDIUMTEXT (16MB) - specify size=“mediumtext”
  • LONGTEXT (4GB) - specify size=“longtext” For other database engines, the size parameter is ignored and the default text type is used.
NameTypeRequiredDefaultDescription
columnNamesstringno
defaultstringno
allowNullbooleanno
sizestringno