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:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-06-14 06:09:53 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2021-06-14 06:09:53 +0300
commit8f30cb223b5e15af8b21ff313e81f70d46c5a42a (patch)
tree6881d3077808ec9900011fb51c3df203591d5c2b /db
parente73d5c696a5465f8ba28bdd5582e766f0fa42e7c (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20210531070452_default_enforce_ssh_key_expiration.rb7
-rw-r--r--db/migrate/20210531071107_enable_enforce_ssh_key_expiration.rb15
-rw-r--r--db/schema_migrations/202105310704521
-rw-r--r--db/schema_migrations/202105310711071
-rw-r--r--db/structure.sql2
5 files changed, 25 insertions, 1 deletions
diff --git a/db/migrate/20210531070452_default_enforce_ssh_key_expiration.rb b/db/migrate/20210531070452_default_enforce_ssh_key_expiration.rb
new file mode 100644
index 00000000000..8ddbb528962
--- /dev/null
+++ b/db/migrate/20210531070452_default_enforce_ssh_key_expiration.rb
@@ -0,0 +1,7 @@
+# frozen_string_literal: true
+
+class DefaultEnforceSshKeyExpiration < ActiveRecord::Migration[6.0]
+ def change
+ change_column_default(:application_settings, :enforce_ssh_key_expiration, from: false, to: true)
+ end
+end
diff --git a/db/migrate/20210531071107_enable_enforce_ssh_key_expiration.rb b/db/migrate/20210531071107_enable_enforce_ssh_key_expiration.rb
new file mode 100644
index 00000000000..d5a97b6e761
--- /dev/null
+++ b/db/migrate/20210531071107_enable_enforce_ssh_key_expiration.rb
@@ -0,0 +1,15 @@
+# frozen_string_literal: true
+
+class EnableEnforceSshKeyExpiration < ActiveRecord::Migration[6.0]
+ class ApplicationSetting < ActiveRecord::Base
+ self.table_name = 'application_settings'
+ end
+
+ def up
+ ApplicationSetting.reset_column_information
+
+ ApplicationSetting.where.not(enforce_ssh_key_expiration: false).each do |application_setting|
+ application_setting.update!(enforce_ssh_key_expiration: true)
+ end
+ end
+end
diff --git a/db/schema_migrations/20210531070452 b/db/schema_migrations/20210531070452
new file mode 100644
index 00000000000..51a023a544c
--- /dev/null
+++ b/db/schema_migrations/20210531070452
@@ -0,0 +1 @@
+e569b99998d9c670af17ec747e37726671601ba06fa97da83373649adb3aab31 \ No newline at end of file
diff --git a/db/schema_migrations/20210531071107 b/db/schema_migrations/20210531071107
new file mode 100644
index 00000000000..f855e0990e1
--- /dev/null
+++ b/db/schema_migrations/20210531071107
@@ -0,0 +1 @@
+38dcfcd162a3b49a9b16b45b2f9818275807bf419880729b5c552bccb0d4dc9e \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index 80382f68c22..56b6dcd0a24 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -9488,7 +9488,7 @@ CREATE TABLE application_settings (
rate_limiting_response_text text,
invisible_captcha_enabled boolean DEFAULT false NOT NULL,
container_registry_cleanup_tags_service_max_list_size integer DEFAULT 200 NOT NULL,
- enforce_ssh_key_expiration boolean DEFAULT false NOT NULL,
+ enforce_ssh_key_expiration boolean DEFAULT true NOT NULL,
git_two_factor_session_expiry integer DEFAULT 15 NOT NULL,
keep_latest_artifact boolean DEFAULT true NOT NULL,
notes_create_limit integer DEFAULT 300 NOT NULL,