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

@param Column|string $col the column to remove

@throws EngineException
Removed a column from the table