The code powering m.abunchtell.com https://m.abunchtell.com
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 

17 lines
459 B

  1. class RemoveFauxRemoteAccountDuplicates < ActiveRecord::Migration[5.2]
  2. disable_ddl_transaction!
  3. def up
  4. local_domain = Rails.configuration.x.local_domain
  5. # Just a safety measure to ensure that under no circumstance
  6. # we will query `domain IS NULL` because that would return
  7. # actually local accounts, the originals
  8. return if local_domain.nil?
  9. Account.where(domain: local_domain).in_batches.destroy_all
  10. end
  11. def down; end
  12. end