about summary refs log tree commit diff
path: root/db/migrate/20170711225116_fix_null_booleans.rb
blob: 5b319471d700682acaf87ba78780ea2a87e112f3 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
class FixNullBooleans < ActiveRecord::Migration[5.1]
  def change
    change_column_default :domain_blocks, :reject_media, false
    change_column_null :domain_blocks, :reject_media, false, false

    change_column_default :imports, :approved, false
    change_column_null :imports, :approved, false, false

    change_column_null :statuses, :sensitive, false, false
    change_column_null :statuses, :reply, false, false

    change_column_null :users, :admin, false, false

    change_column_default :users, :otp_required_for_login, false
    change_column_null :users, :otp_required_for_login, false, false
  end
end