|
387 | 387 | t.index ["immunisation_import_id", "vaccination_record_id"], name: "idx_on_immunisation_import_id_vaccination_record_id_588e859772", unique: true |
388 | 388 | end |
389 | 389 |
|
| 390 | + create_table "important_notices", force: :cascade do |t| |
| 391 | + t.datetime "created_at", null: false |
| 392 | + t.datetime "dismissed_at" |
| 393 | + t.bigint "dismissed_by_user_id" |
| 394 | + t.bigint "patient_id", null: false |
| 395 | + t.datetime "recorded_at", null: false |
| 396 | + t.bigint "team_id", null: false |
| 397 | + t.integer "type", null: false |
| 398 | + t.datetime "updated_at", null: false |
| 399 | + t.bigint "vaccination_record_id" |
| 400 | + t.index ["dismissed_by_user_id"], name: "index_important_notices_on_dismissed_by_user_id" |
| 401 | + t.index ["patient_id", "type", "recorded_at", "team_id"], name: "index_notices_on_patient_and_type_and_recorded_at_and_team", unique: true |
| 402 | + t.index ["patient_id"], name: "index_important_notices_on_patient_id" |
| 403 | + t.index ["team_id"], name: "index_important_notices_on_team_id" |
| 404 | + t.index ["vaccination_record_id"], name: "index_important_notices_on_vaccination_record_id" |
| 405 | + end |
| 406 | + |
390 | 407 | create_table "local_authorities", id: false, force: :cascade do |t| |
391 | 408 | t.datetime "created_at", null: false |
392 | 409 | t.date "end_date" |
|
1013 | 1030 | add_foreign_key "immunisation_imports_sessions", "sessions", on_delete: :cascade |
1014 | 1031 | add_foreign_key "immunisation_imports_vaccination_records", "immunisation_imports", on_delete: :cascade |
1015 | 1032 | add_foreign_key "immunisation_imports_vaccination_records", "vaccination_records", on_delete: :cascade |
| 1033 | + add_foreign_key "important_notices", "patients" |
| 1034 | + add_foreign_key "important_notices", "teams" |
| 1035 | + add_foreign_key "important_notices", "users", column: "dismissed_by_user_id" |
| 1036 | + add_foreign_key "important_notices", "vaccination_records" |
1016 | 1037 | add_foreign_key "location_programme_year_groups", "location_year_groups", on_delete: :cascade |
1017 | 1038 | add_foreign_key "location_programme_year_groups", "programmes", on_delete: :cascade |
1018 | 1039 | add_foreign_key "location_year_groups", "locations", on_delete: :cascade |
|
0 commit comments