public function addColumnObject($column)
    {
        $name = $column->getName();

        $this->forbidColumn($name);

        $sql = 'ADD COLUMN ';
        $sql .= $this->_database->prepareIdentifier($name);
        $sql .= ' ';
        $sql .= $column->getDefinition();

        $this->alter($sql);

        // Update column cache
        $this->_columns[$name] = $column;
        $this->_columns[$name]->setTable($this);
        return $this->_columns[$name];
    }
public function addColumnObject($column)
    {
        $name = $column->getName();

        $this->forbidColumn($name);

        $sql = 'ADD COLUMN ';
        $sql .= $this->_database->prepareIdentifier($name);
        $sql .= ' ';
        $sql .= $column->getDefinition();

        $this->alter($sql);

        // Update column cache
        $this->_columns[$name] = $column;
        $this->_columns[$name]->setTable($this);
        return $this->_columns[$name];
    }
public function addColumnObject ( $ column ) { $ name = $ column -> getName ( ) ; $ this -> forbidColumn ( $ name ) ; $ sql = 'ADD COLUMN ' ; $ sql .= $ this -> _database -> prepareIdentifier ( $ name ) ; $ sql .= ' ' ; $ sql .= $ column -> getDefinition ( ) ; $ this -> alter ( $ sql ) ; // Update column cache $ this -> _columns [ $ name ] = $ column ; $ this -> _columns [ $ name ] -> setTable ( $ this ) ; return $ this -> _columns [ $ name ] ; }
Add a column using a column object

@param \Nada\Column\AbstractColumn $column Column object
@return \Nada\Column\AbstractColumn object describing the generated column
Add a column using a column object