From ddb72c754688fb9b55ad5908ab3e62f951a728bb Mon Sep 17 00:00:00 2001 From: fogelito Date: Thu, 29 Jan 2026 17:32:28 +0200 Subject: [PATCH] set credentials --- src/Appwrite/Platform/Workers/Migrations.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index d78f207998..66f39a4336 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -337,22 +337,22 @@ class Migrations extends Action $endpoint = System::getEnv('_APP_MIGRATION_ENDPOINT'); try { - if ($migration->getAttribute('source') === SourceAppwrite::getName()) { - $credentials = $migration->getAttribute('credentials', []); + $credentials = $migration->getAttribute('credentials', []); + if ($migration->getAttribute('source') === SourceAppwrite::getName()) { if (empty($credentials)) { $credentials['projectId'] = $project->getId(); $credentials['apiKey'] = $tempAPIKey; $credentials['endpoint'] = $endpoint; } - - if (($credentials['endpoint'] ?? '') === 'http://localhost/v1') { - $credentials['endpoint'] = $endpoint; - } - - $migration->setAttribute('credentials', $credentials); } + if (($credentials['endpoint'] ?? '') === 'http://localhost/v1') { + $credentials['endpoint'] = $endpoint; + } + + $migration->setAttribute('credentials', $credentials); + $migration->setAttribute('stage', 'processing'); $migration->setAttribute('status', 'processing'); $this->updateMigrationDocument($migration, $project, $queueForRealtime);