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;
}