Exemplo n.º 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)));
     }
 }
Exemplo n.º 2
0
 /** {@inheritdoc} */
 public function toArray($assoc = false)
 {
     $data = parent::toArray($assoc);
     $data['mysql']['engine'] = $this->getEngine();
     return $data;
 }