This commit is contained in:
fogelito committed 2026-01-06 10:43:16 +02:00
1 parent d4660a70c3
commit 7da9d480d0
3 files changed
+67 -44

No files matched your search

+17 -1
View File
@@ -110,10 +110,18 @@ class Migrations extends Action
$events = $payload['events'] ?? [];
$migration = new Document($payload['migration'] ?? []);
if ($migration->isEmpty()) {
throw new \Exception("Migration not found");
}
if ($project->getId() === 'console') {
return;
}
if ($project->isEmpty()) {
throw new \Exception("Project not found");
}
$this->dbForProject = $dbForProject;
$this->dbForPlatform = $dbForPlatform;
$this->project = $project;
@@ -312,7 +320,12 @@ class Migrations extends Action
Mail $queueForMails,
array $platform,
): void {
$project = $this->dbForPlatform->getDocument('projects', $this->project->getId());
$project = $this->project;
if ($project->isEmpty()) {
throw new \Exception("Project not found");
}
$tempAPIKey = $this->generateAPIKey($project);
$transfer = $source = $destination = null;
@@ -439,6 +452,9 @@ class Migrations extends Action
}
}
$source?->cleanUp();
$destination?->cleanUp();
$transfer = null;
$source = null;
$destination = null;