src/Phinx/Db/Plan/Plan.php
protected function gatherUpdates($actions)
    {
        collection($actions)
            ->filter(function ($action) {
                return $action instanceof AddColumn
                    || $action instanceof ChangeColumn
                    || $action instanceof RemoveColumn
                    || $action instanceof RenameColumn;
            })
            // We are only concerned with table changes
            ->reject(function ($action) {
                return isset($this->tableCreates[$action->getTable()->getName()]);
            })
            ->each(function ($action) {
                $table = $action->getTable();
                $name = $table->getName();

                if (!isset($this->tableUpdates[$name])) {
                    $this->tableUpdates[$name] = new AlterTable($table);
                }

                $this->tableUpdates[$name]->addAction($action);
            });
    }
protected function gatherUpdates($actions)
    {
        collection($actions)
            ->filter(function ($action) {
                return $action instanceof AddColumn
                    || $action instanceof ChangeColumn
                    || $action instanceof RemoveColumn
                    || $action instanceof RenameColumn;
            })
            // We are only concerned with table changes
            ->reject(function ($action) {
                return isset($this->tableCreates[$action->getTable()->getName()]);
            })
            ->each(function ($action) {
                $table = $action->getTable();
                $name = $table->getName();

                if (!isset($this->tableUpdates[$name])) {
                    $this->tableUpdates[$name] = new AlterTable($table);
                }

                $this->tableUpdates[$name]->addAction($action);
            });
    }
protected function gatherUpdates ( $ actions ) { collection ( $ actions ) -> filter ( function ( $ action ) { return $ action instanceof AddColumn || $ action instanceof ChangeColumn || $ action instanceof RemoveColumn || $ action instanceof RenameColumn ; } ) // We are only concerned with table changes -> reject ( function ( $ action ) { return isset ( $ this -> tableCreates [ $ action -> getTable ( ) -> getName ( ) ] ) ; } ) -> each ( function ( $ action ) { $ table = $ action -> getTable ( ) ; $ name = $ table -> getName ( ) ; if ( ! isset ( $ this -> tableUpdates [ $ name ] ) ) { $ this -> tableUpdates [ $ name ] = new AlterTable ( $ table ) ; } $ this -> tableUpdates [ $ name ] -> addAction ( $ action ) ; } ) ; }
Collects all alter table actions from the given intent

@param \Phinx\Db\Action\Action[] $actions The actions to parse
@return void
Collects all alter table actions from the given intent