-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathdb-schema.psql
131 lines (87 loc) · 2.85 KB
/
db-schema.psql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
--
-- PostgreSQL database dump
--
SET statement_timeout = 0;
SET client_encoding = 'SQL_ASCII';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
--
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- Name: posts; Type: TABLE; Schema: public; Owner: ed_devtracker_crawl; Tablespace:
--
CREATE TABLE posts (
id integer NOT NULL,
datestamp timestamp without time zone,
url character varying(128),
urltext character varying(128),
threadurl character varying(128),
threadtitle text,
forum character varying(64),
whoid integer,
who character varying(25),
whourl character varying(128),
precis text,
precis_ts_indexed tsvector
);
ALTER TABLE public.posts OWNER TO ed_devtracker_crawl;
--
-- Name: posts_id; Type: SEQUENCE; Schema: public; Owner: ed_devtracker_crawl
--
CREATE SEQUENCE posts_id
START WITH 0
INCREMENT BY 1
MINVALUE 0
NO MAXVALUE
CACHE 1;
ALTER TABLE public.posts_id OWNER TO ed_devtracker_crawl;
--
-- Name: posts_id; Type: SEQUENCE OWNED BY; Schema: public; Owner: ed_devtracker_crawl
--
ALTER SEQUENCE posts_id OWNED BY posts.id;
--
-- Name: id; Type: DEFAULT; Schema: public; Owner: ed_devtracker_crawl
--
ALTER TABLE ONLY posts ALTER COLUMN id SET DEFAULT nextval('posts_id'::regclass);
--
-- Name: posts_pkey; Type: CONSTRAINT; Schema: public; Owner: ed_devtracker_crawl; Tablespace:
--
ALTER TABLE ONLY posts
ADD CONSTRAINT posts_pkey PRIMARY KEY (id);
--
-- Name: posts_url_key; Type: CONSTRAINT; Schema: public; Owner: ed_devtracker_crawl; Tablespace:
--
ALTER TABLE ONLY posts
ADD CONSTRAINT posts_url_key UNIQUE (url);
--
-- Name: posts_datestamp_index; Type: INDEX; Schema: public; Owner: ed_devtracker_crawl; Tablespace:
--
CREATE INDEX posts_datestamp_index ON posts USING btree (datestamp);
--
-- Name: posts_precis_index; Type: INDEX; Schema: public; Owner: ed_devtracker_crawl; Tablespace:
--
CREATE INDEX posts_precis_index ON posts USING gin (precis_ts_indexed);
--
-- Name: ts_precis_vectorupdate; Type: TRIGGER; Schema: public; Owner: ed_devtracker_crawl
--
CREATE TRIGGER ts_precis_vectorupdate BEFORE INSERT OR UPDATE ON posts FOR EACH ROW EXECUTE PROCEDURE tsvector_update_trigger('precis_ts_indexed', 'pg_catalog.english', 'precis');
--
-- Name: public; Type: ACL; Schema: -; Owner: postgres
--
REVOKE ALL ON SCHEMA public FROM PUBLIC;
REVOKE ALL ON SCHEMA public FROM postgres;
GRANT ALL ON SCHEMA public TO postgres;
GRANT ALL ON SCHEMA public TO PUBLIC;
--
-- PostgreSQL database dump complete
--