diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-31 03:12:17 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-03-31 03:12:17 +0300 |
commit | 46f49bc8e69405fce01691d698c06c75aec5296a (patch) | |
tree | 05ade305dd7b87062277cc59cbef194e93cbad88 /lib/gitlab/background_migration | |
parent | 6e124379237d8122a8b4454e1e8f63f239c6958d (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/background_migration')
-rw-r--r-- | lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb b/lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb new file mode 100644 index 00000000000..6ea5c17353b --- /dev/null +++ b/lib/gitlab/background_migration/nullify_last_error_from_project_mirror_data.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +module Gitlab + module BackgroundMigration + # Nullifies last_error value from project_mirror_data table as they + # potentially included sensitive data. + # https://gitlab.com/gitlab-org/security/gitlab/-/merge_requests/3041 + class NullifyLastErrorFromProjectMirrorData < BatchedMigrationJob + feature_category :source_code_management + operation_name :update_all + + def perform + each_sub_batch { |rel| rel.update_all(last_error: nil) } + end + end + end +end |