mirror of
https://github.com/mastodon/mastodon.git
synced 2024-11-21 12:05:07 +01:00
Fix index name in fix-duplicates task (#20632)
This commit is contained in:
parent
1e83092e47
commit
457c37e47a
@ -499,7 +499,7 @@ module Mastodon
|
|||||||
|
|
||||||
def deduplicate_tags!
|
def deduplicate_tags!
|
||||||
remove_index_if_exists!(:tags, 'index_tags_on_name_lower')
|
remove_index_if_exists!(:tags, 'index_tags_on_name_lower')
|
||||||
remove_index_if_exists!(:tags, 'index_tags_on_lower_btree')
|
remove_index_if_exists!(:tags, 'index_tags_on_name_lower_btree')
|
||||||
|
|
||||||
@prompt.say 'Deduplicating tags…'
|
@prompt.say 'Deduplicating tags…'
|
||||||
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM tags GROUP BY lower((name)::text) HAVING count(*) > 1").each do |row|
|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM tags GROUP BY lower((name)::text) HAVING count(*) > 1").each do |row|
|
||||||
|
Loading…
Reference in New Issue
Block a user