2018-11-08 19:23:39 +05:30
|
|
|
class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration
|
|
|
|
# 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-11-18 11:00:15 +05:30
|
|
|
default: -1
|
2018-11-08 19:23:39 +05:30
|
|
|
|
|
|
|
execute("UPDATE application_settings SET dsa_key_restriction = -1")
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
change_column :application_settings, :dsa_key_restriction, :integer, null: false,
|
2018-11-18 11:00:15 +05:30
|
|
|
default: 0
|
2018-11-08 19:23:39 +05:30
|
|
|
end
|
|
|
|
end
|