diff options
author | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 19:23:18 +0400 |
---|---|---|
committer | Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com> | 2014-07-29 19:23:18 +0400 |
commit | 6fb9badcaef5152c60bf4091899a84b34f5cc1b8 (patch) | |
tree | d550b8cd824aba48bc89f91c7fe888123123b7b4 /db/migrate | |
parent | 03654a6abf47c88b8b980a6707874ff78080d2fe (diff) |
Replace project labels with tags to prevent name conflict with GitLab labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20140729145339_migrate_project_tags.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/db/migrate/20140729145339_migrate_project_tags.rb b/db/migrate/20140729145339_migrate_project_tags.rb new file mode 100644 index 00000000000..5760e4bfeaa --- /dev/null +++ b/db/migrate/20140729145339_migrate_project_tags.rb @@ -0,0 +1,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 |