function UniqueKey::__construct
Same name and namespace in other branches
- 11.x core/lib/Drupal/Core/Database/SchemaDefinition/UniqueKey.php \Drupal\Core\Database\SchemaDefinition\UniqueKey::__construct()
Constructor.
Parameters
string $name: The unique key name.
list<KeyColumn|string> $columns: A mix of key column specifiers, being KeyColumn objects, strings naming columns, or arrays of two elements, column name and length, specifying a prefix of the named column.
Overrides KeyBase::__construct
File
-
core/
lib/ Drupal/ Core/ Database/ SchemaDefinition/ UniqueKey.php, line 22
Class
- UniqueKey
- Describes a database unique key.
Namespace
Drupal\Core\Database\SchemaDefinitionCode
public function __construct(public readonly string $name, array $columns) {
parent::__construct($columns, FALSE);
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.