diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index 157422f29e..12f1534377 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -69,6 +69,17 @@ return [ 'signed' => true, 'array' => false, 'filters' => [], + ], + [ + '$id' => ID::custom('status'), + 'type' => Database::VAR_STRING, + 'format' => '', + 'size' => 16, + 'signed' => true, + 'required' => false, + 'default' => null, + 'array' => false, + 'filters' => [], ] ], 'indexes' => [ diff --git a/src/Appwrite/Migration/Version/V25.php b/src/Appwrite/Migration/Version/V25.php index 800b9b451f..581cace46b 100644 --- a/src/Appwrite/Migration/Version/V25.php +++ b/src/Appwrite/Migration/Version/V25.php @@ -63,6 +63,17 @@ class V25 extends Migration } $this->dbForProject->purgeCachedCollection($id); break; + + case 'databases': + if ($collectionType === 'projects') { + try { + $this->createAttributeFromCollection($this->dbForProject, $id, 'status'); + } catch (Throwable $th) { + Console::warning("Failed to create attribute \"status\" in collection {$id}: {$th->getMessage()}"); + } + $this->dbForProject->purgeCachedCollection($id); + } + break; } } }