public function removeColumn($column)
    {
        if (is_string($column)) {
            $column = $this->getColumn($column);
        }

        $pos = $this->getColumnPosition($column);
        if (false === $pos) {
            throw new EngineException(sprintf('No column named %s found in table %s.', $column->getName(), $this->getName()));
        }

        unset($this->columns[$pos]);
        unset($this->columnsByName[$column->getName()]);
        unset($this->columnsByLowercaseName[strtolower($column->getName())]);
        unset($this->columnsByPhpName[$column->getPhpName()]);

        $this->adjustColumnPositions();

        // @FIXME: also remove indexes and validators on this column?
    }
public function removeColumn($column)
    {
        if (is_string($column)) {
            $column = $this->getColumn($column);
        }

        $pos = $this->getColumnPosition($column);
        if (false === $pos) {
            throw new EngineException(sprintf('No column named %s found in table %s.', $column->getName(), $this->getName()));
        }

        unset($this->columns[$pos]);
        unset($this->columnsByName[$column->getName()]);
        unset($this->columnsByLowercaseName[strtolower($column->getName())]);
        unset($this->columnsByPhpName[$column->getPhpName()]);

        $this->adjustColumnPositions();

        // @FIXME: also remove indexes and validators on this column?
    }
public function removeColumn ( $ column ) { if ( is_string ( $ column ) ) { $ column = $ this -> getColumn ( $ column ) ; } $ pos = $ this -> getColumnPosition ( $ column ) ; if ( false === $ pos ) { throw new EngineException ( sprintf ( 'No column named %s found in table %s.' , $ column -> getName ( ) , $ this -> getName ( ) ) ) ; } unset ( $ this -> columns [ $ pos ] ) ; unset ( $ this -> columnsByName [ $ column -> getName ( ) ] ) ; unset ( $ this -> columnsByLowercaseName [ strtolower ( $ column -> getName ( ) ) ] ) ; unset ( $ this -> columnsByPhpName [ $ column -> getPhpName ( ) ] ) ; $ this -> adjustColumnPositions ( ) ; // @FIXME: also remove indexes and validators on this column? }
Removes a column from the table.

@param  Column|string   $column The Column or its name
@throws EngineException
Removes a column from the table .