Sha256: 196914dd7554d6dff784a2d53c4051d6abd398b7f302f5ba673a658a6eac0d59

Contents?: true

Size: 657 Bytes

Versions: 36

Compression:

Stored size: 657 Bytes

Contents

class CreatePatientsMasterIndex < ActiveRecord::Migration[5.2]
  def change
    create_table :patient_master_index do |t|
      t.references :patient, null: true, foreign_key: true
      t.string :nhs_number, index: true
      t.string :hospital_number, index: true
      t.string :title
      t.string :family_name
      t.string :middle_name
      t.string :given_name
      t.string :suffix
      t.string :sex
      t.date :born_on
      t.datetime :died_at
      t.string :ethnicity
      t.string :practice_code
      t.string :gp_code
      t.timestamps null: false
    end

    add_index :patient_master_index, [:family_name, :given_name]
  end
end

Version data entries

36 entries across 36 versions & 1 rubygems

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