summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorNick Thomas <nick@gitlab.com>2017-08-28 21:33:35 +0100
committerNick Thomas <nick@gitlab.com>2017-08-30 20:50:44 +0100
commitb84ca08e351fc9238bef4e6b4bf74158d25d4f1d (patch)
treee7ec9704ec449b547b6193c5e0ba771a5aae62c2 /db
parent6847060266792471c9c14518a5106e0f622cd6c5 (diff)
downloadgitlab-ce-b84ca08e351fc9238bef4e6b4bf74158d25d4f1d.tar.gz
Address review comments
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb7
1 files changed, 4 insertions, 3 deletions
diff --git a/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb b/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb
index 2882e7f8b45..5b6079002c0 100644
--- a/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb
+++ b/db/migrate/20161020180657_add_minimum_key_length_to_application_settings.rb
@@ -7,12 +7,13 @@ class AddMinimumKeyLengthToApplicationSettings < ActiveRecord::Migration
disable_ddl_transaction!
def up
- # A key restriction has two possible states:
+ # A key restriction has these possible states:
#
# * -1 means "this key type is completely disabled"
- # * >= 0 means "keys must have at least this many bits to be valid"
+ # * 0 means "all keys of this type are valid"
+ # * > 0 means "keys must have at least this many bits to be valid"
#
- # A value of 0 is equivalent to "there are no restrictions on keys of this type"
+ # The default is 0, for backward compatibility
add_column_with_default :application_settings, :rsa_key_restriction, :integer, default: 0
add_column_with_default :application_settings, :dsa_key_restriction, :integer, default: 0
add_column_with_default :application_settings, :ecdsa_key_restriction, :integer, default: 0