mirror of
https://github.com/appwrite/appwrite.git
synced 2026-11-18 20:36:03 +00:00
cleanUp
This commit is contained in:
1 parent
d4660a70c3
commit
7da9d480d0
3 files changed
+67
-44
No files matched your search
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user