From e1ebdd1c4ebae55f2b6347db29bae6f6681700f9 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Fri, 22 May 2026 10:23:48 +0100 Subject: [PATCH] Skip credential defaulting for Appwrite -> Appwrite migrations --- src/Appwrite/Platform/Workers/Migrations.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 67ef6b1ff9..37278e8090 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -488,7 +488,10 @@ class Migrations extends Action try { $credentials = $migration->getAttribute('credentials', []); - if ($migration->getAttribute('source') === SourceAppwrite::getName()) { + // Appwrite -> Appwrite requires explicit user-supplied source credentials; + // defaulting would silently self-call with the destination's own key. + if ($migration->getAttribute('source') === SourceAppwrite::getName() + && $migration->getAttribute('destination') !== DestinationAppwrite::getName()) { $credentials['projectId'] = $credentials['projectId'] ?? $project->getId(); $credentials['apiKey'] = $credentials['apiKey'] ?? $tempAPIKey; $credentials['endpoint'] = $credentials['endpoint'] ?? $endpoint;