debian-mirror-gitlab/db/migrate/20200316162648_add_index_on_namespace_id_and_id_to_projects.rb
2020-04-22 19:07:51 +05:30

20 lines
456 B
Ruby

# frozen_string_literal: true
class AddIndexOnNamespaceIdAndIdToProjects < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :projects, [:namespace_id, :id]
remove_concurrent_index :projects, :namespace_id
end
def down
add_concurrent_index :projects, :namespace_id
remove_concurrent_index :projects, [:namespace_id, :id]
end
end