debian-mirror-gitlab/db/migrate/20180503175054_add_indexes_to_project_mirror_data.rb

18 lines
482 B
Ruby
Raw Normal View History

2018-10-15 14:42:47 +05:30
class AddIndexesToProjectMirrorData < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :project_mirror_data, :jid
add_concurrent_index :project_mirror_data, :status
end
def down
remove_index :project_mirror_data, :jid if index_exists? :project_mirror_data, :jid
remove_index :project_mirror_data, :status if index_exists? :project_mirror_data, :status
end
end