Commit 65fc61aa authored by Tiago Botelho's avatar Tiago Botelho

adds indexes to relevant mirror fields

parent 7ffe6cab
class AddIndexesToMirrors < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def change
add_concurrent_index :projects, [:sync_time]
add_concurrent_index :remote_mirrors, [:sync_time]
end
end
......@@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170204181513) do
ActiveRecord::Schema.define(version: 20170207150212) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
......@@ -1128,6 +1128,7 @@ ActiveRecord::Schema.define(version: 20170204181513) do
add_index "projects", ["pending_delete"], name: "index_projects_on_pending_delete", 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", ["sync_time"], name: "index_projects_on_sync_time", using: :btree
add_index "projects", ["visibility_level"], name: "index_projects_on_visibility_level", using: :btree
create_table "protected_branch_merge_access_levels", force: :cascade do |t|
......@@ -1210,6 +1211,7 @@ ActiveRecord::Schema.define(version: 20170204181513) do
end
add_index "remote_mirrors", ["project_id"], name: "index_remote_mirrors_on_project_id", using: :btree
add_index "remote_mirrors", ["sync_time"], name: "index_remote_mirrors_on_sync_time", using: :btree
create_table "routes", force: :cascade do |t|
t.integer "source_id", null: false
......
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