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-10.0.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-10.0.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-10.0.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.2.3 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.2.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.2.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.2.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.1.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.0.4 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.1.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.0.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.0.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.3.3 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-9.0.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.2.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.1.4 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.3.2 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.3.1 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.1.3 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb
foreman-tasks-8.3.0 db/migrate/20200611090846_add_task_lock_index_on_resource_type_and_task_id.rb