summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-29 18:23:18 +0300
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-29 18:23:18 +0300
commit6fb9badcaef5152c60bf4091899a84b34f5cc1b8 (patch)
treed550b8cd824aba48bc89f91c7fe888123123b7b4 /db
parent03654a6abf47c88b8b980a6707874ff78080d2fe (diff)
downloadgitlab-ce-6fb9badcaef5152c60bf4091899a84b34f5cc1b8.tar.gz
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')
-rw-r--r--db/migrate/20140729145339_migrate_project_tags.rb9
-rw-r--r--db/schema.rb2
2 files changed, 10 insertions, 1 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
diff --git a/db/schema.rb b/db/schema.rb
index 7ab7982feab..77dac2954d4 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
-ActiveRecord::Schema.define(version: 20140729140420) do
+ActiveRecord::Schema.define(version: 20140729145339) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"