From e0267da7ac81554fcdfc8586873590fd342098de Mon Sep 17 00:00:00 2001 From: Torsten Dittmann Date: Mon, 12 Sep 2022 16:06:05 +0200 Subject: [PATCH] fix: migrate variables --- src/Appwrite/Migration/Version/V15.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/Appwrite/Migration/Version/V15.php b/src/Appwrite/Migration/Version/V15.php index 7dd21d992f..7096aab013 100644 --- a/src/Appwrite/Migration/Version/V15.php +++ b/src/Appwrite/Migration/Version/V15.php @@ -735,6 +735,7 @@ class V15 extends Migration if ($value instanceof Document) { continue; } + $variableId = ID::unique(); $variable = new Document([ '$id' => $variableId, @@ -745,8 +746,8 @@ class V15 extends Migration ], 'functionId' => $function->getId(), 'functionInternalId' => $function->getInternalId(), - 'key' => $key, - 'value' => $value, + 'key' => (string) $key, + 'value' => (string) $value, 'search' => implode(' ', [$variableId, $key, $function->getId()]) ]); $this->projectDB->createDocument('variables', $variable);