From f12a578efe419bbfb62ce53cded10388808db9f9 Mon Sep 17 00:00:00 2001 From: fogelito Date: Wed, 7 Aug 2024 16:58:00 +0300 Subject: [PATCH] Update on failed --- src/Appwrite/Platform/Workers/Migrations.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 1d252b1bd5..250f82bcec 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -374,9 +374,6 @@ class Migrations extends Action $log->addTag('migrationErrors', json_encode($errorMessages)); } } finally { - $destination->error(); - $source->error(); - if (! $tempAPIKey->isEmpty()) { $this->removeAPIKey($tempAPIKey); } @@ -384,6 +381,9 @@ class Migrations extends Action $this->updateMigrationDocument($migration, $projectDocument); if ($migration->getAttribute('status', '') == 'failed') { + $destination->error(); + $source->error(); + throw new Exception('Migration failed'); } }