summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorJames Lopez <james@gitlab.com>2017-04-25 15:21:18 +0000
committerDouwe Maan <douwe@gitlab.com>2017-04-25 15:21:18 +0000
commitad4b6302d4dc13eb8a742b9e1c742d40d8cf6ec8 (patch)
tree4ce79a29af335c5098f47e89d876be1701e254db /db
parentd1e570221bfdf1f513af017e39d7ebfe8967cfe3 (diff)
downloadgitlab-ce-ad4b6302d4dc13eb8a742b9e1c742d40d8cf6ec8.tar.gz
Add index to webhooks type column
Diffstat (limited to 'db')
-rw-r--r--db/migrate/20170424142900_add_index_to_web_hooks_type.rb15
-rw-r--r--db/schema.rb3
2 files changed, 17 insertions, 1 deletions
diff --git a/db/migrate/20170424142900_add_index_to_web_hooks_type.rb b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
new file mode 100644
index 00000000000..9af158e3844
--- /dev/null
+++ b/db/migrate/20170424142900_add_index_to_web_hooks_type.rb
@@ -0,0 +1,15 @@
+class AddIndexToWebHooksType < ActiveRecord::Migration
+ include Gitlab::Database::MigrationHelpers
+
+ DOWNTIME = false
+
+ disable_ddl_transaction!
+
+ def up
+ add_concurrent_index :web_hooks, :type
+ end
+
+ def down
+ remove_concurrent_index :web_hooks, :type
+ end
+end
diff --git a/db/schema.rb b/db/schema.rb
index 7b13f2a98a1..bd6fef22d06 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: 20170423064036) do
+ActiveRecord::Schema.define(version: 20170424142900) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
@@ -1371,6 +1371,7 @@ ActiveRecord::Schema.define(version: 20170423064036) do
end
add_index "web_hooks", ["project_id"], name: "index_web_hooks_on_project_id", using: :btree
+ add_index "web_hooks", ["type"], name: "index_web_hooks_on_type", using: :btree
add_foreign_key "boards", "projects"
add_foreign_key "chat_teams", "namespaces", on_delete: :cascade