mirror of
https://github.com/appwrite/appwrite
synced 2026-05-23 08:58:35 +00:00
Merge pull request #5341 from appwrite/feat-db-update-migrations
Add options key to attributes
This commit is contained in:
commit
2a8911011b
1 changed files with 17 additions and 0 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in a new issue