Commit 19240517 authored by Mayra Cabrera's avatar Mayra Cabrera

Merge branch 'fix-license-management-migration' into 'master'

Fix EachBatch call in license management migration

See merge request gitlab-org/gitlab!39380
parents 8e6df829 cb56723b
......@@ -37,7 +37,7 @@ class MigrateLicenseManagementArtifactsToLicenseScanning < ActiveRecord::Migrati
SQL
end
JobArtifact.where(file_type: LICENSE_MANAGEMENT_FILE_TYPE).each_batch(of: 1000) do |relation|
JobArtifact.where(file_type: LICENSE_MANAGEMENT_FILE_TYPE).each_batch(column: :job_id, of: 1000) do |relation|
relation.update_all(file_type: LICENSE_SCANNING_FILE_TYPE)
end
end
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment