From 9e3c5b9368745e4a06b80d3822612adf68545139 Mon Sep 17 00:00:00 2001 From: Bradley Schofield Date: Mon, 22 Jul 2024 19:40:05 +0900 Subject: [PATCH] Add variable runtimes sizes migrations --- src/Appwrite/Migration/Version/V21.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/Appwrite/Migration/Version/V21.php b/src/Appwrite/Migration/Version/V21.php index 01fc2d19e0..be6c38be67 100644 --- a/src/Appwrite/Migration/Version/V21.php +++ b/src/Appwrite/Migration/Version/V21.php @@ -87,6 +87,13 @@ class V21 extends Migration Console::warning("'scopes' from {$id}: {$th->getMessage()}"); } + // Create size attribute + try { + $this->createAttributeFromCollection($this->projectDB, $id, 'size'); + } catch (Throwable $th) { + Console::warning("'size' from {$id}: {$th->getMessage()}"); + } + break; case 'executions': // Create requestMethod index @@ -133,7 +140,14 @@ class V21 extends Migration // Add accessedAt attribute $document->setAttribute('accessedAt', DateTime::now()); break; + case 'functions': + // Add scopes attribute + $document->setAttribute('scopes', []); + + // Add size attribute + $document->setAttribute('size', 's-1vcpu-512m'); } + return $document; } }