```ruby
class AddIndexForPipelineUserId < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  def change
    add_concurrent_index :ci_commits, :user_id
  end
end
```

Disable transaction when adding index for Ci::Pipeline
user
```ruby
class AddIndexForPipelineUserId < ActiveRecord::Migration
  include Gitlab::Database::MigrationHelpers

  disable_ddl_transaction!

  def change
    add_concurrent_index :ci_commits, :user_id
  end
end
```
assistant