Commit a48ff10e authored by Luke Duncalfe's avatar Luke Duncalfe

Add missing index on lfs_objects_projects

Discovered by @abrandl.

See
https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/13894#note_178141602
parent f587e5e6
# frozen_string_literal: true
class AddLfsObjectIdIndexToLfsObjectsProjects < ActiveRecord::Migration[5.1]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :lfs_objects_projects, :lfs_object_id
end
def down
remove_concurrent_index :lfs_objects_projects, :lfs_object_id
end
end
......@@ -1770,6 +1770,7 @@ ActiveRecord::Schema.define(version: 20190611161641) do
t.datetime "created_at"
t.datetime "updated_at"
t.integer "repository_type", limit: 2
t.index ["lfs_object_id"], name: "index_lfs_objects_projects_on_lfs_object_id", using: :btree
t.index ["project_id"], name: "index_lfs_objects_projects_on_project_id", using: :btree
end
......
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