Commit aef38632 authored by Valery Sizov's avatar Valery Sizov

Merge branch 'git-hooks-project-id-index' into 'master'

Added index on git_hooks.project_id

cc @ayufan @pcarranza 

See merge request !271
parents 545b6b1d e3b572f3
class GitHooksProjectIdIndex < ActiveRecord::Migration
disable_ddl_transaction!
def change
args = [:git_hooks, :project_id]
if Gitlab::Database.postgresql?
args << { algorithm: :concurrently }
end
add_index(*args)
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20160314143402) do
ActiveRecord::Schema.define(version: 20160316124047) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -440,6 +440,8 @@ ActiveRecord::Schema.define(version: 20160314143402) do
t.integer "max_file_size", default: 0, null: false
end
add_index "git_hooks", ["project_id"], name: "index_git_hooks_on_project_id", using: :btree
create_table "historical_data", force: :cascade do |t|
t.date "date", null: false
t.integer "active_user_count"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment