Postgres::setColumnNull PHP Method

setColumnNull() public method

Sets whether or not a column can contain NULLs
public setColumnNull ( $table, $column, $state )
$table The table that contains the column
$column The column to alter
$state True to set null, false to set not null
    function setColumnNull($table, $column, $state)
    {
        $f_schema = $this->_schema;
        $this->fieldClean($f_schema);
        $this->fieldClean($table);
        $this->fieldClean($column);
        $sql = "ALTER TABLE \"{$f_schema}\".\"{$table}\" ALTER COLUMN \"{$column}\" " . ($state ? 'DROP' : 'SET') . " NOT NULL";
        return $this->execute($sql);
    }
Postgres