Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100755 253 lines (192 sloc) 6.484 kB
f5dc2a4 more changes to reflect postgres support
svncommit authored
1 --
2 -- PostgreSQL database dump
3 --
4
5 SET client_encoding = 'UNICODE';
6 SET check_function_bodies = false;
7 SET search_path = public, pg_catalog;
8
9 ALTER TABLE ONLY public.identities DROP CONSTRAINT "$1";
10 ALTER TABLE ONLY public.contacts DROP CONSTRAINT "$1";
11 ALTER TABLE ONLY public."cache" DROP CONSTRAINT "$2";
12 ALTER TABLE ONLY public."cache" DROP CONSTRAINT "$1";
13 ALTER TABLE ONLY public.users DROP CONSTRAINT users_pkey;
14 ALTER TABLE ONLY public."session" DROP CONSTRAINT session_pkey;
15 ALTER TABLE ONLY public.identities DROP CONSTRAINT identities_pkey;
16 ALTER TABLE ONLY public.contacts DROP CONSTRAINT contacts_pkey;
17 ALTER TABLE ONLY public."cache" DROP CONSTRAINT cache_pkey;
18 DROP TABLE public.users;
19 DROP TABLE public."session";
20 DROP TABLE public.identities;
21 DROP TABLE public.contacts;
22 DROP TABLE public."cache";
23 DROP SEQUENCE public.user_ids;
24 DROP SEQUENCE public.identity_ids;
25 DROP SEQUENCE public.contact_ids;
26 DROP SEQUENCE public.cache_ids;
27 --
28 -- TOC entry 4 (OID 15282470)
29 -- Name: cache_ids; Type: SEQUENCE; Schema: public; Owner: postgres
30 --
31
32 CREATE SEQUENCE cache_ids
33 INCREMENT BY 1
34 NO MAXVALUE
35 NO MINVALUE
36 CACHE 1;
37
38
39 --
40 -- TOC entry 5 (OID 15282472)
41 -- Name: contact_ids; Type: SEQUENCE; Schema: public; Owner: postgres
42 --
43
44 CREATE SEQUENCE contact_ids
45 START WITH 1
46 INCREMENT BY 1
47 NO MAXVALUE
48 NO MINVALUE
49 CACHE 1;
50
51
52 --
53 -- TOC entry 6 (OID 15282474)
54 -- Name: identity_ids; Type: SEQUENCE; Schema: public; Owner: postgres
55 --
56
57 CREATE SEQUENCE identity_ids
58 START WITH 1
59 INCREMENT BY 1
60 NO MAXVALUE
61 NO MINVALUE
62 CACHE 1;
63
64
65 --
66 -- TOC entry 7 (OID 15282476)
67 -- Name: user_ids; Type: SEQUENCE; Schema: public; Owner: postgres
68 --
69
70 CREATE SEQUENCE user_ids
71 INCREMENT BY 1
72 NO MAXVALUE
73 NO MINVALUE
74 CACHE 1;
75
76
77 --
78 -- TOC entry 8 (OID 15282478)
79 -- Name: cache; Type: TABLE; Schema: public; Owner: postgres
80 --
81
82 CREATE TABLE "cache" (
83 cache_id integer DEFAULT nextval('cache_ids'::text) NOT NULL,
84 user_id integer DEFAULT 0 NOT NULL,
85 session_id character varying(32),
86 cache_key character varying(128) DEFAULT ''::character varying NOT NULL,
87 created timestamp with time zone DEFAULT now() NOT NULL,
88 data text NOT NULL
89 );
90
91
92 --
93 -- TOC entry 10 (OID 15282486)
94 -- Name: contacts; Type: TABLE; Schema: public; Owner: postgres
95 --
96
97 CREATE TABLE contacts (
98 contact_id integer DEFAULT nextval('contact_ids'::text) NOT NULL,
99 user_id integer DEFAULT 0 NOT NULL,
100 del boolean DEFAULT false NOT NULL,
101 name character varying(128) DEFAULT ''::character varying NOT NULL,
102 email character varying(128) DEFAULT ''::character varying NOT NULL,
103 firstname character varying(128) DEFAULT ''::character varying NOT NULL,
104 surname character varying(128) DEFAULT ''::character varying NOT NULL,
105 vcard text NOT NULL
106 );
107
108
109 --
110 -- TOC entry 11 (OID 15282494)
111 -- Name: identities; Type: TABLE; Schema: public; Owner: postgres
112 --
113
114 CREATE TABLE identities (
115 identity_id integer DEFAULT nextval('identity_ids'::text) NOT NULL,
116 user_id integer DEFAULT 0 NOT NULL,
117 del boolean DEFAULT false NOT NULL,
118 "default" boolean DEFAULT false NOT NULL,
119 name character varying(128) NOT NULL,
120 organization character varying(128) NOT NULL,
121 email character varying(128) NOT NULL,
122 "reply-to" character varying(128) NOT NULL,
123 bcc character varying(128) NOT NULL,
124 signature text NOT NULL
125 );
126
127
128 --
129 -- TOC entry 12 (OID 15282503)
130 -- Name: session; Type: TABLE; Schema: public; Owner: postgres
131 --
132
133 CREATE TABLE "session" (
134 sess_id character varying(32) DEFAULT ''::character varying NOT NULL,
135 created timestamp with time zone DEFAULT now() NOT NULL,
136 changed timestamp with time zone DEFAULT now() NOT NULL,
137 vars text NOT NULL
138 );
139
140
141 --
142 -- TOC entry 13 (OID 15282510)
143 -- Name: users; Type: TABLE; Schema: public; Owner: postgres
144 --
145
146 CREATE TABLE users (
147 user_id integer DEFAULT nextval('user_ids'::text) NOT NULL,
148 username character varying(128) DEFAULT ''::character varying NOT NULL,
149 mail_host character varying(128) DEFAULT ''::character varying NOT NULL,
150 created timestamp with time zone DEFAULT now() NOT NULL,
151 last_login timestamp with time zone DEFAULT now() NOT NULL,
152 "language" character varying(5) DEFAULT 'en'::character varying NOT NULL,
153 preferences text DEFAULT ''::text NOT NULL
154 );
155
156
157 --
158 -- TOC entry 14 (OID 15282518)
159 -- Name: cache_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
160 --
161
162 ALTER TABLE ONLY "cache"
163 ADD CONSTRAINT cache_pkey PRIMARY KEY (cache_id);
164
165
166 --
167 -- TOC entry 15 (OID 15282520)
168 -- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
169 --
170
171 ALTER TABLE ONLY contacts
172 ADD CONSTRAINT contacts_pkey PRIMARY KEY (contact_id);
173
174
175 --
176 -- TOC entry 16 (OID 15282522)
177 -- Name: identities_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
178 --
179
180 ALTER TABLE ONLY identities
181 ADD CONSTRAINT identities_pkey PRIMARY KEY (identity_id);
182
183
184 --
185 -- TOC entry 17 (OID 15282524)
186 -- Name: session_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
187 --
188
189 ALTER TABLE ONLY "session"
190 ADD CONSTRAINT session_pkey PRIMARY KEY (sess_id);
191
192
193 --
194 -- TOC entry 18 (OID 15282526)
195 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: postgres
196 --
197
198 ALTER TABLE ONLY users
199 ADD CONSTRAINT users_pkey PRIMARY KEY (user_id);
200
201
202 --
203 -- TOC entry 19 (OID 15282528)
204 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
205 --
206
207 ALTER TABLE ONLY "cache"
208 ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);
209
210
211 --
212 -- TOC entry 20 (OID 15282532)
213 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: postgres
214 --
215
216 ALTER TABLE ONLY "cache"
217 ADD CONSTRAINT "$2" FOREIGN KEY (session_id) REFERENCES "session"(sess_id);
218
219
220 --
221 -- TOC entry 21 (OID 15282536)
222 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
223 --
224
225 ALTER TABLE ONLY contacts
226 ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);
227
228
229 --
230 -- TOC entry 22 (OID 15282540)
231 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: postgres
232 --
233
234 ALTER TABLE ONLY identities
235 ADD CONSTRAINT "$1" FOREIGN KEY (user_id) REFERENCES users(user_id);
236
237
238 SET SESSION AUTHORIZATION 'postgres';
239
240 --
241 -- TOC entry 3 (OID 15282469)
242 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
243 --
244
245 COMMENT ON SCHEMA public IS 'Standard public schema';
246
247
248 SET SESSION AUTHORIZATION 'postgres';
249
250 --
251 -- TOC entry 9 (OID 15282478)
252 -- Name: TABLE "cache"; Type: COMMENT; Schema: public; Owner: postgres
253 --
Something went wrong with that request. Please try again.