The code powering m.abunchtell.com https://m.abunchtell.com
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.
 
 
 
 

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