提交 d426b6bc 编写于 作者: D Douwe Maan

Merge branch 'ee-add-project-repository-storages-index' into 'master'

Index projects on repository storage

See merge request gitlab-org/gitlab-ce!14414
---
title: Index projects on repository storage
merge_request: 14414
author:
type: other
class AddProjectRepositoryStorageIndex < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index(*index_spec) unless index_exists?(*index_spec)
end
def down
remove_concurrent_index(*index_spec) if index_exists?(*index_spec)
end
def index_spec
[:projects, :repository_storage]
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170918223303) do
ActiveRecord::Schema.define(version: 20170921115009) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -1230,6 +1230,7 @@ ActiveRecord::Schema.define(version: 20170918223303) do
add_index "projects", ["path"], name: "index_projects_on_path", using: :btree
add_index "projects", ["path"], name: "index_projects_on_path_trigram", using: :gin, opclasses: {"path"=>"gin_trgm_ops"}
add_index "projects", ["pending_delete"], name: "index_projects_on_pending_delete", using: :btree
add_index "projects", ["repository_storage"], name: "index_projects_on_repository_storage", using: :btree
add_index "projects", ["runners_token"], name: "index_projects_on_runners_token", using: :btree
add_index "projects", ["star_count"], name: "index_projects_on_star_count", using: :btree
add_index "projects", ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册