Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorRubén Dávila <ruben@gitlab.com>2018-06-05 07:00:25 +0300
committerRubén Dávila <ruben@gitlab.com>2018-06-05 07:00:25 +0300
commitc503429e5e8538649bec02d74963ec0eb8f0cb98 (patch)
tree69ee0c0c320b22dae5d46d0392b16b1a89e65aae /db
parent160cc6cd7b0218cdd1e210c4133fd469ffacf656 (diff)
Add migration to disable the usage of DSA keys
Additionally the current application setting is also updated to disable the usage of DSA keys.
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb16
-rw-r--r--db/schema.rb4
2 files changed, 18 insertions, 2 deletions
diff --git a/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb b/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
new file mode 100644
index 00000000000..d0dcacc5b66
--- /dev/null
+++ b/db/migrate/20180531220618_change_default_value_for_dsa_key_restriction.rb
@@ -0,0 +1,16 @@
+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,
+ 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
diff --git a/db/schema.rb b/db/schema.rb
index 97247387bc7..b14ea5640d4 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20180529093006) do
+ActiveRecord::Schema.define(version: 20180531220618) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -110,7 +110,7 @@ ActiveRecord::Schema.define(version: 20180529093006) do
t.text "shared_runners_text_html"
t.text "after_sign_up_text_html"
t.integer "rsa_key_restriction", default: 0, null: false
- t.integer "dsa_key_restriction", default: 0, null: false
+ t.integer "dsa_key_restriction", default: -1, null: false
t.integer "ecdsa_key_restriction", default: 0, null: false
t.integer "ed25519_key_restriction", default: 0, null: false
t.boolean "housekeeping_enabled", default: true, null: false