Sha256: 58389e14c9b2e4e98d309286090dc7f752849db3d7be43d972633eb4f828c2cc
Contents?: true
Size: 619 Bytes
Versions: 22
Compression:
Stored size: 619 Bytes
Contents
# frozen_string_literal: true class RemoveGoodJobActiveIdIndex < ActiveRecord::Migration<%= migration_version %> disable_ddl_transaction! def change reversible do |dir| dir.up do if connection.index_name_exists?(:good_jobs, :index_good_jobs_on_active_job_id) remove_index :good_jobs, name: :index_good_jobs_on_active_job_id end end dir.down do unless connection.index_name_exists?(:good_jobs, :index_good_jobs_on_active_job_id) add_index :good_jobs, :active_job_id, name: :index_good_jobs_on_active_job_id end end end end end
Version data entries
22 entries across 22 versions & 1 rubygems