return new JsonResponse([ 'error' => 'Session expired, please go back to database configuration.',
], Response::HTTP_INTERNAL_SERVER_ERROR
);
} $_SERVER[BlueGreenDeploymentService::ENV_NAME
] =
$_ENV[BlueGreenDeploymentService::ENV_NAME
] =
$session->
get(BlueGreenDeploymentService::ENV_NAME
);
$_SERVER[MigrationStep::INSTALL_ENVIRONMENT_VARIABLE
] =
$_ENV[MigrationStep::INSTALL_ENVIRONMENT_VARIABLE
] = true;
try { $connection =
$this->connectionFactory->
getConnection($connectionInfo);
$offset =
json_decode((string) $request->
getContent(), true, 512, \JSON_THROW_ON_ERROR
)['offset'
] ?? 0;
$result =
$this->migrator->
migrate($offset,
$connection);
return new JsonResponse($result);
} catch (\Exception
$e) { return new JsonResponse([ 'error' =>
$e->
getMessage(),
], Response::HTTP_INTERNAL_SERVER_ERROR
);
} }}