function SchemaTest::testUnsignedField
Same name in other branches
- 11.x core/modules/pgsql/tests/src/Kernel/pgsql/SchemaTest.php \Drupal\Tests\pgsql\Kernel\pgsql\SchemaTest::testUnsignedField()
Tests column name escaping in field constraints.
File
-
core/
modules/ pgsql/ tests/ src/ Kernel/ pgsql/ SchemaTest.php, line 371
Class
- SchemaTest
- Tests schema API for the PostgreSQL driver.
Namespace
Drupal\Tests\pgsql\Kernel\pgsqlCode
public function testUnsignedField() : void {
$table_name = 'unsigned_table';
$table_spec = [
'fields' => [
'order' => [
'type' => 'int',
'unsigned' => TRUE,
'not null' => TRUE,
],
],
'primary key' => [
'order',
],
];
$this->schema
->createTable($table_name, $table_spec);
$this->assertTrue($this->schema
->tableExists($table_name));
}
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.