function Column::text
Returns a Column object for a text column.
4 calls to Column::text()
- SchemaDefinitionTest::testInvalidPrimaryKeyForPartialLengthColumn in core/
tests/ Drupal/ Tests/ Core/ Database/ SchemaDefinitionTest.php - Tests passing limited length columns to primary key.
- SchemaDefinitionTest::testInvalidUniqueKeyForPartialLengthColumn in core/
tests/ Drupal/ Tests/ Core/ Database/ SchemaDefinitionTest.php - Tests passing limited length columns to an unique key.
- SchemaDefinitionTest::testNullDefaultForTextColumn in core/
tests/ Drupal/ Tests/ Core/ Database/ SchemaDefinitionTest.php - Tests passing a null default to a text column.
- SchemaDefinitionTest::testStringDefaultForTextColumn in core/
tests/ Drupal/ Tests/ Core/ Database/ SchemaDefinitionTest.php - Tests passing a string default to a text column.
File
-
core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ Column.php, line 330
Class
- Column
- Describes a database table's column.
Namespace
Drupal\Core\Database\SchemaDefinitionCode
public static function text(string $name, ?string $description = NULL, ?bool $serialize = NULL, ?ColumnSize $size = NULL, ?bool $notNull = NULL, StringValue|NullValue|null $default = NULL, ?int $length = NULL, ?bool $binary = NULL) : self {
return self::create(type: ColumnType::Text, name: $name, description: $description, serialize: $serialize, size: $size, notNull: $notNull, default: $default, length: $length, binary: $binary);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.