diff options
author | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-20 18:32:51 +0200 |
---|---|---|
committer | Ahmad Sherif <me@ahmadsherif.com> | 2016-09-20 18:33:40 +0200 |
commit | 5d3adc176f320e0ee6076528fd7a8c41a3ef533d (patch) | |
tree | be4caa99d0343a7c31f0ff9e3ebd9c38a0f9a784 | |
parent | 31ff272f763a93b944cd288cc35c54e5c2645ebd (diff) | |
download | gitlab-ce-fix/index-labels-on-title.tar.gz |
Add index on labels titlefix/index-labels-on-title
-rw-r--r-- | CHANGELOG | 1 | ||||
-rw-r--r-- | db/migrate/20160920160832_add_index_to_labels_title.rb | 11 | ||||
-rw-r--r-- | db/schema.rb | 3 |
3 files changed, 14 insertions, 1 deletions
diff --git a/CHANGELOG b/CHANGELOG index 97e1c3b15c4..25d673af921 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -168,6 +168,7 @@ v 8.12.0 (unreleased) - Add UX improvements for merge request version diffs - Fix Import/Export issues importing protected branches and some specific models - Fix non-master branch readme display in tree view + - Add index on labels title - Add UX improvements for merge request version diffs v 8.11.6 diff --git a/db/migrate/20160920160832_add_index_to_labels_title.rb b/db/migrate/20160920160832_add_index_to_labels_title.rb new file mode 100644 index 00000000000..b5de552b98c --- /dev/null +++ b/db/migrate/20160920160832_add_index_to_labels_title.rb @@ -0,0 +1,11 @@ +class AddIndexToLabelsTitle < ActiveRecord::Migration + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def change + add_concurrent_index :labels, :title + end +end diff --git a/db/schema.rb b/db/schema.rb index 3567908de03..eff34ecfb71 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: 20160913212128) do +ActiveRecord::Schema.define(version: 20160920160832) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -510,6 +510,7 @@ ActiveRecord::Schema.define(version: 20160913212128) do add_index "labels", ["priority"], name: "index_labels_on_priority", using: :btree 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 "lfs_objects", force: :cascade do |t| t.string "oid", null: false |