Sha256: 80985ceb61ded312caa59c9b92eaebc6f3319478198d8f02b1981a2664584569

Contents?: true

Size: 337 Bytes

Versions: 3

Compression:

Stored size: 337 Bytes

Contents

class AddCloseEcountersIndexes < ActiveRecord::Migration[7.1]
  disable_ddl_transaction!

  def change
    options = if self.class.adapter_name.match?(/postgres/i)
      {algorithm: :concurrently}
    else
      {}
    end

    add_index :close_encounters_participant_services,
      :name,
      unique: true,
      **options
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
close_encounters-0.1.3 db/migrate/20240508190642_add_close_ecounters_indexes.rb
close_encounters-0.1.2 db/migrate/20240508190642_add_close_ecounters_indexes.rb
close_encounters-0.1.1 db/migrate/20240508190642_add_close_ecounters_indexes.rb