function db_create_table

8.x db_create_table($name, $table)

Creates a new table from a Drupal table definition.


$name: The name of the table to create.

$table: A Schema API table definition array.

Related topics

13 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.
drupal_install_schema in drupal/core/includes/
Creates all tables defined in a module's hook_schema().
hook_field_storage_create_field in drupal/core/modules/field/field.api.php
Act on creation of a new field.
hook_field_storage_update_field in drupal/core/modules/field/field.api.php
Update the storage information for a field.
locale_update_8010 in drupal/core/modules/locale/locale.install
Add {locale_file} table.

... See full list


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


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