예제 #1
0
 /**
  * DBMS-specific implementation for setting a column's default value
  **/
 protected function _setDefault()
 {
     if ($this->_default === null) {
         $this->_table->alter(sprintf('ALTER COLUMN %s DROP DEFAULT', $this->_database->prepareIdentifier($this->_name)));
     } else {
         $this->_table->alter(sprintf('ALTER COLUMN %s SET DEFAULT %s', $this->_database->prepareIdentifier($this->_name), $this->_database->prepareValue($this->_default, $this->_datatype)));
     }
 }
예제 #2
0
파일: Mysql.php 프로젝트: hschletz/nada
 /** {@inheritdoc} */
 public function toArray($assoc = false)
 {
     $data = parent::toArray($assoc);
     $data['mysql']['engine'] = $this->getEngine();
     return $data;
 }