From 6756ee31b6b775b4dc8ee4f815b26cf250b89ece Mon Sep 17 00:00:00 2001 From: fogelito Date: Tue, 6 Jan 2026 16:55:36 +0200 Subject: [PATCH] migration can not be empty --- src/Appwrite/Platform/Workers/Migrations.php | 23 ++++++-------------- 1 file changed, 7 insertions(+), 16 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 7e05e40910..363167ce8b 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -395,24 +395,15 @@ class Migrations extends Action Console::error('Line: ' . $th->getLine()); Console::error($th->getTraceAsString()); - if (! $migration->isEmpty()) { - $migration->setAttribute('status', 'failed'); - $migration->setAttribute('stage', 'finished'); + $migration->setAttribute('status', 'failed'); + $migration->setAttribute('stage', 'finished'); - call_user_func($this->logError, $th, 'appwrite-worker', 'appwrite-queue-'.self::getName(), [ - 'migrationId' => $migration->getId(), - 'source' => $migration->getAttribute('source') ?? '', - 'destination' => $migration->getAttribute('destination') ?? '', - ]); + call_user_func($this->logError, $th, 'appwrite-worker', 'appwrite-queue-'.self::getName(), [ + 'migrationId' => $migration->getId(), + 'source' => $migration->getAttribute('source') ?? '', + 'destination' => $migration->getAttribute('destination') ?? '', + ]); - return; - } - - if ($transfer) { - $sourceErrors = $source->getErrors(); - $destinationErrors = $destination->getErrors(); - $migration->setAttribute('errors', $this->sanitizeErrors($sourceErrors, $destinationErrors)); - } } finally { try { $this->updateMigrationDocument($migration, $project, $queueForRealtime);