diff --git a/db/migrate/20180206234620_extract_user_id_from_epp_sessions_data.rb b/db/migrate/20180206234620_extract_user_id_from_epp_sessions_data.rb new file mode 100644 index 000000000..5fd686168 --- /dev/null +++ b/db/migrate/20180206234620_extract_user_id_from_epp_sessions_data.rb @@ -0,0 +1,5 @@ +class ExtractUserIdFromEppSessionsData < ActiveRecord::Migration + def change + add_reference :epp_sessions, :user, foreign_key: true + end +end diff --git a/db/structure.sql b/db/structure.sql index bf3230c57..b925a2a1b 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -1054,7 +1054,8 @@ CREATE TABLE epp_sessions ( data text, created_at timestamp without time zone, updated_at timestamp without time zone, - registrar_id integer + registrar_id integer, + user_id integer ); @@ -4484,6 +4485,14 @@ ALTER TABLE ONLY domain_transfers ADD CONSTRAINT fk_rails_87b8e40c63 FOREIGN KEY (domain_id) REFERENCES domains(id); +-- +-- Name: fk_rails_adff2dc8e3; Type: FK CONSTRAINT; Schema: public; Owner: - +-- + +ALTER TABLE ONLY epp_sessions + ADD CONSTRAINT fk_rails_adff2dc8e3 FOREIGN KEY (user_id) REFERENCES users(id); + + -- -- Name: fk_rails_b80dbb973d; Type: FK CONSTRAINT; Schema: public; Owner: - -- @@ -5072,3 +5081,5 @@ INSERT INTO schema_migrations (version) VALUES ('20180126104903'); INSERT INTO schema_migrations (version) VALUES ('20180206213435'); +INSERT INTO schema_migrations (version) VALUES ('20180206234620'); +