Welcome to mirror list, hosted at ThFree Co, Russian Federation.

20140729145339_migrate_project_tags.rb « migrate « db - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 5760e4bfeaa85054dc04c24741d60f588b972a27 (plain)
1
2
3
4
5
6
7
8
9
class MigrateProjectTags < ActiveRecord::Migration
  def up
    ActsAsTaggableOn::Tagging.where(taggable_type: 'Project', context: 'labels').update_all(context: 'tags')
  end

  def down
    ActsAsTaggableOn::Tagging.where(taggable_type: 'Project', context: 'tags').update_all(context: 'labels')
  end
end