summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorChantal Rollison <crollison@gitlab.com>2018-08-14 12:44:17 -0700
committerChantal Rollison <crollison@gitlab.com>2018-08-21 08:21:01 -0700
commite9c1f184bcc928c2c44b772b72b0380efe178efc (patch)
tree68a0ab4d8bdff96c428c5e1d625b61d33e1fe749 /db
parentd2590b154228ed49dd4a949c889fb6234343ec94 (diff)
downloadgitlab-ce-e9c1f184bcc928c2c44b772b72b0380efe178efc.tar.gz
Added count for label, assignee, and milestone listsccr/48800/ping_for_boards
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20180815175440_add_index_on_list_type.rb16
-rw-r--r--db/schema.rb1
2 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20180815175440_add_index_on_list_type.rb b/db/migrate/20180815175440_add_index_on_list_type.rb
new file mode 100644
index 00000000000..aad805e436e
--- /dev/null
+++ b/db/migrate/20180815175440_add_index_on_list_type.rb
@@ -0,0 +1,16 @@
+# frozen_string_literal: true
+class AddIndexOnListType < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :lists, :list_type
+ end
+
+ def down
+ remove_concurrent_index :lists, :list_type
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 6168a1be29e..f5ce7df60e8 100644
--- a/db/schema.rb
+++ b/db/schema.rb
@@ -1135,6 +1135,7 @@ ActiveRecord::Schema.define(version: 20180816193530) do
add_index "lists", ["board_id", "label_id"], name: "index_lists_on_board_id_and_label_id", unique: true, using: :btree
add_index "lists", ["label_id"], name: "index_lists_on_label_id", using: :btree
+ add_index "lists", ["list_type"], name: "index_lists_on_list_type", using: :btree
create_table "members", force: :cascade do |t|
t.integer "access_level", null: false