Postgres::setColumnDefault PHP Method

setColumnDefault() public method

Sets default value of a column
public setColumnDefault ( $table, $column, $default )
$table The table from which to drop
$column The column name to set
$default The new default value
    function setColumnDefault($table, $column, $default)
    {
        $f_schema = $this->_schema;
        $this->fieldClean($f_schema);
        $this->fieldClean($table);
        $this->fieldClean($column);
        $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ALTER COLUMN \"{$column}\" SET DEFAULT {$default}";
        return $this->execute($sql);
    }
Postgres