From 0cdb13b398ca57bcede4a6d7a0f10e940df18fb0 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Sun, 24 May 2026 13:25:36 +0100 Subject: [PATCH] Apply host check to Appwrite-to-CSV/JSON exports too --- src/Appwrite/Platform/Workers/Migrations.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index 999a3f8e5d..947c0bddae 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -203,7 +203,8 @@ class Migrations extends Action } if (! empty($credentials['projectId'])) { - $isAppwriteToAppwrite = $source === SourceAppwrite::getName() + $isAppwriteSource = $source === SourceAppwrite::getName(); + $isAppwriteToAppwrite = $isAppwriteSource && $destination === DestinationAppwrite::getName(); $this->sourceProject = $this->dbForPlatform->getDocument('projects', $credentials['projectId']); @@ -240,7 +241,7 @@ class Migrations extends Action || (empty($credentials['endpoint']) && $migrationHost !== ''); $isLocalSource = !$this->sourceProject->isEmpty() - && (!$isAppwriteToAppwrite || $isLocalEndpoint); + && (!$isAppwriteSource || $isLocalEndpoint); if ($isLocalSource) { $projectDB = call_user_func($this->getProjectDB, $this->sourceProject);