Ejemplo n.º 1
0
 public function createTable(Table $table)
 {
     $columns = array();
     $name = $table->getName();
     foreach ($table->getColumns() as $column) {
         $columns[] = $this->getColumnSpecification($column);
     }
     if ($pk = $table->getPrimaryKey()) {
         $columns[] = "PRIMARY KEY (\"{$pk}\")";
     }
     $columns = implode(',', $columns);
     return "CREATE TABLE \"{$name}\" ({$columns})";
 }
Ejemplo n.º 2
0
 protected function visitTable(Table $table)
 {
     return $this->preparer->formatTable($table->getName());
 }