From 927acbefb29d2f6c09ced61588d4dc3cf9809408 Mon Sep 17 00:00:00 2001 From: Prem Palanisamy Date: Sun, 24 May 2026 13:33:43 +0100 Subject: [PATCH] Scope rules lookup to source project --- src/Appwrite/Platform/Workers/Migrations.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Platform/Workers/Migrations.php b/src/Appwrite/Platform/Workers/Migrations.php index c55332bf0a..7de491ce52 100644 --- a/src/Appwrite/Platform/Workers/Migrations.php +++ b/src/Appwrite/Platform/Workers/Migrations.php @@ -228,9 +228,10 @@ class Migrations extends Action // a configured custom domain still get the DB fast path. $isLocalEndpoint = (is_string($sourceHost) && !empty($allowedHosts) && (new Hostname($allowedHosts))->isValid($sourceHost)) || (empty($credentials['endpoint']) && $migrationHost !== '') - || (is_string($sourceHost) && !$this->dbForPlatform->findOne('rules', [ + || (is_string($sourceHost) && !$this->sourceProject->isEmpty() && !$this->dbForPlatform->findOne('rules', [ Query::equal('domain', [$sourceHost]), Query::equal('type', ['api']), + Query::equal('projectInternalId', [$this->sourceProject->getSequence()]), ])->isEmpty()); $isLocalSource = !$this->sourceProject->isEmpty()