From 34713597353e82859847a1567a6e93dccb78c449 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Mon, 19 Feb 2024 10:24:12 +0530 Subject: [PATCH 1/5] Allow execution filter attributes --- .../Utopia/Database/Validator/Queries/Executions.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php b/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php index ecceab7fae..4c0a38b46f 100644 --- a/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php +++ b/src/Appwrite/Utopia/Database/Validator/Queries/Executions.php @@ -8,7 +8,10 @@ class Executions extends Base 'trigger', 'status', 'responseStatusCode', - 'duration' + 'duration', + 'requestMethod', + 'requestPath', + 'deploymentId' ]; /** From f1c6790240b9a51f4ed7d3f9604e38a5ad20c9f8 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Sun, 25 Feb 2024 15:57:39 +0530 Subject: [PATCH 2/5] Add indexes for execution attributes --- app/config/collections.php | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/app/config/collections.php b/app/config/collections.php index 3bc58eff56..0b37f9cade 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2934,6 +2934,27 @@ $projectCollections = array_merge([ 'lengths' => [128], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_requestMethod'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['requestMethod'], + 'lengths' => [128], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_requestPath'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['requestPath'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], + [ + '$id' => ID::custom('_key_deploymentId'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['deploymentId'], + 'lengths' => [Database::LENGTH_KEY], + 'orders' => [Database::ORDER_ASC], + ], [ '$id' => ID::custom('_key_responseStatusCode'), 'type' => Database::INDEX_KEY, From f8f54271d13f47ecc8c379457b30f0c4511bd6ac Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 29 Feb 2024 18:39:38 +0530 Subject: [PATCH 3/5] Fix execution indexes --- app/config/collections.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/config/collections.php b/app/config/collections.php index 0b37f9cade..a3698291c2 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2945,11 +2945,11 @@ $projectCollections = array_merge([ '$id' => ID::custom('_key_requestPath'), 'type' => Database::INDEX_KEY, 'attributes' => ['requestPath'], - 'lengths' => [Database::LENGTH_KEY], + 'lengths' => [2048], 'orders' => [Database::ORDER_ASC], ], [ - '$id' => ID::custom('_key_deploymentId'), + '$id' => ID::custom('_key_deployment'), 'type' => Database::INDEX_KEY, 'attributes' => ['deploymentId'], 'lengths' => [Database::LENGTH_KEY], From 1d282da6b38be5d36ea906aaf08db556b0d6eac7 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:35:58 +0530 Subject: [PATCH 4/5] Update index length --- app/config/collections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/collections.php b/app/config/collections.php index a3698291c2..1da808a58b 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2945,7 +2945,7 @@ $projectCollections = array_merge([ '$id' => ID::custom('_key_requestPath'), 'type' => Database::INDEX_KEY, 'attributes' => ['requestPath'], - 'lengths' => [2048], + 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], [ From b552d052da23c2a8cf78166efc73e8a2655c64f2 Mon Sep 17 00:00:00 2001 From: Khushboo Verma <43381712+vermakhushboo@users.noreply.github.com> Date: Thu, 29 Feb 2024 19:51:13 +0530 Subject: [PATCH 5/5] Update index length --- app/config/collections.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/config/collections.php b/app/config/collections.php index 1da808a58b..283328048d 100644 --- a/app/config/collections.php +++ b/app/config/collections.php @@ -2945,7 +2945,7 @@ $projectCollections = array_merge([ '$id' => ID::custom('_key_requestPath'), 'type' => Database::INDEX_KEY, 'attributes' => ['requestPath'], - 'lengths' => [], + 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC], ], [