debian-mirror-gitlab/db/migrate/20160715134306_add_index_for_pipeline_user_id.rb

17 lines
349 B
Ruby
Raw Normal View History

2017-08-17 22:00:37 +05:30
# rubocop:disable RemoveIndex
2019-02-15 15:39:39 +05:30
class AddIndexForPipelineUserId < ActiveRecord::Migration[4.2]
2016-08-24 12:49:21 +05:30
include Gitlab::Database::MigrationHelpers
2017-08-17 22:00:37 +05:30
DOWNTIME = false
2016-08-24 12:49:21 +05:30
disable_ddl_transaction!
2017-08-17 22:00:37 +05:30
def up
2016-08-24 12:49:21 +05:30
add_concurrent_index :ci_commits, :user_id
end
2017-08-17 22:00:37 +05:30
def down
remove_index :ci_commits, :user_id if index_exists? :ci_commits, :user_id
end
2016-08-24 12:49:21 +05:30
end