protected function TransactionTest::executeDDLStatement

Executes a DDL statement.

1 call to TransactionTest::executeDDLStatement()
TransactionTest::testTransactionWithDdlStatement in drupal/core/modules/system/lib/Drupal/system/Tests/Database/TransactionTest.php
Tests the compatibility of transactions with DDL statements.

File

drupal/core/modules/system/lib/Drupal/system/Tests/Database/TransactionTest.php, line 336
Definition of Drupal\system\Tests\Database\TransactionTest.

Class

TransactionTest
Tests transaction support, particularly nesting.

Namespace

Drupal\system\Tests\Database

Code

protected function executeDDLStatement() {
  static $count = 0;
  $table = array(
    'fields' => array(
      'id' => array(
        'type' => 'serial',
        'unsigned' => TRUE,
        'not null' => TRUE,
      ),
    ),
    'primary key' => array(
      'id',
    ),
  );
  db_create_table('database_test_' . ++$count, $table);
}