function Column::int
Returns a Column object for an int column.
7 calls to Column::int()
- BatchStorage::schemaDefinition in core/
lib/ Drupal/ Core/ Batch/ BatchStorage.php - Defines the schema for the batch table.
- hook_schema in core/
lib/ Drupal/ Core/ Database/ database.api.php - Define the current version of the database schema.
- locale_schema in core/
modules/ locale/ locale.install - Implements hook_schema().
- SchemaDefinitionConversionTest::testConvertTableDefinition in core/
tests/ Drupal/ Tests/ Core/ Database/ SchemaDefinitionConversionTest.php - Tests Table::toArray().
- SchemaDefinitionTest::testIntDefaultForIntColumn in core/
tests/ Drupal/ Tests/ Core/ Database/ SchemaDefinitionTest.php - Tests passing a int default to an int column.
File
-
core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ Column.php, line 356
Class
- Column
- Describes a database table's column.
Namespace
Drupal\Core\Database\SchemaDefinitionCode
public static function int(string $name, ?string $description = NULL, ?ColumnSize $size = NULL, ?bool $notNull = NULL, IntValue|NullValue|null $default = NULL, ?bool $unsigned = NULL) : self {
return self::create(type: ColumnType::Int, name: $name, description: $description, size: $size, notNull: $notNull, default: $default, unsigned: $unsigned);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.