debian-mirror-gitlab/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
2019-02-15 15:39:39 +05:30

17 lines
614 B
Ruby

class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration[4.2]
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def up
change_column :application_settings, :dsa_key_restriction, :integer, null: false,
default: -1
execute("UPDATE application_settings SET dsa_key_restriction = -1")
end
def down
change_column :application_settings, :dsa_key_restriction, :integer, null: false,
default: 0
end
end