summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-10-13 16:04:36 +0200
committerZeger-Jan van de Weg <mail@zjvandeweg.nl>2015-10-16 11:30:26 +0200
commit64504b636470ad1048ba6310d6bd2dff8a28b914 (patch)
treeafc3ddb5d66e29dde2b5fc727237ef0760e406f6 /db
parent0c2df939dff145eda4e2fe4a292793cb9571799b (diff)
downloadgitlab-ce-64504b636470ad1048ba6310d6bd2dff8a28b914.tar.gz
Add an index to milestones title and label title
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20151013133938_add_index_to_milestones.rb6
-rw-r--r--db/schema.rb2
2 files changed, 8 insertions, 0 deletions
diff --git a/db/migrate/20151013133938_add_index_to_milestones.rb b/db/migrate/20151013133938_add_index_to_milestones.rb
new file mode 100644
index 00000000000..41cd91e570b
--- /dev/null
+++ b/db/migrate/20151013133938_add_index_to_milestones.rb
@@ -0,0 +1,6 @@
+class AddIndexToMilestones < ActiveRecord::Migration
+ def change
+ add_index :milestones, :title
+ add_index :labels, :title
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 7a11dfca034..68bd9d2c3e5 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -410,6 +410,7 @@ ActiveRecord::Schema.define(version: 20151008130321) do
end
add_index "labels", ["project_id"], name: "index_labels_on_project_id", using: :btree
+ add_index "labels", ["title"], name: "index_labels_on_title", using: :btree
create_table "members", force: true do |t|
t.integer "access_level", null: false
@@ -491,6 +492,7 @@ ActiveRecord::Schema.define(version: 20151008130321) do
add_index "milestones", ["due_date"], name: "index_milestones_on_due_date", using: :btree
add_index "milestones", ["project_id", "iid"], name: "index_milestones_on_project_id_and_iid", unique: true, using: :btree
add_index "milestones", ["project_id"], name: "index_milestones_on_project_id", using: :btree
+ add_index "milestones", ["title"], name: "index_milestones_on_title", using: :btree
create_table "namespaces", force: true do |t|
t.string "name", null: false