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: -
--
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: -
--
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: -
--