Removed TODOs
This commit is contained in:
parent
b682ffdfa3
commit
c7087e7ac0
3 changed files with 27 additions and 13 deletions
|
@ -1273,6 +1273,7 @@ App::post('/v1/database/collections/:collectionId/indexes')
|
|||
|
||||
// Convert Document[] to array of attribute metadata
|
||||
$oldAttributes = \array_map(fn ($a) => $a->getArrayCopy(), $collection->getAttribute('attributes'));
|
||||
|
||||
$oldAttributes[] = [
|
||||
'key' => '$id',
|
||||
'type' => 'string',
|
||||
|
@ -1282,7 +1283,28 @@ App::post('/v1/database/collections/:collectionId/indexes')
|
|||
'default' => null,
|
||||
'size' => 36
|
||||
];
|
||||
// TODO: Allow $createdAt, $updatedAt
|
||||
|
||||
$oldAttributes[] = [
|
||||
'key' => '$createdAt',
|
||||
'type' => 'integer',
|
||||
'status' => 'available',
|
||||
'signed' => false,
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
'default' => null,
|
||||
'size' => 0
|
||||
];
|
||||
|
||||
$oldAttributes[] = [
|
||||
'key' => '$updatedAt',
|
||||
'type' => 'integer',
|
||||
'status' => 'available',
|
||||
'signed' => false,
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
'default' => null,
|
||||
'size' => 0
|
||||
];
|
||||
|
||||
// lengths hidden by default
|
||||
$lengths = [];
|
||||
|
|
|
@ -1127,7 +1127,8 @@ $logs = $this->getParam('logs', null);
|
|||
<div class="col span-7 margin-bottom-small">
|
||||
<select data-duplications data-ls-attrs="name=attributes" class="margin-bottom-no">
|
||||
<option value="$id">$id</option>
|
||||
<!-- TODO: Allow createdAt,updatedAt -->
|
||||
<option value="$createdAt">$createdAt</option>
|
||||
<option value="$updatedAt">$updatedAt</option>
|
||||
<option data-ls-loop="project-collection.attributes" data-ls-as="option" data-cast-to="array" data-ls-attrs="value={{option.key}}" data-ls-bind="{{option.key}}"></option>
|
||||
</select>
|
||||
</div>
|
||||
|
|
13
composer.lock
generated
13
composer.lock
generated
|
@ -5346,18 +5346,9 @@
|
|||
"time": "2022-05-17T05:48:52+00:00"
|
||||
}
|
||||
],
|
||||
"aliases": [
|
||||
{
|
||||
"package": "utopia-php/database",
|
||||
"version": "dev-feat-internal-indexes",
|
||||
"alias": "0.17.1",
|
||||
"alias_normalized": "0.17.1.0"
|
||||
}
|
||||
],
|
||||
"aliases": [],
|
||||
"minimum-stability": "stable",
|
||||
"stability-flags": {
|
||||
"utopia-php/database": 20
|
||||
},
|
||||
"stability-flags": [],
|
||||
"prefer-stable": false,
|
||||
"prefer-lowest": false,
|
||||
"platform": {
|
||||
|
|
Loading…
Reference in a new issue