function db_create_table

Creates a new table from a Drupal table definition.

Parameters

$name: The name of the table to create.

$table: A Schema API table definition array.

Related topics

24 calls to db_create_table()
block_update_8001 in drupal/core/modules/block/block.install
Creates table {block_language} for language visibility settings per block.
DatabaseStorageExpirableTest::setUp in drupal/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/DatabaseStorageExpirableTest.php
Sets up unit test environment.
DatabaseStorageTest::setUp in drupal/core/modules/config/lib/Drupal/config/Tests/Storage/DatabaseStorageTest.php
Sets up Drupal unit test environment.
DatabaseStorageTest::setUp in drupal/core/modules/system/lib/Drupal/system/Tests/KeyValueStore/DatabaseStorageTest.php
Sets up unit test environment.
DatabaseTestBase::installTables in drupal/core/modules/system/lib/Drupal/system/Tests/Database/DatabaseTestBase.php
Sets up several tables needed by a certain test.

... See full list

File

drupal/core/includes/database.inc, line 589
Core systems for the database layer.

Code

function db_create_table($name, $table) {
  return Database::getConnection()
    ->schema()
    ->createTable($name, $table);
}