@@ -1959,6 +1959,23 @@ CREATE TABLE public.patient_phone_numbers (
19591959);
19601960
19611961
1962+ --
1963+ -- Name: patient_scores; Type: TABLE; Schema: public; Owner: -
1964+ --
1965+
1966+ CREATE TABLE public .patient_scores (
1967+ id uuid NOT NULL ,
1968+ patient_id uuid NOT NULL ,
1969+ score_type character varying (100 ) NOT NULL ,
1970+ score_value numeric (5 ,2 ) NOT NULL ,
1971+ device_created_at timestamp without time zone NOT NULL ,
1972+ device_updated_at timestamp without time zone NOT NULL ,
1973+ deleted_at timestamp without time zone ,
1974+ created_at timestamp (6 ) without time zone NOT NULL ,
1975+ updated_at timestamp (6 ) without time zone NOT NULL
1976+ );
1977+
1978+
19621979--
19631980-- Name: prescription_drugs; Type: TABLE; Schema: public; Owner: -
19641981--
@@ -6596,6 +6613,14 @@ ALTER TABLE ONLY public.patient_phone_numbers
65966613 ADD CONSTRAINT patient_phone_numbers_pkey PRIMARY KEY (id);
65976614
65986615
6616+ --
6617+ -- Name: patient_scores patient_scores_pkey; Type: CONSTRAINT; Schema: public; Owner: -
6618+ --
6619+
6620+ ALTER TABLE ONLY public .patient_scores
6621+ ADD CONSTRAINT patient_scores_pkey PRIMARY KEY (id);
6622+
6623+
65996624--
66006625-- Name: patients patients_pkey; Type: CONSTRAINT; Schema: public; Owner: -
66016626--
@@ -7699,6 +7724,20 @@ CREATE INDEX index_patient_phone_numbers_on_dnd_status ON public.patient_phone_n
76997724CREATE INDEX index_patient_phone_numbers_on_patient_id ON public .patient_phone_numbers USING btree (patient_id);
77007725
77017726
7727+ --
7728+ -- Name: index_patient_scores_on_patient_id_and_score_type; Type: INDEX; Schema: public; Owner: -
7729+ --
7730+
7731+ CREATE INDEX index_patient_scores_on_patient_id_and_score_type ON public .patient_scores USING btree (patient_id, score_type);
7732+
7733+
7734+ --
7735+ -- Name: index_patient_scores_on_updated_at; Type: INDEX; Schema: public; Owner: -
7736+ --
7737+
7738+ CREATE INDEX index_patient_scores_on_updated_at ON public .patient_scores USING btree (updated_at);
7739+
7740+
77027741--
77037742-- Name: index_patient_registrations_per_day_per_facilities; Type: INDEX; Schema: public; Owner: -
77047743--
@@ -8242,6 +8281,14 @@ ALTER TABLE ONLY public.patient_phone_numbers
82428281 ADD CONSTRAINT fk_rails_0145dd0b05 FOREIGN KEY (patient_id) REFERENCES public .patients (id);
82438282
82448283
8284+ --
8285+ -- Name: patient_scores fk_rails_0209112204; Type: FK CONSTRAINT; Schema: public; Owner: -
8286+ --
8287+
8288+ ALTER TABLE ONLY public .patient_scores
8289+ ADD CONSTRAINT fk_rails_0209112204 FOREIGN KEY (patient_id) REFERENCES public .patients (id);
8290+
8291+
82458292--
82468293-- Name: facility_groups fk_rails_0ba9e6af98; Type: FK CONSTRAINT; Schema: public; Owner: -
82478294--
@@ -8802,5 +8849,6 @@ INSERT INTO "schema_migrations" (version) VALUES
88028849(' 20251211154907' ),
88038850(' 20251215113615' ),
88048851(' 20251219061210' ),
8805- (' 20260128094448' );
8852+ (' 20260128094448' ),
8853+ (' 20260209112204' );
88068854
0 commit comments