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
path: root/db
diff options
context:
space:
mode:
authorDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-30 15:25:27 +0400
committerDmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>2014-07-30 15:25:27 +0400
commitcc331684593143cba773b0160222865eeb86b134 (patch)
tree735dd5494e593e1ed2a34ef063456b52707fd27c /db
parent6ac26a3cb6feabf09aefc4e23855c393d50cf08a (diff)
Add indicies to labels
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20140730111702_add_index_to_labels.rb7
-rw-r--r--db/schema.rb7
2 files changed, 13 insertions, 1 deletions
diff --git a/db/migrate/20140730111702_add_index_to_labels.rb b/db/migrate/20140730111702_add_index_to_labels.rb
new file mode 100644
index 00000000000..494241c873c
--- /dev/null
+++ b/db/migrate/20140730111702_add_index_to_labels.rb
@@ -0,0 +1,7 @@
+class AddIndexToLabels < ActiveRecord::Migration
+ def change
+ add_index "labels", :project_id
+ add_index "label_links", :label_id
+ add_index "label_links", [:target_id, :target_type]
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 9d8775c0193..9159556ac72 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: 20140729152420) do
+ActiveRecord::Schema.define(version: 20140730111702) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -117,6 +117,9 @@ ActiveRecord::Schema.define(version: 20140729152420) do
t.datetime "updated_at"
end
+ add_index "label_links", ["label_id"], name: "index_label_links_on_label_id", using: :btree
+ add_index "label_links", ["target_id", "target_type"], name: "index_label_links_on_target_id_and_target_type", using: :btree
+
create_table "labels", force: true do |t|
t.string "title"
t.string "color"
@@ -125,6 +128,8 @@ ActiveRecord::Schema.define(version: 20140729152420) do
t.datetime "updated_at"
end
+ add_index "labels", ["project_id"], name: "index_labels_on_project_id", using: :btree
+
create_table "merge_request_diffs", force: true do |t|
t.string "state"
t.text "st_commits"