src/Console/Controllers/MigrateController.php
public function beforeAction($actionId)
    {
        if (parent::beforeAction($actionId)) {
            if (!is_object($this->db)) {
                $this->db = \Reaction::$app->get($this->db);
            }
            return true;
        }

        return false;
    }
public function beforeAction($actionId)
    {
        if (parent::beforeAction($actionId)) {
            if (!is_object($this->db)) {
                $this->db = \Reaction::$app->get($this->db);
            }
            return true;
        }

        return false;
    }
This method is invoked right before an action is to be executed (after all possible filters.)
It checks the existence of the [[migrationPath]].
@param string $actionId the action to be executed.
@return bool whether the action should continue to be executed.