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)
                )
            );
        }
    }
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)
                )
            );
        }
    }
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 ) ) ) ; } }
DBMS-specific implementation for setting a column's default value
DBMS - specific implementation for setting a column s default value