From f317d33fc70cb6ddf188c6892396b3ff6e698d73 Mon Sep 17 00:00:00 2001 From: Steven Nguyen Date: Sat, 2 Sep 2023 18:06:50 -0700 Subject: [PATCH] Skip migrating domains without project because it would throw an error --- src/Appwrite/Migration/Version/V19.php | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/src/Appwrite/Migration/Version/V19.php b/src/Appwrite/Migration/Version/V19.php index ddfae4dd59..e9f50357d1 100644 --- a/src/Appwrite/Migration/Version/V19.php +++ b/src/Appwrite/Migration/Version/V19.php @@ -56,6 +56,14 @@ class V19 extends Migration $status = 'verified'; } + $projectId = $domain->getAttribute('projectId'); + $projectInternalId = $domain->getAttribute('projectInternalId'); + + if (empty($projectId) || empty($projectInternalId)) { + Console::warning("Error migrating domain {$domain->getAttribute('domain')}: Missing projectId or projectInternalId"); + continue; + } + $ruleDocument = new Document([ 'projectId' => $domain->getAttribute('projectId'), 'projectInternalId' => $domain->getAttribute('projectInternalId'),