summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2020-07-29 19:57:17 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2020-07-29 19:57:17 +0000
commit37e3c3bb33c3d331fceb2840cf3c1d3c466dcfa9 (patch)
tree9d3739f627b491b42ede6424acd11b589beed25f /db
parentb55baf593e63db9be3f446ea0cca0281a69dd2e2 (diff)
downloadgitlab-ce-37e3c3bb33c3d331fceb2840cf3c1d3c466dcfa9.tar.gz
Add latest changes from gitlab-org/gitlab@13-2-stable-ee
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb9
1 files changed, 9 insertions, 0 deletions
diff --git a/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb b/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb
index 41280872a94..62fdfc783bc 100644
--- a/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb
+++ b/db/post_migrate/20200615111857_unconfirm_wrongfully_verified_emails.rb
@@ -12,6 +12,10 @@ class UnconfirmWrongfullyVerifiedEmails < ActiveRecord::Migration[6.0]
MIGRATION = 'WrongfullyConfirmedEmailUnconfirmer'
EMAIL_INDEX_NAME = 'tmp_index_for_email_unconfirmation_migration'
+ class ApplicationSetting < ActiveRecord::Base
+ self.table_name = 'application_settings'
+ end
+
class Email < ActiveRecord::Base
include EachBatch
end
@@ -19,6 +23,11 @@ class UnconfirmWrongfullyVerifiedEmails < ActiveRecord::Migration[6.0]
def up
add_concurrent_index :emails, :id, where: 'confirmed_at IS NOT NULL', name: EMAIL_INDEX_NAME
+ ApplicationSetting.reset_column_information
+
+ setting_record = ApplicationSetting.last
+ return unless setting_record&.send_user_confirmation_email
+
queue_background_migration_jobs_by_range_at_intervals(Email,
MIGRATION,
INTERVAL,