|
10 | 10 | # |
11 | 11 | # It's strongly recommended that you check this file into your version control system. |
12 | 12 |
|
13 | | -ActiveRecord::Schema[8.1].define(version: 2026_04_07_121005) do |
| 13 | +ActiveRecord::Schema[8.1].define(version: 2026_04_19_122121) 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" |
|
102 | 102 | t.index ["vaccine_id"], name: "index_batches_on_vaccine_id" |
103 | 103 | end |
104 | 104 |
|
105 | | - create_table "careplus_export_vaccination_records", primary_key: ["careplus_export_id", "vaccination_record_id"], force: :cascade do |t| |
106 | | - t.bigint "careplus_export_id", null: false |
| 105 | + create_table "careplus_report_vaccination_records", primary_key: ["careplus_report_id", "vaccination_record_id"], force: :cascade do |t| |
| 106 | + t.bigint "careplus_report_id", null: false |
107 | 107 | t.integer "change_type", null: false |
108 | 108 | t.datetime "created_at", null: false |
109 | 109 | t.datetime "updated_at", null: false |
110 | 110 | t.bigint "vaccination_record_id", null: false |
111 | | - t.index ["careplus_export_id"], name: "idx_on_careplus_export_id_8ce4ed1ff0" |
112 | | - t.index ["vaccination_record_id"], name: "idx_on_vaccination_record_id_d4c93aefb7" |
| 111 | + t.index ["careplus_report_id"], name: "idx_on_careplus_report_id_98876049c7" |
| 112 | + t.index ["vaccination_record_id"], name: "idx_on_vaccination_record_id_e7f05454ab" |
113 | 113 | end |
114 | 114 |
|
115 | | - create_table "careplus_exports", force: :cascade do |t| |
| 115 | + create_table "careplus_reports", force: :cascade do |t| |
116 | 116 | t.integer "academic_year", null: false |
117 | 117 | t.datetime "created_at", null: false |
118 | 118 | t.text "csv_data" |
|
126 | 126 | t.integer "status", default: 0, null: false |
127 | 127 | t.bigint "team_id", null: false |
128 | 128 | t.datetime "updated_at", null: false |
129 | | - t.index ["programme_types"], name: "index_careplus_exports_on_programme_types", using: :gin |
130 | | - t.index ["status", "scheduled_at"], name: "index_careplus_exports_on_status_and_scheduled_at" |
131 | | - t.index ["team_id", "academic_year"], name: "index_careplus_exports_on_team_id_and_academic_year" |
132 | | - t.index ["team_id"], name: "index_careplus_exports_on_team_id" |
| 129 | + t.index ["programme_types"], name: "index_careplus_reports_on_programme_types", using: :gin |
| 130 | + t.index ["status", "scheduled_at"], name: "index_careplus_reports_on_status_and_scheduled_at" |
| 131 | + t.index ["team_id", "academic_year"], name: "index_careplus_reports_on_team_id_and_academic_year" |
| 132 | + t.index ["team_id"], name: "index_careplus_reports_on_team_id" |
133 | 133 | end |
134 | 134 |
|
135 | 135 | create_table "class_imports", force: :cascade do |t| |
|
1087 | 1087 | add_foreign_key "attendance_records", "patients" |
1088 | 1088 | add_foreign_key "batches", "teams" |
1089 | 1089 | add_foreign_key "batches", "vaccines" |
1090 | | - add_foreign_key "careplus_export_vaccination_records", "careplus_exports", on_delete: :cascade |
1091 | | - add_foreign_key "careplus_export_vaccination_records", "vaccination_records" |
1092 | | - add_foreign_key "careplus_exports", "teams" |
| 1090 | + add_foreign_key "careplus_report_vaccination_records", "careplus_reports", on_delete: :cascade |
| 1091 | + add_foreign_key "careplus_report_vaccination_records", "vaccination_records" |
| 1092 | + add_foreign_key "careplus_reports", "teams" |
1093 | 1093 | add_foreign_key "class_imports", "locations" |
1094 | 1094 | add_foreign_key "class_imports", "teams" |
1095 | 1095 | add_foreign_key "class_imports", "users", column: "uploaded_by_user_id" |
|
0 commit comments