mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Updated collections timestamps and formats
This commit is contained in:
@@ -74,6 +74,24 @@ return [
|
||||
'required' => true,
|
||||
'array' => false,
|
||||
],
|
||||
[
|
||||
'$collection' => Database::SYSTEM_COLLECTION_RULES,
|
||||
'label' => 'Date Created',
|
||||
'key' => 'dateCreated',
|
||||
'type' => 'numeric',
|
||||
'default' => 0,
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
],
|
||||
[
|
||||
'$collection' => Database::SYSTEM_COLLECTION_RULES,
|
||||
'label' => 'Date Updated',
|
||||
'key' => 'dateUpdated',
|
||||
'type' => 'numeric',
|
||||
'default' => 0,
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
],
|
||||
[
|
||||
'$collection' => Database::SYSTEM_COLLECTION_RULES,
|
||||
'label' => 'Structure',
|
||||
@@ -1242,19 +1260,19 @@ return [
|
||||
],
|
||||
[
|
||||
'$collection' => Database::SYSTEM_COLLECTION_RULES,
|
||||
'label' => 'Created',
|
||||
'key' => 'created',
|
||||
'label' => 'Date Created',
|
||||
'key' => 'dateCreated',
|
||||
'type' => 'numeric',
|
||||
'default' => '',
|
||||
'default' => 0,
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
],
|
||||
[
|
||||
'$collection' => Database::SYSTEM_COLLECTION_RULES,
|
||||
'label' => 'Updated',
|
||||
'key' => 'updated',
|
||||
'label' => 'Date Updated',
|
||||
'key' => 'dateUpdated',
|
||||
'type' => 'numeric',
|
||||
'default' => '',
|
||||
'default' => 0,
|
||||
'required' => false,
|
||||
'array' => false,
|
||||
],
|
||||
|
||||
@@ -141,6 +141,8 @@ $utopia->post('/v1/database')
|
||||
$data = $projectDB->createDocument([
|
||||
'$collection' => Database::SYSTEM_COLLECTION_COLLECTIONS,
|
||||
'name' => $name,
|
||||
'dateCreated' => time(),
|
||||
'dateUpdated' => time(),
|
||||
'structure' => true,
|
||||
'$permissions' => [
|
||||
'read' => $read,
|
||||
@@ -204,6 +206,7 @@ $utopia->put('/v1/database/:collectionId')
|
||||
$collection = $projectDB->updateDocument(array_merge($collection->getArrayCopy(), [
|
||||
'name' => $name,
|
||||
'structure' => true,
|
||||
'dateUpdated' => time(),
|
||||
'$permissions' => [
|
||||
'read' => $read,
|
||||
'write' => $write,
|
||||
|
||||
@@ -1107,8 +1107,8 @@ $utopia->post('/v1/projects/:projectId/platforms')
|
||||
'key' => $key,
|
||||
'store' => $store,
|
||||
'url' => $url,
|
||||
'created' => time(),
|
||||
'updated' => time(),
|
||||
'dateCreated' => time(),
|
||||
'dateUpdated' => time(),
|
||||
]);
|
||||
|
||||
if(false === $platform) {
|
||||
@@ -1158,7 +1158,7 @@ $utopia->put('/v1/projects/:projectId/platforms/:platformId')
|
||||
|
||||
$platform
|
||||
->setAttribute('name', $name)
|
||||
->setAttribute('updated', time())
|
||||
->setAttribute('dateUpdated', time())
|
||||
->setAttribute('key', $key)
|
||||
->setAttribute('store', $store)
|
||||
->setAttribute('url', $url)
|
||||
|
||||
Reference in New Issue
Block a user