|
686 | 686 | t.index ["status"], name: "index_patient_triage_statuses_on_status" |
687 | 687 | end |
688 | 688 |
|
689 | | - create_table "patient_vaccination_statuses", force: :cascade do |t| |
690 | | - t.integer "academic_year", null: false |
691 | | - t.integer "dose_sequence" |
692 | | - t.date "latest_date" |
693 | | - t.bigint "latest_location_id" |
694 | | - t.integer "latest_session_status" |
695 | | - t.bigint "patient_id", null: false |
696 | | - t.enum "programme_type", null: false, enum_type: "programme_type" |
697 | | - t.integer "status", default: 0, null: false |
698 | | - t.index ["academic_year", "patient_id"], name: "idx_on_academic_year_patient_id_9c400fc863" |
699 | | - t.index ["latest_location_id"], name: "index_patient_vaccination_statuses_on_latest_location_id" |
700 | | - t.index ["patient_id", "programme_type", "academic_year"], name: "idx_on_patient_id_programme_type_academic_year_962639d2ac", unique: true |
701 | | - t.index ["status"], name: "index_patient_vaccination_statuses_on_status" |
702 | | - end |
703 | | - |
704 | 689 | create_table "patients", force: :cascade do |t| |
705 | 690 | t.string "address_line_1" |
706 | 691 | t.string "address_line_2" |
|
1115 | 1100 | add_foreign_key "patient_teams", "patients", on_delete: :cascade |
1116 | 1101 | add_foreign_key "patient_teams", "teams", on_delete: :cascade |
1117 | 1102 | add_foreign_key "patient_triage_statuses", "patients", on_delete: :cascade |
1118 | | - add_foreign_key "patient_vaccination_statuses", "locations", column: "latest_location_id" |
1119 | | - add_foreign_key "patient_vaccination_statuses", "patients", on_delete: :cascade |
1120 | 1103 | add_foreign_key "patients", "locations", column: "gp_practice_id" |
1121 | 1104 | add_foreign_key "patients", "locations", column: "school_id" |
1122 | 1105 | add_foreign_key "pds_search_results", "patients" |
|
0 commit comments