public Schema::createTableSql($name, $table)
Generate SQL to create a new table from a Drupal schema definition.
$name: The name of the table to create.
$table: A Schema API table definition array.
An array of SQL statements to create the table.
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)); }
© 2001–2016 by the original authors
Licensed under the GNU General Public License, version 2 and later.
Drupal is a registered trademark of Dries Buytaert.
https://api.drupal.org/api/drupal/core!lib!Drupal!Core!Database!Driver!sqlite!Schema.php/function/Schema::createTableSql/8.1.x