 
 CREATE TABLE infection_organisms (
     id integer NOT NULL,
-    organism_code_id integer,
+    organism_code_id integer NOT NULL,
     sensitivity text,
     infectable_id integer,
     infectable_type character varying,



--
-- Name: fk_rails_f1ec17170e; Type: FK CONSTRAINT; Schema: public; Owner: -
--




--
-- Name: fk_rails_a70920e237; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY pd_regimes
    ADD CONSTRAINT fk_rails_a70920e237 FOREIGN KEY (patient_id) REFERENCES patients(id);


--
-- Name: fk_rails_abf7d47e4f; Type: FK CONSTRAINT; Schema: public; Owner: -
--

ALTER TABLE ONLY infection_organisms
    ADD CONSTRAINT fk_rails_abf7d47e4f FOREIGN KEY (organism_code_id) REFERENCES organism_codes(id);


--
-- Name: fk_rails_b298a0b037; Type: FK CONSTRAINT; Schema: public; Owner: -
--

