about summary refs log tree commit diff
path: root/db/migrate/20180528141303_fix_accounts_unique_index.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate/20180528141303_fix_accounts_unique_index.rb')
-rw-r--r--db/migrate/20180528141303_fix_accounts_unique_index.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/db/migrate/20180528141303_fix_accounts_unique_index.rb b/db/migrate/20180528141303_fix_accounts_unique_index.rb
index 5d7b3c463..02813f363 100644
--- a/db/migrate/20180528141303_fix_accounts_unique_index.rb
+++ b/db/migrate/20180528141303_fix_accounts_unique_index.rb
@@ -37,7 +37,7 @@ class FixAccountsUniqueIndex < ActiveRecord::Migration[5.2]
       end
     end
 
-    duplicates = Account.connection.select_all('SELECT string_agg(id::text, \',\') AS ids FROM accounts GROUP BY lower(username), lower(domain) HAVING count(*) > 1').to_hash
+    duplicates = Account.connection.select_all('SELECT string_agg(id::text, \',\') AS ids FROM accounts GROUP BY lower(username), lower(domain) HAVING count(*) > 1').to_ary
 
     duplicates.each do |row|
       deduplicate_account!(row['ids'].split(','))