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
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb')
-rw-r--r--db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb17
1 files changed, 17 insertions, 0 deletions
diff --git a/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb b/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb
new file mode 100644
index 00000000000..1f1e47fdac1
--- /dev/null
+++ b/db/post_migrate/20221013154159_update_invalid_dormant_user_setting.rb
@@ -0,0 +1,17 @@
+# frozen_string_literal: true
+
+class UpdateInvalidDormantUserSetting < Gitlab::Database::Migration[2.0]
+ disable_ddl_transaction!
+
+ restrict_gitlab_migration gitlab_schema: :gitlab_main
+
+ # rubocop:disable Layout/LineLength
+ def up
+ execute("update application_settings set deactivate_dormant_users_period=90 where deactivate_dormant_users_period < 90")
+ end
+ # rubocop:enable Layout/LineLength
+
+ def down
+ # no-op
+ end
+end