2020-06-04 05:08:01 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
|
|
|
class AddIndexToPackageName < ActiveRecord::Migration[6.0]
|
|
|
|
include Gitlab::Database::MigrationHelpers
|
|
|
|
|
|
|
|
DOWNTIME = false
|
|
|
|
|
|
|
|
disable_ddl_transaction!
|
|
|
|
|
2021-01-08 13:10:43 -05:00
|
|
|
INDEX_NAME = 'package_name_index'
|
2020-06-04 05:08:01 -04:00
|
|
|
|
|
|
|
def up
|
|
|
|
add_concurrent_index(:packages_packages, :name, name: INDEX_NAME)
|
|
|
|
end
|
|
|
|
|
|
|
|
def down
|
|
|
|
remove_concurrent_index(:packages_packages, :name, name: INDEX_NAME)
|
|
|
|
end
|
|
|
|
end
|