summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Lopez <james@jameslopez.es>2017-04-24 16:36:24 +0200
committerJames Lopez <james@jameslopez.es>2017-04-24 16:51:30 +0200
commit89d91197dda81978e063cdb008c954e2763647eb (patch)
tree4eecc8b9e909a432e1eadbfd7dd7823fc39d0c38
parentfff6a8b59e70f63b2bdc2491c2f5bf65d2c7f3d4 (diff)
downloadgitlab-ce-89d91197dda81978e063cdb008c954e2763647eb.tar.gz
add index to webhooks type column
-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