 
 CREATE TABLE pd_regimes (
     id integer NOT NULL,
-    patient_id integer,
+    patient_id integer NOT NULL,
     start_date date NOT NULL,
     end_date date,
     treatment character varying NOT NULL,


CREATE TABLE pd_regime_bags (
    id integer NOT NULL,
    pd_regime_id integer,
    bag_type_id integer NOT NULL,
    volume integer NOT NULL,
    per_week integer,



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

ALTER TABLE ONLY drug_types_drugs
    ADD CONSTRAINT fk_rails_f8ed99dfda FOREIGN KEY (drug_id) REFERENCES drugs(id);


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

ALTER TABLE ONLY peritonitis_episodes
    ADD CONSTRAINT fk_rails_fdd6deae10 FOREIGN KEY (episode_type_id) REFERENCES episode_types(id);


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

ALTER TABLE ONLY modalities
    ADD CONSTRAINT fk_rails_fe4a4d8319 FOREIGN KEY (reason_id) REFERENCES modality_reasons(id);


--
-- PostgreSQL database dump complete
--

SET search_path TO "$user",public;

INSERT INTO schema_migrations (version) VALUES ('20141004150240');

INSERT INTO schema_migrations (version) VALUES ('20141020170329');

INSERT INTO schema_migrations (version) VALUES ('20141023111038');

INSERT INTO schema_migrations (version) VALUES ('20141024111715');

INSERT INTO schema_migrations (version) VALUES ('20141024111716');

INSERT INTO schema_migrations (version) VALUES ('20141107145549');

INSERT INTO schema_migrations (version) VALUES ('20141107145614');

INSERT INTO schema_migrations (version) VALUES ('20141107145615');

INSERT INTO schema_migrations (version) VALUES ('20141208160813');

INSERT INTO schema_migrations (version) VALUES ('20141222110119');

INSERT INTO schema_migrations (version) VALUES ('20141223135723');

INSERT INTO schema_migrations (version) VALUES ('20141223135724');

INSERT INTO schema_migrations (version) VALUES ('20150102095659');

INSERT INTO schema_migrations (version) VALUES ('20150109113417');

INSERT INTO schema_migrations (version) VALUES ('20150109152145');

INSERT INTO schema_migrations (version) VALUES ('20150119160039');

INSERT INTO schema_migrations (version) VALUES ('20150120155952');
