From 720770ecb82ed74979852ddf6e6a3b1dc4c88b8e Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Wed, 18 May 2022 06:26:19 +0000 Subject: Add latest changes from gitlab-org/gitlab@14-10-stable-ee --- .../project_namespaces/backfill_project_namespaces.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb b/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb index bd7d7d02162..c13dbd76630 100644 --- a/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb +++ b/lib/gitlab/background_migration/project_namespaces/backfill_project_namespaces.rb @@ -55,7 +55,7 @@ module Gitlab end def cleanup_gin_index(table_name) - index_names = ActiveRecord::Base.connection.select_values("select indexname::text from pg_indexes where tablename = '#{table_name}' and indexdef ilike '%gin%'") + index_names = ApplicationRecord.connection.select_values("select indexname::text from pg_indexes where tablename = '#{table_name}' and indexdef ilike '%using gin%'") index_names.each do |index_name| ActiveRecord::Base.connection.execute("select gin_clean_pending_list('#{index_name}')") -- cgit v1.2.1