From 4396c5f0fced780e4934d5856a17e7d8f05b69b8 Mon Sep 17 00:00:00 2001 From: fogelito Date: Mon, 7 Apr 2025 08:48:53 +0300 Subject: [PATCH 1/2] Update indexes console --- app/config/collections/platform.php | 53 +++++++++++++++++++++++++++-- 1 file changed, 51 insertions(+), 2 deletions(-) diff --git a/app/config/collections/platform.php b/app/config/collections/platform.php index 8725f4b4ce..ccb87f06b3 100644 --- a/app/config/collections/platform.php +++ b/app/config/collections/platform.php @@ -356,7 +356,21 @@ return [ 'attributes' => ['pingedAt'], 'lengths' => [], 'orders' => [], - ] + ], + [ + '$id' => ID::custom('_key_database'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['database'], + 'lengths' => [], + 'orders' => [], + ], + [ + '$id' => ID::custom('_key_region_accessed_at'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['region', 'accessedAt'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -480,6 +494,20 @@ return [ 'lengths' => [], 'orders' => [], ], + [ + '$id' => ID::custom('_key_project_id_region'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectId', 'region'], + 'lengths' => [], + 'orders' => [], + ], + [ + '$id' => ID::custom('_key_region_rt_active'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['region', 'resourceType', 'active'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -1147,6 +1175,13 @@ return [ 'lengths' => [16], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_piid_riid_rt'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId', 'resourceInternalId', 'resourceType'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -1442,7 +1477,14 @@ return [ 'attributes' => ['resourceType'], 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC], - ] + ], + [ + '$id' => ID::custom('_key_piid_riid_rt'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId', 'resourceInternalId', 'resourceType'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -1590,6 +1632,13 @@ return [ 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_piid_prid_rt'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['projectInternalId', 'providerRepositoryId'], + 'lengths' => [], + 'orders' => [], + ], ], ], From e1e195cec6244d6f633002dcd34fd811d98fe929 Mon Sep 17 00:00:00 2001 From: fogelito Date: Sun, 20 Apr 2025 10:25:13 +0300 Subject: [PATCH 2/2] update projects indexes --- app/config/collections/common.php | 14 ++++++++++++++ app/config/collections/projects.php | 30 ++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 1 deletion(-) diff --git a/app/config/collections/common.php b/app/config/collections/common.php index 3f6245dfdd..8ca1d91b67 100644 --- a/app/config/collections/common.php +++ b/app/config/collections/common.php @@ -2352,6 +2352,20 @@ return [ 'lengths' => [], 'orders' => [], ], + [ + '$id' => ID::custom('_key_expired'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['expired'], + 'lengths' => [], + 'orders' => [], + ], + [ + '$id' => ID::custom('_key_session_internal_id'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['sessionInternalId'], + 'lengths' => [], + 'orders' => [], + ], ], ], diff --git a/app/config/collections/projects.php b/app/config/collections/projects.php index e77751c124..4844ad16d3 100644 --- a/app/config/collections/projects.php +++ b/app/config/collections/projects.php @@ -1182,6 +1182,13 @@ return [ 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_resource_internal_id'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceInternalId'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -1330,7 +1337,14 @@ return [ 'attributes' => ['deploymentId'], 'lengths' => [Database::LENGTH_KEY], 'orders' => [Database::ORDER_ASC], - ] + ], + [ + '$id' => ID::custom('_key_deployment_internal_id'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['deploymentInternalId'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -1602,6 +1616,13 @@ return [ 'lengths' => [], 'orders' => [Database::ORDER_ASC], ], + [ + '$id' => ID::custom('_key_function_internal_id'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['functionInternalId'], + 'lengths' => [], + 'orders' => [], + ], ], ], @@ -1720,6 +1741,13 @@ return [ 'lengths' => [], 'orders' => [], ], + [ + '$id' => ID::custom('_key_resource_internal_id_resource_type'), + 'type' => Database::INDEX_KEY, + 'attributes' => ['resourceInternalId', 'resourceType'], + 'lengths' => [], + 'orders' => [], + ], ], ],