Skip to content
Snippets Groups Projects
Commit dc42aae3 authored by James Brooks's avatar James Brooks Committed by Jacob Vosmaer
Browse files

Fixes #7571

parent a044c4b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -2,6 +2,12 @@ class MigrateTaggableLabels < ActiveRecord::Migration
def up
taggings = ActsAsTaggableOn::Tagging.where(taggable_type: ['Issue', 'MergeRequest'], context: 'labels')
taggings.find_each(batch_size: 500) do |tagging|
# Clean up orphaned taggings while we are here
if tagging.taggable.blank? || tagging.tag.nil?
tagging.destroy
print 'D'
next
end
create_label_from_tagging(tagging)
end
end
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment