say"Multiple users registered with e-mail address #{ref_user.email}.",:yellow
say"e-mail will be disabled for the following accounts: #{users.map{|user|user.account.acct}.join(', ')}",:yellow
@ -289,7 +289,7 @@ module Mastodon::CLI
defdeduplicate_users_process_confirmation_token
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE confirmation_token IS NOT NULL GROUP BY confirmation_token HAVING count(*) > 1").eachdo|row|
say"Unsetting confirmation token for those accounts: #{users.map{|user|user.account.acct}.join(', ')}",:yellow
users.eachdo|user|
@ -301,7 +301,7 @@ module Mastodon::CLI
defdeduplicate_users_process_remember_token
ifmigrator_version<2022_01_18_183010
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE remember_token IS NOT NULL GROUP BY remember_token HAVING count(*) > 1").eachdo|row|
say"Unsetting remember token for those accounts: #{users.map{|user|user.account.acct}.join(', ')}",:yellow
users.eachdo|user|
@ -313,7 +313,7 @@ module Mastodon::CLI
defdeduplicate_users_process_password_token
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM users WHERE reset_password_token IS NOT NULL GROUP BY reset_password_token HAVING count(*) > 1").eachdo|row|
say"Unsetting password reset token for those accounts: #{users.map{|user|user.account.acct}.join(', ')}",:yellow
users.eachdo|user|
@ -341,7 +341,7 @@ module Mastodon::CLI
say'Removing duplicate account identity proofs…'
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM account_identity_proofs GROUP BY account_id, provider, provider_username HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM announcement_reactions GROUP BY account_id, announcement_id, name HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM conversations WHERE uri IS NOT NULL GROUP BY uri HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM custom_emojis GROUP BY shortcode, domain HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM custom_emoji_categories GROUP BY name HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM unavailable_domains GROUP BY domain HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM email_domain_blocks GROUP BY domain HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM statuses WHERE uri IS NOT NULL GROUP BY uri HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM tags GROUP BY lower((name)::text) HAVING count(*) > 1").eachdo|row|
ActiveRecord::Base.connection.select_all("SELECT string_agg(id::text, ',') AS ids FROM webauthn_credentials GROUP BY external_id HAVING count(*) > 1").eachdo|row|