This commit is contained in:
r888888888
2014-07-08 10:20:01 -07:00
parent 3cac0458df
commit a6d69e63be
6 changed files with 114 additions and 10 deletions

View File

@@ -3,6 +3,7 @@
--
SET statement_timeout = 0;
SET lock_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
@@ -1979,6 +1980,39 @@ CREATE SEQUENCE forum_posts_id_seq
ALTER SEQUENCE forum_posts_id_seq OWNED BY forum_posts.id;
--
-- Name: forum_topic_visits; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
CREATE TABLE forum_topic_visits (
id integer NOT NULL,
user_id integer,
forum_topic_id integer,
last_read_at timestamp without time zone,
created_at timestamp without time zone,
updated_at timestamp without time zone
);
--
-- Name: forum_topic_visits_id_seq; Type: SEQUENCE; Schema: public; Owner: -
--
CREATE SEQUENCE forum_topic_visits_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
--
-- Name: forum_topic_visits_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
--
ALTER SEQUENCE forum_topic_visits_id_seq OWNED BY forum_topic_visits.id;
--
-- Name: forum_topics; Type: TABLE; Schema: public; Owner: -; Tablespace:
--
@@ -3881,6 +3915,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_topic_visits ALTER COLUMN id SET DEFAULT nextval('forum_topic_visits_id_seq'::regclass);
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: -
--
@@ -4212,6 +4253,14 @@ ALTER TABLE ONLY forum_posts
ADD CONSTRAINT forum_posts_pkey PRIMARY KEY (id);
--
-- Name: forum_topic_visits_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
ALTER TABLE ONLY forum_topic_visits
ADD CONSTRAINT forum_topic_visits_pkey PRIMARY KEY (id);
--
-- Name: forum_topics_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
--
@@ -6075,6 +6124,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_topic_visits_on_forum_topic_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
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_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
CREATE INDEX index_forum_topic_visits_on_user_id ON forum_topic_visits USING btree (user_id);
--
-- Name: index_forum_topics_on_creator_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
--
@@ -6864,3 +6927,5 @@ INSERT INTO schema_migrations (version) VALUES ('20140604002414');
INSERT INTO schema_migrations (version) VALUES ('20140613004559');
INSERT INTO schema_migrations (version) VALUES ('20140701224800');