Sha256: 0ec3036e8fbc357fc9bbb14434f0d86ffe050072f85ac987f5b6e301881a01ce

Contents?: true

Size: 484 Bytes

Versions: 62

Compression:

Stored size: 484 Bytes

Contents

class AddTaskLockIndexOnResourceTypeAndTaskId < ActiveRecord::Migration[6.0]
  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

62 entries across 62 versions & 1 rubygems

Version Path
foreman-tasks-8.2.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.1.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.1.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.1.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.0.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.0.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.0.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-7.2.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-7.1.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-7.2.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-7.1.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-6.0.3 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-7.0.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-6.0.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-4.1.6 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-5.2.3 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-6.0.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-5.2.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-6.0.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-5.2.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb