8.3.x Schema.php protected Schema::createTableSql($name, $table)
8.3.x Schema.php protected Schema::createTableSql($name, $table)
8.3.x Schema.php public Schema::createTableSql($name, $table)
8.0.x Schema.php protected Schema::createTableSql($name, $table)
8.0.x Schema.php protected Schema::createTableSql($name, $table)
8.0.x Schema.php public Schema::createTableSql($name, $table)
8.1.x Schema.php protected Schema::createTableSql($name, $table)
8.1.x Schema.php protected Schema::createTableSql($name, $table)
8.1.x Schema.php public Schema::createTableSql($name, $table)
8.2.x Schema.php protected Schema::createTableSql($name, $table)
8.2.x Schema.php public Schema::createTableSql($name, $table)
8.2.x Schema.php protected Schema::createTableSql($name, $table)
8.4.x Schema.php protected Schema::createTableSql($name, $table)
8.4.x Schema.php protected Schema::createTableSql($name, $table)
8.4.x Schema.php public Schema::createTableSql($name, $table)

Generate SQL to create a new table from a Drupal schema definition.

Parameters

$name: The name of the table to create.

$table: A Schema API table definition array.

Return value

An array of SQL statements to create the table.

File

core/lib/Drupal/Core/Database/Driver/sqlite/Schema.php, line 47

Class

Schema
SQLite implementation of \Drupal\Core\Database\Schema.

Namespace

Drupal\Core\Database\Driver\sqlite

Code

public function createTableSql($name, $table) {
  $sql = array();
  $sql[] = "CREATE TABLE {" . $name . "} (\n" . $this->createColumnsSql($name, $table) . "\n)\n";
  return array_merge($sql, $this->createIndexSql($name, $table));
}