Update structure.sql
authorMikel Maron <mikel_maron@yahoo.com>
Wed, 12 Oct 2016 01:22:00 +0000 (21:22 -0400)
committerGitHub <noreply@github.com>
Wed, 12 Oct 2016 01:22:00 +0000 (21:22 -0400)
db/structure.sql

index a3e80ba..5e9b741 100644 (file)
@@ -1456,6 +1456,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: -
 --
@@ -1841,14 +1849,6 @@ CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USIN
 
 CREATE INDEX index_diary_entry_subscriptions_on_diary_entry_id ON diary_entry_subscriptions USING btree (diary_entry_id);
 
-
---
--- Name: index_diary_subscriptions_on_user_id_and_diary_entry_id; Type: INDEX; Schema: public; Owner: -
---
-
-CREATE UNIQUE INDEX index_diary_subscriptions_on_user_id_and_diary_entry_id ON diary_entry_subscriptions USING btree (user_id, diary_entry_id);
-
-
 --
 -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -
 --
@@ -2233,6 +2233,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: -
 --