Migrations\Shell\Task\MigrationDiffTask::bakeSnapshot PHP Метод

bakeSnapshot() защищенный Метод

Fallback method called to bake a snapshot when the phinx log history is empty and there are no migration files.
protected bakeSnapshot ( $name ) : integer
Результат integer Value of the snapshot baking dispatch process
    protected function bakeSnapshot($name)
    {
        $this->out('Your migrations history is empty and you do not have any migrations files.');
        $this->out('Falling back to baking a snapshot...');
        $dispatchCommand = 'bake migration_snapshot ' . $name;
        if (!empty($this->params['connection'])) {
            $dispatchCommand .= ' -c ' . $this->params['connection'];
        }
        if (!empty($this->params['plugin'])) {
            $dispatchCommand .= ' -p ' . $this->params['plugin'];
        }
        $dispatch = $this->dispatchShell(['command' => $dispatchCommand]);
        if ($dispatch === 1) {
            $this->error('Something went wrong during the snapshot baking. Please try again.');
        }
        return $dispatch;
    }