2 -- Totally untested postgresql dump for the table "tables".
8 -- PostgreSQL database dump
11 SET client_encoding = 'UNICODE';
12 SET check_function_bodies = false;
14 SET SESSION AUTHORIZATION 'postgres';
17 -- TOC entry 4 (OID 2200)
18 -- Name: public; Type: ACL; Schema: -; Owner: postgres
21 REVOKE ALL ON SCHEMA public FROM PUBLIC;
22 GRANT ALL ON SCHEMA public TO PUBLIC;
24 -- FIXME ! Either remove line or use the mediawiki database user there
25 SET SESSION AUTHORIZATION 'hashar';
27 SET search_path = public, pg_catalog;
30 -- TOC entry 5 (OID 17145)
31 -- Name: user_user_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar
34 CREATE SEQUENCE user_user_id_seq
42 -- TOC entry 9 (OID 17147)
43 -- Name: user; Type: TABLE; Schema: public; Owner: hashar
47 user_id integer DEFAULT nextval('user_user_id_seq'::text),
48 user_name character varying(255) DEFAULT ''::character varying NOT NULL,
49 user_real_name character varying(255) DEFAULT ''::character varying NOT NULL,
50 user_rights text DEFAULT ''::text NOT NULL,
51 user_password text DEFAULT ''::text NOT NULL,
52 user_newpassword text DEFAULT ''::text NOT NULL,
53 user_email text DEFAULT ''::text NOT NULL,
54 user_options text DEFAULT ''::text NOT NULL,
55 user_touched character(14) DEFAULT ''::bpchar NOT NULL
60 -- TOC entry 10 (OID 17161)
61 -- Name: user_newtalk; Type: TABLE; Schema: public; Owner: hashar
64 CREATE TABLE user_newtalk (
65 user_id integer DEFAULT 0 NOT NULL,
66 user_ip character varying(40) DEFAULT ''::character varying NOT NULL
71 -- TOC entry 6 (OID 17167)
72 -- Name: cur_cur_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar
75 CREATE SEQUENCE cur_cur_id_seq
83 -- TOC entry 11 (OID 17169)
84 -- Name: cur; Type: TABLE; Schema: public; Owner: hashar
88 cur_id integer DEFAULT nextval('cur_cur_id_seq'::text),
89 cur_namespace smallint DEFAULT 0::smallint NOT NULL,
90 cur_title character varying(255) DEFAULT ''::character varying NOT NULL,
91 cur_text text DEFAULT ''::text NOT NULL,
92 cur_comment text DEFAULT ''::text NOT NULL,
93 cur_user integer DEFAULT 0 NOT NULL,
94 cur_user_text character varying(255) DEFAULT ''::character varying NOT NULL,
95 cur_timestamp character(14) DEFAULT ''::bpchar NOT NULL,
96 cur_restrictions text DEFAULT ''::text NOT NULL,
97 cur_counter bigint DEFAULT 0::bigint NOT NULL,
98 cur_is_redirect smallint DEFAULT 0::smallint NOT NULL,
99 cur_minor_edit smallint DEFAULT 0::smallint NOT NULL,
100 cur_is_new smallint DEFAULT 0::smallint NOT NULL,
101 cur_random double precision NOT NULL,
102 cur_touched character(14) DEFAULT ''::bpchar NOT NULL,
103 inverse_timestamp character(14) DEFAULT ''::bpchar NOT NULL
108 -- TOC entry 7 (OID 17191)
109 -- Name: old_old_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar
112 CREATE SEQUENCE old_old_id_seq
120 -- TOC entry 12 (OID 17193)
121 -- Name: old; Type: TABLE; Schema: public; Owner: hashar
125 old_id integer DEFAULT nextval('old_old_id_seq'::text),
126 old_namespace smallint DEFAULT 0::smallint NOT NULL,
127 old_title character varying(255) DEFAULT ''::character varying NOT NULL,
128 old_text text DEFAULT ''::text NOT NULL,
129 old_comment text DEFAULT ''::text NOT NULL,
130 old_user integer DEFAULT 0 NOT NULL,
131 old_user_text character varying(255) NOT NULL,
132 old_timestamp character(14) DEFAULT ''::bpchar NOT NULL,
133 old_minor_edit smallint DEFAULT 0::smallint NOT NULL,
134 old_flags text DEFAULT ''::text NOT NULL,
135 inverse_timestamp character(14) DEFAULT ''::bpchar NOT NULL
140 -- TOC entry 13 (OID 17208)
141 -- Name: archive; Type: TABLE; Schema: public; Owner: hashar
144 CREATE TABLE archive (
145 ar_namespace smallint DEFAULT 0::smallint NOT NULL,
146 ar_title character varying(255) DEFAULT ''::character varying NOT NULL,
147 ar_text text DEFAULT ''::text NOT NULL,
148 ar_comment text DEFAULT ''::text NOT NULL,
149 ar_user integer DEFAULT 0 NOT NULL,
150 ar_user_text character varying(255) NOT NULL,
151 ar_timestamp character(14) DEFAULT ''::bpchar NOT NULL,
152 ar_minor_edit smallint DEFAULT 0::smallint NOT NULL,
153 ar_flags text DEFAULT ''::text NOT NULL
158 -- TOC entry 14 (OID 17221)
159 -- Name: links; Type: TABLE; Schema: public; Owner: hashar
163 l_from integer DEFAULT 0 NOT NULL,
164 l_to integer DEFAULT 0 NOT NULL
169 -- TOC entry 15 (OID 17227)
170 -- Name: brokenlinks; Type: TABLE; Schema: public; Owner: hashar
173 CREATE TABLE brokenlinks (
174 bl_from integer DEFAULT 0 NOT NULL,
175 bl_to character varying(255) DEFAULT ''::character varying NOT NULL
180 -- TOC entry 16 (OID 17233)
181 -- Name: imagelinks; Type: TABLE; Schema: public; Owner: hashar
184 CREATE TABLE imagelinks (
185 il_from integer DEFAULT 0 NOT NULL,
186 il_to character varying(255) DEFAULT ''::character varying NOT NULL
191 -- TOC entry 17 (OID 17239)
192 -- Name: categorylinks; Type: TABLE; Schema: public; Owner: hashar
195 CREATE TABLE categorylinks (
196 cl_from integer DEFAULT 0 NOT NULL,
197 cl_to character varying(255) DEFAULT ''::character varying NOT NULL,
198 cl_sortkey character varying(255) DEFAULT ''::character varying NOT NULL,
199 cl_timestamp timestamp without time zone NOT NULL
204 -- TOC entry 18 (OID 17244)
205 -- Name: linkscc; Type: TABLE; Schema: public; Owner: hashar
208 CREATE TABLE linkscc (
209 lcc_pageid integer NOT NULL,
210 lcc_cacheobj text DEFAULT ''::text NOT NULL
215 -- TOC entry 19 (OID 17252)
216 -- Name: site_stats; Type: TABLE; Schema: public; Owner: hashar
219 CREATE TABLE site_stats (
220 ss_row_id integer NOT NULL,
221 ss_total_views bigint DEFAULT 0::bigint,
222 ss_total_edits bigint DEFAULT 0::bigint,
223 ss_good_articles bigint DEFAULT 0::bigint
228 -- TOC entry 20 (OID 17257)
229 -- Name: hitcounter; Type: TABLE; Schema: public; Owner: hashar
232 CREATE TABLE hitcounter (
233 hc_id integer NOT NULL
238 -- TOC entry 8 (OID 17259)
239 -- Name: ipblocks_ipb_id_seq; Type: SEQUENCE; Schema: public; Owner: hashar
242 CREATE SEQUENCE ipblocks_ipb_id_seq
250 -- TOC entry 21 (OID 17261)
251 -- Name: ipblocks; Type: TABLE; Schema: public; Owner: hashar
254 CREATE TABLE ipblocks (
255 ipb_id integer DEFAULT nextval('ipblocks_ipb_id_seq'::text),
256 ipb_address character varying(40) DEFAULT ''::character varying NOT NULL,
257 ipb_user integer DEFAULT 0 NOT NULL,
258 ipb_by integer DEFAULT 0 NOT NULL,
259 ipb_reason text DEFAULT ''::text NOT NULL,
260 ipb_timestamp character(14) DEFAULT ''::bpchar NOT NULL,
261 ipb_auto smallint DEFAULT 0::smallint NOT NULL,
262 ipb_expiry character(14) DEFAULT ''::bpchar NOT NULL
267 -- TOC entry 22 (OID 17274)
268 -- Name: image; Type: TABLE; Schema: public; Owner: hashar
272 img_name character varying(255) DEFAULT ''::character varying NOT NULL,
273 img_size integer DEFAULT 0 NOT NULL,
274 img_description text DEFAULT ''::text NOT NULL,
275 img_user integer DEFAULT 0 NOT NULL,
276 img_user_text character varying(255) DEFAULT ''::character varying NOT NULL,
277 img_timestamp character(14) DEFAULT ''::bpchar NOT NULL
282 -- TOC entry 23 (OID 17285)
283 -- Name: oldimage; Type: TABLE; Schema: public; Owner: hashar
286 CREATE TABLE oldimage (
287 oi_name character varying(255) DEFAULT ''::character varying NOT NULL,
288 oi_archive_name character varying(255) DEFAULT ''::character varying NOT NULL,
289 oi_size integer DEFAULT 0 NOT NULL,
290 oi_description text DEFAULT ''::text NOT NULL,
291 oi_user integer DEFAULT 0 NOT NULL,
292 oi_user_text character varying(255) DEFAULT ''::character varying NOT NULL,
293 oi_timestamp character(14) DEFAULT ''::bpchar NOT NULL
298 -- TOC entry 24 (OID 17297)
299 -- Name: recentchanges; Type: TABLE; Schema: public; Owner: hashar
302 CREATE TABLE recentchanges (
303 rc_timestamp character varying(14) DEFAULT ''::character varying NOT NULL,
304 rc_cur_time character varying(14) DEFAULT ''::character varying NOT NULL,
305 rc_user integer DEFAULT 0 NOT NULL,
306 rc_user_text character varying(255) DEFAULT ''::character varying NOT NULL,
307 rc_namespace smallint DEFAULT 0::smallint NOT NULL,
308 rc_title character varying(255) DEFAULT ''::character varying NOT NULL,
309 rc_comment character varying(255) DEFAULT ''::character varying NOT NULL,
310 rc_minor smallint DEFAULT 0::smallint NOT NULL,
311 rc_bot smallint DEFAULT 0::smallint NOT NULL,
312 rc_new smallint DEFAULT 0::smallint NOT NULL,
313 rc_cur_id integer DEFAULT 0 NOT NULL,
314 rc_this_oldid integer DEFAULT 0 NOT NULL,
315 rc_last_oldid integer DEFAULT 0 NOT NULL,
316 rc_type smallint DEFAULT 0::smallint NOT NULL,
317 rc_moved_to_ns smallint DEFAULT 0::smallint NOT NULL,
318 rc_moved_to_title character varying(255) DEFAULT ''::character varying NOT NULL
323 -- TOC entry 25 (OID 17318)
324 -- Name: watchlist; Type: TABLE; Schema: public; Owner: hashar
327 CREATE TABLE watchlist (
328 wl_user integer NOT NULL,
329 wl_namespace smallint DEFAULT 0::smallint NOT NULL,
330 wl_title character varying(255) DEFAULT ''::character varying NOT NULL
335 -- TOC entry 26 (OID 17322)
336 -- Name: math; Type: TABLE; Schema: public; Owner: hashar
340 math_inputhash character varying(16) NOT NULL,
341 math_outputhash character varying(16) NOT NULL,
342 math_html_conservativeness smallint NOT NULL,
349 -- TOC entry 27 (OID 17327)
350 -- Name: searchindex; Type: TABLE; Schema: public; Owner: hashar
353 CREATE TABLE searchindex (
354 si_page integer NOT NULL,
355 si_title character varying(255) DEFAULT ''::character varying NOT NULL,
356 si_text text DEFAULT ''::text NOT NULL
361 -- TOC entry 28 (OID 17334)
362 -- Name: interwiki; Type: TABLE; Schema: public; Owner: hashar
365 CREATE TABLE interwiki (
366 iw_prefix character(32) NOT NULL,
367 iw_url character(127) NOT NULL,
368 iw_local boolean NOT NULL
373 -- TOC entry 29 (OID 17336)
374 -- Name: querycache; Type: TABLE; Schema: public; Owner: hashar
377 CREATE TABLE querycache (
378 qc_type character(32) NOT NULL,
379 qc_value integer DEFAULT 0 NOT NULL,
380 qc_namespace smallint DEFAULT 0::smallint NOT NULL,
381 qc_title character(255) DEFAULT ''::bpchar NOT NULL
386 -- TOC entry 30 (OID 17343)
387 -- Name: objectcache; Type: TABLE; Schema: public; Owner: hashar
390 CREATE TABLE objectcache (
391 keyname character(255) DEFAULT ''::bpchar NOT NULL,
393 exptime timestamp without time zone NOT NULL
398 -- TOC entry 47 (OID 17351)
399 -- Name: math_inputhash_math_index; Type: INDEX; Schema: public; Owner: hashar
402 CREATE UNIQUE INDEX math_inputhash_math_index ON math USING btree (math_inputhash);
406 -- TOC entry 49 (OID 17352)
407 -- Name: iw_prefix_interwiki_index; Type: INDEX; Schema: public; Owner: hashar
410 CREATE UNIQUE INDEX iw_prefix_interwiki_index ON interwiki USING btree (iw_prefix);
414 -- TOC entry 44 (OID 17353)
415 -- Name: ss_row_id_site_stats_index; Type: INDEX; Schema: public; Owner: hashar
418 CREATE UNIQUE INDEX ss_row_id_site_stats_index ON site_stats USING btree (ss_row_id);
422 -- TOC entry 33 (OID 17354)
423 -- Name: old_id_old_index; Type: INDEX; Schema: public; Owner: hashar
426 CREATE UNIQUE INDEX old_id_old_index ON "old" USING btree (old_id);
430 -- TOC entry 36 (OID 17355)
431 -- Name: bl_from_brokenlinks_index; Type: INDEX; Schema: public; Owner: hashar
434 CREATE UNIQUE INDEX bl_from_brokenlinks_index ON brokenlinks USING btree (bl_from, bl_to);
438 -- TOC entry 45 (OID 17356)
439 -- Name: ipb_id_ipblocks_index; Type: INDEX; Schema: public; Owner: hashar
442 CREATE UNIQUE INDEX ipb_id_ipblocks_index ON ipblocks USING btree (ipb_id);
446 -- TOC entry 32 (OID 17357)
447 -- Name: cur_id_cur_index; Type: INDEX; Schema: public; Owner: hashar
450 CREATE UNIQUE INDEX cur_id_cur_index ON cur USING btree (cur_id);
454 -- TOC entry 38 (OID 17358)
455 -- Name: il_from_imagelinks_index; Type: INDEX; Schema: public; Owner: hashar
458 CREATE UNIQUE INDEX il_from_imagelinks_index ON imagelinks USING btree (il_from, il_to);
462 -- TOC entry 31 (OID 17359)
463 -- Name: user_id_user_index; Type: INDEX; Schema: public; Owner: hashar
466 CREATE UNIQUE INDEX user_id_user_index ON "user" USING btree (user_id);
470 -- TOC entry 48 (OID 17360)
471 -- Name: key_searchindex_index; Type: INDEX; Schema: public; Owner: hashar
474 CREATE UNIQUE INDEX key_searchindex_index ON searchindex USING btree (si_page);
478 -- TOC entry 51 (OID 17361)
479 -- Name: key_objectcache_index; Type: INDEX; Schema: public; Owner: hashar
482 CREATE UNIQUE INDEX key_objectcache_index ON objectcache USING btree (keyname);
486 -- TOC entry 46 (OID 17362)
487 -- Name: key_watchlist_index; Type: INDEX; Schema: public; Owner: hashar
490 CREATE UNIQUE INDEX key_watchlist_index ON watchlist USING btree (wl_user, wl_namespace, wl_title);
494 -- TOC entry 34 (OID 17363)
495 -- Name: l_from_links_index; Type: INDEX; Schema: public; Owner: hashar
498 CREATE UNIQUE INDEX l_from_links_index ON links USING btree (l_from, l_to);
502 -- TOC entry 40 (OID 17364)
503 -- Name: cl_from_categorylinks_index; Type: INDEX; Schema: public; Owner: hashar
506 CREATE UNIQUE INDEX cl_from_categorylinks_index ON categorylinks USING btree (cl_from, cl_to);
510 -- TOC entry 41 (OID 17365)
511 -- Name: cl_sortkey_categorylinks_index; Type: INDEX; Schema: public; Owner: hashar
514 CREATE INDEX cl_sortkey_categorylinks_index ON categorylinks USING btree (cl_to, cl_sortkey);
518 -- TOC entry 42 (OID 17366)
519 -- Name: cl_timestamp_categorylinks_index; Type: INDEX; Schema: public; Owner: hashar
522 CREATE INDEX cl_timestamp_categorylinks_index ON categorylinks USING btree (cl_to, cl_timestamp);
526 -- TOC entry 35 (OID 17225)
527 -- Name: links_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar
530 ALTER TABLE ONLY links
531 ADD CONSTRAINT links_pkey PRIMARY KEY (l_from, l_to);
535 -- TOC entry 37 (OID 17231)
536 -- Name: brokenlinks_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar
539 ALTER TABLE ONLY brokenlinks
540 ADD CONSTRAINT brokenlinks_pkey PRIMARY KEY (bl_to);
544 -- TOC entry 39 (OID 17237)
545 -- Name: imagelinks_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar
548 ALTER TABLE ONLY imagelinks
549 ADD CONSTRAINT imagelinks_pkey PRIMARY KEY (il_to);
553 -- TOC entry 43 (OID 17250)
554 -- Name: linkscc_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar
557 ALTER TABLE ONLY linkscc
558 ADD CONSTRAINT linkscc_pkey PRIMARY KEY (lcc_pageid);
562 -- TOC entry 50 (OID 17341)
563 -- Name: querycache_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar
566 ALTER TABLE ONLY querycache
567 ADD CONSTRAINT querycache_pkey PRIMARY KEY (qc_type, qc_value);
571 -- TOC entry 52 (OID 17349)
572 -- Name: objectcache_pkey; Type: CONSTRAINT; Schema: public; Owner: hashar
575 ALTER TABLE ONLY objectcache
576 ADD CONSTRAINT objectcache_pkey PRIMARY KEY (exptime);
579 SET SESSION AUTHORIZATION 'postgres';
582 -- TOC entry 3 (OID 2200)
583 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
586 COMMENT ON SCHEMA public IS 'Standard public schema';