コード例 #1
0
ファイル: MySqlMapper.php プロジェクト: core-framework/core
 /**
  * {@inheritdoc}
  */
 public function addColumn($tableName, Column $newColumn)
 {
     if ($tableName instanceof Table) {
         $tableName = $tableName->getName();
     }
     $sql = "ALTER TABLE {$this->quote($tableName)} ADD {$this->quote($newColumn->getName())} {$this->getColumnDefinition($newColumn)}";
     $after = $newColumn->getAfter();
     if (isset($after)) {
         $sql .= " AFTER {$after}";
     }
     $this->execute($sql);
     return true;
 }