debian-mirror-gitlab/db/migrate/20200528054112_add_index_to_package_name.rb

20 lines
408 B
Ruby
Raw Normal View History

2020-06-23 00:09:42 +05:30
# frozen_string_literal: true
class AddIndexToPackageName < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
INDEX_NAME = 'package_name_index'.freeze
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