This commit is contained in:
r888888888
2014-08-07 17:43:28 -07:00
parent 424eb40c9d
commit 2b96040a30
12 changed files with 210 additions and 1 deletions

View File

@@ -2012,6 +2012,38 @@ CREATE SEQUENCE forum_posts_id_seq
ALTER SEQUENCE forum_posts_id_seq OWNED BY forum_posts.id;
--
-- Name: forum_subscriptions; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE forum_subscriptions (
id integer NOT NULL,
user_id integer,
forum_topic_id integer,
last_read_at timestamp without time zone,
delete_key character varying(255)
);
--
-- Name: forum_subscriptions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE forum_subscriptions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_subscriptions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE forum_subscriptions_id_seq OWNED BY forum_subscriptions.id;
--
-- Name: forum_topic_visits; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
@@ -3954,6 +3986,13 @@ ALTER TABLE ONLY favorites_99 ALTER COLUMN id SET DEFAULT nextval('favorites_id_
ALTER TABLE ONLY forum_posts ALTER COLUMN id SET DEFAULT nextval('forum_posts_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
ALTER TABLE ONLY forum_subscriptions ALTER COLUMN id SET DEFAULT nextval('forum_subscriptions_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -4300,6 +4339,14 @@ ALTER TABLE ONLY forum_posts
ADD CONSTRAINT forum_posts_pkey PRIMARY KEY (id);
--
-- Name: forum_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY forum_subscriptions
ADD CONSTRAINT forum_subscriptions_pkey PRIMARY KEY (id);
--
-- Name: forum_topic_visits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
@@ -6185,6 +6232,20 @@ CREATE INDEX index_forum_posts_on_text_index ON forum_posts USING gin (text_inde
CREATE INDEX index_forum_posts_on_topic_id ON forum_posts USING btree (topic_id);
--
-- Name: index_forum_subscriptions_on_forum_topic_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_forum_subscriptions_on_forum_topic_id ON forum_subscriptions USING btree (forum_topic_id);
--
-- Name: index_forum_subscriptions_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_forum_subscriptions_on_user_id ON forum_subscriptions USING btree (user_id);
--
-- Name: index_forum_topic_visits_on_forum_topic_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -6192,6 +6253,13 @@ CREATE INDEX index_forum_posts_on_topic_id ON forum_posts USING btree (topic_id)
CREATE INDEX index_forum_topic_visits_on_forum_topic_id ON forum_topic_visits USING btree (forum_topic_id);
--
-- Name: index_forum_topic_visits_on_last_read_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_forum_topic_visits_on_last_read_at ON forum_topic_visits USING btree (last_read_at);
--
-- Name: index_forum_topic_visits_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -6992,3 +7060,5 @@ INSERT INTO schema_migrations (version) VALUES ('20140701224800');
INSERT INTO schema_migrations (version) VALUES ('20140722225753');
INSERT INTO schema_migrations (version) VALUES ('20140725003232');