Sha256: 72c5445408d788c6f2d5739ff23283e629e2b30cc6245bd04c63ed7676e1090a

Contents?: true

Size: 374 Bytes

Versions: 73

Compression:

Stored size: 374 Bytes

Contents

class AddUniqueIndexesToLocalPatientIds < ActiveRecord::Migration[5.1]
  def change
    columns = %i(
      local_patient_id
      local_patient_id_2
      local_patient_id_3
      local_patient_id_4
      local_patient_id_5
    )
    columns.each{ |column| remove_index(:patients, column) }
    columns.each{ |column| add_index(:patients, column, unique: true) }
  end
end

Version data entries

73 entries across 73 versions & 1 rubygems

Version Path
renalware-core-2.0.0.pre.rc11 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc10 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc9 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc8 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc7 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc6 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc5 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc4 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc3 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.rc1 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.beta12 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.beta11 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb
renalware-core-2.0.0.pre.beta10 db/migrate/20171017132738_add_unique_indexes_to_local_patient_ids.rb