Apply host check to Appwrite-to-CSV/JSON exports too

This commit is contained in:
Prem Palanisamy
2026-05-24 13:25:36 +01:00
parent f7baeae70c
commit 0cdb13b398
+3 -2
View File
@@ -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);