about summary refs log tree commit diff
path: root/db/post_migrate/20220429101850_clear_email_domain_blocks.rb
blob: ff525b6506c6aa7ebc1df64b6c12d987b647a2c3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
# frozen_string_literal: true

class ClearEmailDomainBlocks < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  class EmailDomainBlock < ApplicationRecord
  end

  def up
    EmailDomainBlock.where.not(parent_id: nil).in_batches.delete_all
  end

  def down; end
end