about summary refs log tree commit diff
path: root/db/migrate/20190419045308_monsterpit_remove_nulls.rb
blob: 32701d58ac5d55847c69ae06c7f555907881133f (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
class MonsterpitRemoveNulls < ActiveRecord::Migration[5.2]
  disable_ddl_transaction!

  def change
    safety_assured do
      change_column_null :statuses, :curated, false, false
      change_column_default :statuses, :curated, false

      change_column_null :statuses, :network, false, false
      change_column_default :statuses, :network, false

      change_column_null :accounts, :hidden, false, false
      change_column_default :accounts, :hidden, false

      change_column_null :accounts, :vars, false, {}
      change_column_default :accounts, :vars, {}
    end
  end
end