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: -
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_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: -
--
INSERT INTO schema_migrations (version) VALUES ('8');
INSERT INTO schema_migrations (version) VALUES ('9');
-