From a01dd3fc41717a92652113061d2e23b6306555fd Mon Sep 17 00:00:00 2001 From: Jake Barnby Date: Wed, 12 Apr 2023 02:49:47 +1200 Subject: [PATCH] Add options key to attributes --- src/Appwrite/Migration/Version/V18.php | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/src/Appwrite/Migration/Version/V18.php b/src/Appwrite/Migration/Version/V18.php index 8f11e37a22..2fedf4957e 100644 --- a/src/Appwrite/Migration/Version/V18.php +++ b/src/Appwrite/Migration/Version/V18.php @@ -106,6 +106,17 @@ class V18 extends Migration Console::warning("'prefs' from {$id}: {$th->getMessage()}"); } break; + case 'attributes': + try { + /** + * Create 'options' attribute + */ + $this->createAttributeFromCollection($this->projectDB, $id, 'options'); + $this->projectDB->deleteCachedCollection($id); + } catch (\Throwable $th) { + Console::warning("'options' from {$id}: {$th->getMessage()}"); + } + break; default: break; } @@ -149,6 +160,12 @@ class V18 extends Migration */ $document->setAttribute('prefs', new \stdClass()); break; + case 'attributes': + /** + * Default options + */ + $document->setAttribute('options', new \stdClass()); + break; } return $document;