debian-mirror-gitlab/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb

17 lines
614 B
Ruby
Raw Normal View History

2019-02-15 15:39:39 +05:30
class ChangeDefaultValueForDsaKeyRestriction < ActiveRecord::Migration[4.2]
2018-11-08 19:23:39 +05:30
# 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