Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20230419094939_swap_merge_request_metrics_id_to_bigint_for_self_hosts.rb')
-rw-r--r--db/post_migrate/20230419094939_swap_merge_request_metrics_id_to_bigint_for_self_hosts.rb4
1 files changed, 2 insertions, 2 deletions
diff --git a/db/post_migrate/20230419094939_swap_merge_request_metrics_id_to_bigint_for_self_hosts.rb b/db/post_migrate/20230419094939_swap_merge_request_metrics_id_to_bigint_for_self_hosts.rb
index d249ffb9c1b..f27cc34aef8 100644
--- a/db/post_migrate/20230419094939_swap_merge_request_metrics_id_to_bigint_for_self_hosts.rb
+++ b/db/post_migrate/20230419094939_swap_merge_request_metrics_id_to_bigint_for_self_hosts.rb
@@ -31,8 +31,8 @@ class SwapMergeRequestMetricsIdToBigintForSelfHosts < Gitlab::Database::Migratio
def swap
add_concurrent_index TABLE_NAME, :id_convert_to_bigint, unique: true,
name: 'index_merge_request_metrics_on_id_convert_to_bigint'
- add_concurrent_index TABLE_NAME, 'target_project_id, merged_at DESC NULLS LAST, id_convert_to_bigint DESC',
- name: TMP_INDEX_NAME
+ add_concurrent_index TABLE_NAME, [:target_project_id, :merged_at, :id_convert_to_bigint],
+ name: TMP_INDEX_NAME, order: { merged_at: 'DESC NULLS LAST', id_convert_to_bigint: 'DESC' }
with_lock_retries(raise_on_exhaustion: true) do
execute "LOCK TABLE #{TABLE_NAME} IN ACCESS EXCLUSIVE MODE"