Sha256: ce3989180ae3c498ee57d2d72e14f7053e4be03515ce07a58917c69e46acb7bc

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

class AddTaskLockIndexOnResourceTypeAndTaskId < ActiveRecord::Migration[5.2]
  def change
    add_index :foreman_tasks_locks, [:task_id, :resource_type, :resource_id], name: 'index_tasks_locks_on_task_id_resource_type_and_resource_id'
    # These indexes are not needed as they can be gained from partial index lookups
    [:task_id, :name, :resource_type].each do |index|
      remove_index :foreman_tasks_locks, index if index_exists?(:foreman_tasks_locks, index)
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
foreman-tasks-1.1.3 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb