src/Phinx/Db/Table.php
protected function executeActions($exists)
    {
        // Renaming a table is tricky, specially when running a reversible migration
        // down. We will just assume the table already exists if the user commands a
        // table rename.
        $renamed = collection($this->actions->getActions())
            ->filter(function ($action) {
                return $action instanceof RenameTable;
            })
            ->first();

        if ($renamed) {
            $exists = true;
        }

        // If the table does not exist, the last command in the chain needs to be
        // a CreateTable action.
        if (!$exists) {
            $this->actions->addAction(new CreateTable($this->table));
        }

        $plan = new Plan($this->actions);
        $plan->execute($this->getAdapter());
    }
protected function executeActions($exists)
    {
        // Renaming a table is tricky, specially when running a reversible migration
        // down. We will just assume the table already exists if the user commands a
        // table rename.
        $renamed = collection($this->actions->getActions())
            ->filter(function ($action) {
                return $action instanceof RenameTable;
            })
            ->first();

        if ($renamed) {
            $exists = true;
        }

        // If the table does not exist, the last command in the chain needs to be
        // a CreateTable action.
        if (!$exists) {
            $this->actions->addAction(new CreateTable($this->table));
        }

        $plan = new Plan($this->actions);
        $plan->execute($this->getAdapter());
    }
protected function executeActions ( $ exists ) { // Renaming a table is tricky, specially when running a reversible migration // down. We will just assume the table already exists if the user commands a // table rename. $ renamed = collection ( $ this -> actions -> getActions ( ) ) -> filter ( function ( $ action ) { return $ action instanceof RenameTable ; } ) -> first ( ) ; if ( $ renamed ) { $ exists = true ; } // If the table does not exist, the last command in the chain needs to be // a CreateTable action. if ( ! $ exists ) { $ this -> actions -> addAction ( new CreateTable ( $ this -> table ) ) ; } $ plan = new Plan ( $ this -> actions ) ; $ plan -> execute ( $ this -> getAdapter ( ) ) ; }
Executes all the pending actions for this table

@param bool $exists Whether or not the table existed prior to executing this method
@return void
Executes all the pending actions for this table