Sha256: 364273f08403f922975fa8b0576e32b0976742816d30df383d91dfcc6d8b3fa9

Contents?: true

Size: 520 Bytes

Versions: 70

Compression:

Stored size: 520 Bytes

Contents

class ChangeTypeOfPatientsUKRDCExternalId < ActiveRecord::Migration[5.2]
  def change
    within_renalware_schema do
      reversible do |dir|
        dir.up do
          change_column :patients, :ukrdc_external_id, :text, null: true
        end
        dir.down do
          change_column :patients, :ukrdc_external_id, "uuid USING UUID(ukrdc_external_id)", null: true
        end
      end

      remove_index :patients, :ukrdc_external_id
      add_index :patients, :ukrdc_external_id, unique: true
    end
  end
end

Version data entries

70 entries across 70 versions & 1 rubygems

Version Path
renalware-core-2.1.1 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.1.0 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.167 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.166 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.165 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.164 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.163 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.162 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.161 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.160 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.159 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.158 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.157 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.156 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.155 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.153 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.152 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.151 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.149 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb
renalware-core-2.0.148 db/migrate/20190722145936_change_type_of_patients_ukrdc_external_id.rb