about summary refs log tree commit diff
path: root/db/migrate/20171114080328_add_index_domain_to_email_domain_blocks.rb
blob: 34dc6ff00484be7f689c5484e310d8ff994db156 (plain) (blame)
1
2
3
4
5
6
7
8
class AddIndexDomainToEmailDomainBlocks < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def change
    add_index :email_domain_blocks, :domain, algorithm: :concurrently, unique: true
    change_column_default :email_domain_blocks, :domain, from: nil, to: ''
  end
end