|
10 | 10 | #
|
11 | 11 | # It's strongly recommended that you check this file into your version control system.
|
12 | 12 |
|
13 |
| -ActiveRecord::Schema[8.0].define(version: 2025_06_26_162928) do |
| 13 | +ActiveRecord::Schema[8.0].define(version: 2025_06_27_081633) do |
14 | 14 | # These are extensions that must be enabled in order to support this database
|
15 | 15 | enable_extension "pg_catalog.plpgsql"
|
16 | 16 | enable_extension "pg_trgm"
|
|
659 | 659 | t.index ["type"], name: "index_programmes_on_type", unique: true
|
660 | 660 | end
|
661 | 661 |
|
| 662 | + create_table "reportable_consent_events", force: :cascade do |t| |
| 663 | + t.string "event_type" |
| 664 | + t.datetime "event_timestamp" |
| 665 | + t.integer "event_timestamp_year" |
| 666 | + t.integer "event_timestamp_month" |
| 667 | + t.integer "event_timestamp_day" |
| 668 | + t.integer "event_timestamp_academic_year" |
| 669 | + t.string "source_type" |
| 670 | + t.bigint "source_id" |
| 671 | + t.bigint "patient_id" |
| 672 | + t.date "patient_date_of_birth" |
| 673 | + t.string "patient_nhs_number" |
| 674 | + t.string "patient_address_town" |
| 675 | + t.string "patient_address_postcode" |
| 676 | + t.string "patient_gender_code" |
| 677 | + t.boolean "patient_home_educated" |
| 678 | + t.date "patient_date_of_death" |
| 679 | + t.integer "patient_birth_academic_year" |
| 680 | + t.integer "patient_year_group" |
| 681 | + t.integer "consent_response" |
| 682 | + t.integer "consent_reason_for_refusal" |
| 683 | + t.text "consent_notes" |
| 684 | + t.integer "consent_route" |
| 685 | + t.jsonb "consent_health_answers" |
| 686 | + t.bigint "consent_recorded_by_user_id" |
| 687 | + t.bigint "consent_parent_id" |
| 688 | + t.bigint "consent_organisation_id" |
| 689 | + t.datetime "consent_withdrawn_at" |
| 690 | + t.datetime "consent_invalidated_at" |
| 691 | + t.boolean "consent_notify_parents" |
| 692 | + t.datetime "consent_submitted_at" |
| 693 | + t.integer "consent_vaccine_methods", array: true |
| 694 | + t.string "parent_full_name" |
| 695 | + t.string "parent_email" |
| 696 | + t.string "parent_phone" |
| 697 | + t.text "parent_contact_method_other_details" |
| 698 | + t.datetime "parent_created_at" |
| 699 | + t.datetime "parent_updated_at" |
| 700 | + t.string "parent_contact_method_type" |
| 701 | + t.boolean "parent_phone_receive_updates" |
| 702 | + t.string "parent_relationship_type" |
| 703 | + t.string "parent_relationship_other_name" |
| 704 | + t.string "consent_recorded_by_user_email" |
| 705 | + t.string "consent_recorded_by_user_given_name" |
| 706 | + t.string "consent_recorded_by_user_family_name" |
| 707 | + t.bigint "vaccine_id" |
| 708 | + t.text "vaccine_brand" |
| 709 | + t.integer "vaccine_method" |
| 710 | + t.text "vaccine_manufacturer" |
| 711 | + t.decimal "vaccine_dose_volume_ml" |
| 712 | + t.string "vaccine_snomed_product_code" |
| 713 | + t.string "vaccine_snomed_product_term" |
| 714 | + t.text "vaccine_nivs_name" |
| 715 | + t.boolean "vaccine_discontinued" |
| 716 | + t.bigint "vaccine_programme_id" |
| 717 | + t.boolean "vaccine_full_dose" |
| 718 | + t.bigint "programme_id" |
| 719 | + t.string "programme_type" |
| 720 | + t.datetime "created_at", null: false |
| 721 | + t.datetime "updated_at", null: false |
| 722 | + t.index ["source_type", "source_id"], name: "index_reportable_consent_events_on_source" |
| 723 | + end |
| 724 | + |
662 | 725 | create_table "reportable_vaccination_events", force: :cascade do |t|
|
663 | 726 | t.string "event_type"
|
664 | 727 | t.datetime "event_timestamp"
|
665 | 728 | t.integer "event_timestamp_year"
|
666 | 729 | t.integer "event_timestamp_month"
|
667 | 730 | t.integer "event_timestamp_day"
|
| 731 | + t.integer "event_timestamp_academic_year" |
668 | 732 | t.string "source_type"
|
669 | 733 | t.bigint "source_id"
|
670 | 734 | t.bigint "patient_id"
|
|
0 commit comments