Skip to content
Snippets Groups Projects
Commit ae465ad7 authored by Paolo Mainardi's avatar Paolo Mainardi Committed by Alexandru Croitor
Browse files
parent e7b75f38
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -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}')")
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment