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)); }
Please login to continue.