Add registrar and registrant foreign key constraints to domains

#480
This commit is contained in:
Artur Beljajev 2017-06-06 17:17:16 +03:00
parent 8fa462dd43
commit b20e31f3c8
2 changed files with 24 additions and 0 deletions

View file

@ -4646,6 +4646,22 @@ CREATE UNIQUE INDEX unique_data_migrations ON data_migrations USING btree (versi
CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
--
-- Name: domains_registrant_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY domains
ADD CONSTRAINT domains_registrant_id_fk FOREIGN KEY (registrant_id) REFERENCES contacts(id);
--
-- Name: domains_registrar_id_fk; Type: FK CONSTRAINT; Schema: public; Owner: -
--
ALTER TABLE ONLY domains
ADD CONSTRAINT domains_registrar_id_fk FOREIGN KEY (registrar_id) REFERENCES registrars(id);
--
-- Name: fk_rails_78c376257f; Type: FK CONSTRAINT; Schema: public; Owner: -
--
@ -5136,3 +5152,5 @@ INSERT INTO schema_migrations (version) VALUES ('20170424115801');
INSERT INTO schema_migrations (version) VALUES ('20170509215614');
INSERT INTO schema_migrations (version) VALUES ('20170606133501');