class AddCountryToFamilyMedicalRevisions < ActiveRecord::Migration[6.0]
  def change
    add_reference :admission_medical_revisions, :physician_country, after: :physician_zip,
      null: true, foreign_key: { to_table: :iso_countries }, on_delete: :nullify
    add_reference :admission_medical_revisions, :dentist_country, after: :dentist_zip, null: true,
      foreign_key: { to_table: :iso_countries }, on_delete: :nullify

    add_reference :FamilyMed, :physician_country, after: :PhysicianZip,
      null: true, foreign_key: { to_table: :iso_countries }, on_delete: :nullify
    add_reference :FamilyMed, :dentist_country, after: :DentistZip, null: true,
      foreign_key: { to_table: :iso_countries }, on_delete: :nullify
  end
end
