2018-11-13 07:27:31 +00:00
|
|
|
class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration[4.2]
|
2018-06-05 04:00:25 +00:00
|
|
|
# Set this constant to true if this migration requires downtime.
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
def up
|
|
|
|
change_column :application_settings, :dsa_key_restriction, :integer, null: false,
|
2018-07-25 08:59:23 +00:00
|
|
|
default: -1
|
2018-06-05 04:00:25 +00:00
|
|
|
|
|
|
|
execute("UPDATE application_settings SET dsa_key_restriction = -1")
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
change_column :application_settings, :dsa_key_restriction, :integer, null: false,
|
2018-07-25 08:59:23 +00:00
|
|
|
default: 0
|
2018-06-05 04:00:25 +00:00
|
|
|
end
|
|
|
|
end
|