X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/f00b624ce465e21cec84c42b4950ca9602a96729..1041ead2538cc6cc69b91df1e650d4f32096ff09:/db/structure.sql

diff --git a/db/structure.sql b/db/structure.sql
index f20f1cafc..63af3304d 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -2,8 +2,8 @@
 -- PostgreSQL database dump
 --
 
--- Dumped from database version 9.5.3
--- Dumped by pg_dump version 9.5.3
+-- Dumped from database version 9.5.4
+-- Dumped by pg_dump version 9.5.4
 
 SET statement_timeout = 0;
 SET lock_timeout = 0;
@@ -550,6 +550,16 @@ CREATE SEQUENCE diary_entries_id_seq
 ALTER SEQUENCE diary_entries_id_seq OWNED BY diary_entries.id;
 
 
+--
+-- Name: diary_entry_subscriptions; Type: TABLE; Schema: public; Owner: -
+--
+
+CREATE TABLE diary_entry_subscriptions (
+    user_id bigint NOT NULL,
+    diary_entry_id bigint NOT NULL
+);
+
+
 --
 -- Name: friends; Type: TABLE; Schema: public; Owner: -
 --
@@ -1448,6 +1458,14 @@ ALTER TABLE ONLY diary_entries
     ADD CONSTRAINT diary_entries_pkey PRIMARY KEY (id);
 
 
+--
+-- Name: diary_entry_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY diary_entry_subscriptions
+    ADD CONSTRAINT diary_entry_subscriptions_pkey PRIMARY KEY (user_id, diary_entry_id);
+
+
 --
 -- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -
 --
@@ -1828,6 +1846,13 @@ CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_
 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
 
 
+--
+-- Name: index_diary_entry_subscriptions_on_diary_entry_id; Type: INDEX; Schema: public; Owner: -
+--
+
+CREATE INDEX index_diary_entry_subscriptions_on_diary_entry_id ON diary_entry_subscriptions USING btree (diary_entry_id);
+
+
 --
 -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -
 --
@@ -2212,6 +2237,22 @@ ALTER TABLE ONLY diary_entries
     ADD CONSTRAINT diary_entries_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
 
 
+--
+-- Name: diary_entry_subscriptions_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY diary_entry_subscriptions
+    ADD CONSTRAINT diary_entry_subscriptions_diary_entry_id_fkey FOREIGN KEY (diary_entry_id) REFERENCES diary_entries(id);
+
+
+--
+-- Name: diary_entry_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
+--
+
+ALTER TABLE ONLY diary_entry_subscriptions
+    ADD CONSTRAINT diary_entry_subscriptions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
+
+
 --
 -- Name: friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
 --
@@ -2534,8 +2575,6 @@ INSERT INTO schema_migrations (version) VALUES ('20121203124841');
 
 INSERT INTO schema_migrations (version) VALUES ('20130328184137');
 
-INSERT INTO schema_migrations (version) VALUES ('20131029121300');
-
 INSERT INTO schema_migrations (version) VALUES ('20131212124700');
 
 INSERT INTO schema_migrations (version) VALUES ('20140115192822');
@@ -2554,6 +2593,12 @@ INSERT INTO schema_migrations (version) VALUES ('20150111192335');
 
 INSERT INTO schema_migrations (version) VALUES ('20150222101847');
 
+INSERT INTO schema_migrations (version) VALUES ('20150818224516');
+
+INSERT INTO schema_migrations (version) VALUES ('20161002153425');
+
+INSERT INTO schema_migrations (version) VALUES ('20161011010929');
+
 INSERT INTO schema_migrations (version) VALUES ('21');
 
 INSERT INTO schema_migrations (version) VALUES ('22');
