function SchemaTest::testUnsignedField

Same name and namespace in other branches
  1. 10 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\pgsql

Code

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);
}

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.