Add options key to attributes

This commit is contained in:
Jake Barnby 2023-04-12 02:49:47 +12:00
parent 07b8f0fe3f
commit a01dd3fc41
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C

View file

@ -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;