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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 01:28:11 +0300
committerKamil Trzcinski <ayufan@ayufan.eu>2015-09-15 01:29:20 +0300
commit9a3d0f1d92ee99792b40c401f83121adb8fd3387 (patch)
tree1c9a8ffd9941c4467e0b0ed63bac95d2c5cd86af /db/migrate
parentebd06d7e7da9f4df846f1af2ca49c6c64f1f90b0 (diff)
Add rake task to migrate CI tags
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20150914215247_add_ci_tags.rb23
1 files changed, 23 insertions, 0 deletions
diff --git a/db/migrate/20150914215247_add_ci_tags.rb b/db/migrate/20150914215247_add_ci_tags.rb
new file mode 100644
index 00000000000..df3390e8a82
--- /dev/null
+++ b/db/migrate/20150914215247_add_ci_tags.rb
@@ -0,0 +1,23 @@
+class AddCiTags < ActiveRecord::Migration
+ def change
+ create_table "ci_taggings", force: true do |t|
+ t.integer "tag_id"
+ t.integer "taggable_id"
+ t.string "taggable_type"
+ t.integer "tagger_id"
+ t.string "tagger_type"
+ t.string "context", limit: 128
+ t.datetime "created_at"
+ end
+
+ add_index "ci_taggings", ["tag_id", "taggable_id", "taggable_type", "context", "tagger_id", "tagger_type"], name: "ci_taggings_idx", unique: true, using: :btree
+ add_index "ci_taggings", ["taggable_id", "taggable_type", "context"], name: "index_ci_taggings_on_taggable_id_and_taggable_type_and_context", using: :btree
+
+ create_table "ci_tags", force: true do |t|
+ t.string "name"
+ t.integer "taggings_count", default: 0
+ end
+
+ add_index "ci_tags", ["name"], name: "index_ci_tags_on_name", unique: true, using: :btree
+ end
+end