The code powering m.abunchtell.com https://m.abunchtell.com
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.
 
 
 
 

17 lignes
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