@@ -2709,6 +2709,23 @@ CREATE TABLE public.patient_phone_numbers (
27092709);
27102710
27112711
2712+ --
2713+ -- Name: patient_scores; Type: TABLE; Schema: public; Owner: -
2714+ --
2715+
2716+ CREATE TABLE public .patient_scores (
2717+ id uuid NOT NULL ,
2718+ patient_id uuid NOT NULL ,
2719+ score_type character varying (100 ) NOT NULL ,
2720+ score_value numeric (5 ,2 ) NOT NULL ,
2721+ device_created_at timestamp without time zone NOT NULL ,
2722+ device_updated_at timestamp without time zone NOT NULL ,
2723+ deleted_at timestamp without time zone ,
2724+ created_at timestamp (6 ) without time zone NOT NULL ,
2725+ updated_at timestamp (6 ) without time zone NOT NULL
2726+ );
2727+
2728+
27122729--
27132730-- Name: prescription_drugs; Type: TABLE; Schema: public; Owner: -
27142731--
@@ -7424,6 +7441,14 @@ ALTER TABLE ONLY public.patient_phone_numbers
74247441 ADD CONSTRAINT patient_phone_numbers_pkey PRIMARY KEY (id);
74257442
74267443
7444+ --
7445+ -- Name: patient_scores patient_scores_pkey; Type: CONSTRAINT; Schema: public; Owner: -
7446+ --
7447+
7448+ ALTER TABLE ONLY public .patient_scores
7449+ ADD CONSTRAINT patient_scores_pkey PRIMARY KEY (id);
7450+
7451+
74277452--
74287453-- Name: patients patients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
74297454--
@@ -8527,6 +8552,20 @@ CREATE INDEX index_patient_phone_numbers_on_dnd_status ON public.patient_phone_n
85278552CREATE INDEX index_patient_phone_numbers_on_patient_id ON public .patient_phone_numbers USING btree (patient_id);
85288553
85298554
8555+ --
8556+ -- Name: index_patient_scores_on_patient_id_and_score_type; Type: INDEX; Schema: public; Owner: -
8557+ --
8558+
8559+ CREATE INDEX index_patient_scores_on_patient_id_and_score_type ON public .patient_scores USING btree (patient_id, score_type);
8560+
8561+
8562+ --
8563+ -- Name: index_patient_scores_on_updated_at; Type: INDEX; Schema: public; Owner: -
8564+ --
8565+
8566+ CREATE INDEX index_patient_scores_on_updated_at ON public .patient_scores USING btree (updated_at);
8567+
8568+
85308569--
85318570-- Name: index_patient_registrations_per_day_per_facilities; Type: INDEX; Schema: public; Owner: -
85328571--
@@ -9165,6 +9204,14 @@ ALTER TABLE ONLY public.patient_phone_numbers
91659204 ADD CONSTRAINT fk_rails_0145dd0b05 FOREIGN KEY (patient_id) REFERENCES public .patients (id);
91669205
91679206
9207+ --
9208+ -- Name: patient_scores fk_rails_0209112204; Type: FK CONSTRAINT; Schema: public; Owner: -
9209+ --
9210+
9211+ ALTER TABLE ONLY public .patient_scores
9212+ ADD CONSTRAINT fk_rails_0209112204 FOREIGN KEY (patient_id) REFERENCES public .patients (id);
9213+
9214+
91689215--
91699216-- Name: facility_groups fk_rails_0ba9e6af98; Type: FK CONSTRAINT; Schema: public; Owner: -
91709217--
@@ -9713,6 +9760,7 @@ INSERT INTO "schema_migrations" (version) VALUES
97139760(' 20260127150000' ),
97149761(' 20260128094448' ),
97159762(' 20260205110957' ),
9763+ (' 20260209112204' ),
97169764(' 20260212195326' ),
97179765(' 20260224063659' ),
97189766(' 20260316093605' ),
0 commit comments