Sha256: 7eed64b89c830a40a2d7df8fe256e562be0038099f54deaa1f122d39e493abe6
Contents?: true
Size: 676 Bytes
Versions: 21
Compression:
Stored size: 676 Bytes
Contents
# frozen_string_literal: true class CreateIndexGoodJobJobsForCandidateLookup < ActiveRecord::Migration<%= migration_version %> disable_ddl_transaction! def change reversible do |dir| dir.up do # Ensure this incremental update migration is idempotent # with monolithic install migration. return if connection.index_name_exists?(:good_jobs, :index_good_job_jobs_for_candidate_lookup) end end add_index :good_jobs, [:priority, :created_at], order: { priority: "ASC NULLS LAST", created_at: :asc }, where: "finished_at IS NULL", name: :index_good_job_jobs_for_candidate_lookup, algorithm: :concurrently end end
Version data entries
21 entries across 21 versions & 1 rubygems