function db_create_table

8.x database.inc db_create_table($name, $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

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/schema.inc
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

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