2 -- PostgreSQL database dump
5 SET client_encoding = 'UNICODE';
6 SET check_function_bodies = false;
9 -- TOC entry 4 (OID 2200)
10 -- Name: public; Type: ACL; Schema: -; Owner: postgres
13 REVOKE ALL ON SCHEMA public FROM PUBLIC;
14 REVOKE ALL ON SCHEMA public FROM postgres;
15 GRANT ALL ON SCHEMA public TO PUBLIC;
18 SET search_path = public, pg_catalog;
21 -- TOC entry 5 (OID 536004)
22 -- Name: pages; Type: TABLE; Schema: public; Owner: rich
30 description text NOT NULL,
31 creation_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL,
32 last_modified_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL,
33 hostid integer NOT NULL,
42 -- TOC entry 6 (OID 536004)
43 -- Name: pages; Type: ACL; Schema: public; Owner: rich
46 REVOKE ALL ON TABLE pages FROM PUBLIC;
47 GRANT ALL ON TABLE pages TO "www-data";
51 -- TOC entry 48 (OID 536004)
52 -- Name: pages_id_seq; Type: ACL; Schema: public; Owner: rich
55 REVOKE ALL ON TABLE pages_id_seq FROM PUBLIC;
56 GRANT ALL ON TABLE pages_id_seq TO "www-data";
60 -- TOC entry 7 (OID 536021)
61 -- Name: contents; Type: TABLE; Schema: public; Owner: rich
64 CREATE TABLE contents (
66 pageid integer NOT NULL,
67 ordering integer NOT NULL,
69 content text NOT NULL,
75 -- TOC entry 8 (OID 536021)
76 -- Name: contents; Type: ACL; Schema: public; Owner: rich
79 REVOKE ALL ON TABLE contents FROM PUBLIC;
80 GRANT ALL ON TABLE contents TO "www-data";
84 -- TOC entry 49 (OID 536021)
85 -- Name: contents_id_seq; Type: ACL; Schema: public; Owner: rich
88 REVOKE ALL ON TABLE contents_id_seq FROM PUBLIC;
89 GRANT ALL ON TABLE contents_id_seq TO "www-data";
93 -- TOC entry 9 (OID 536371)
94 -- Name: hosts; Type: TABLE; Schema: public; Owner: rich
99 canonical_hostname text NOT NULL,
101 edit_anon boolean DEFAULT true NOT NULL,
102 create_account_anon boolean DEFAULT true NOT NULL,
105 mailing_list boolean DEFAULT false NOT NULL,
106 is_template boolean DEFAULT false NOT NULL,
107 search_box boolean DEFAULT true NOT NULL,
108 view_anon boolean DEFAULT true NOT NULL,
109 navigation boolean DEFAULT false NOT NULL
114 -- TOC entry 10 (OID 536371)
115 -- Name: hosts; Type: ACL; Schema: public; Owner: rich
118 REVOKE ALL ON TABLE hosts FROM PUBLIC;
119 GRANT ALL ON TABLE hosts TO "www-data";
123 -- TOC entry 50 (OID 536371)
124 -- Name: hosts_id_seq; Type: ACL; Schema: public; Owner: rich
127 REVOKE ALL ON TABLE hosts_id_seq FROM PUBLIC;
128 GRANT ALL ON TABLE hosts_id_seq TO "www-data";
132 -- TOC entry 11 (OID 536379)
133 -- Name: hostnames; Type: TABLE; Schema: public; Owner: rich
136 CREATE TABLE hostnames (
137 hostid integer NOT NULL,
143 -- TOC entry 12 (OID 536379)
144 -- Name: hostnames; Type: ACL; Schema: public; Owner: rich
147 REVOKE ALL ON TABLE hostnames FROM PUBLIC;
148 GRANT ALL ON TABLE hostnames TO "www-data";
152 -- TOC entry 13 (OID 536915)
153 -- Name: email_notify; Type: TABLE; Schema: public; Owner: rich
156 CREATE TABLE email_notify (
157 hostid integer NOT NULL,
164 -- TOC entry 14 (OID 536915)
165 -- Name: email_notify; Type: ACL; Schema: public; Owner: rich
168 REVOKE ALL ON TABLE email_notify FROM PUBLIC;
169 GRANT ALL ON TABLE email_notify TO "www-data";
173 -- TOC entry 15 (OID 537151)
174 -- Name: images; Type: TABLE; Schema: public; Owner: rich
177 CREATE TABLE images (
179 hostid integer NOT NULL,
182 image bytea NOT NULL,
183 width integer NOT NULL,
184 height integer NOT NULL,
189 mime_type text NOT NULL,
194 upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
199 -- TOC entry 16 (OID 537151)
200 -- Name: images; Type: ACL; Schema: public; Owner: rich
203 REVOKE ALL ON TABLE images FROM PUBLIC;
204 GRANT ALL ON TABLE images TO "www-data";
208 -- TOC entry 51 (OID 537151)
209 -- Name: images_id_seq; Type: ACL; Schema: public; Owner: rich
212 REVOKE ALL ON TABLE images_id_seq FROM PUBLIC;
213 GRANT ALL ON TABLE images_id_seq TO "www-data";
217 -- TOC entry 17 (OID 537166)
218 -- Name: files; Type: TABLE; Schema: public; Owner: rich
223 hostid integer NOT NULL,
226 content bytea NOT NULL,
228 mime_type text NOT NULL,
229 upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
234 -- TOC entry 18 (OID 537166)
235 -- Name: files; Type: ACL; Schema: public; Owner: rich
238 REVOKE ALL ON TABLE files FROM PUBLIC;
239 GRANT ALL ON TABLE files TO "www-data";
243 -- TOC entry 52 (OID 537166)
244 -- Name: files_id_seq; Type: ACL; Schema: public; Owner: rich
247 REVOKE ALL ON TABLE files_id_seq FROM PUBLIC;
248 GRANT ALL ON TABLE files_id_seq TO "www-data";
252 -- TOC entry 19 (OID 540816)
253 -- Name: users; Type: TABLE; Schema: public; Owner: rich
258 hostid integer NOT NULL,
260 "password" text NOT NULL,
262 registration_date date DEFAULT ('now'::text)::date NOT NULL,
263 can_edit boolean DEFAULT true NOT NULL,
264 can_manage_users boolean DEFAULT false NOT NULL,
265 can_manage_contacts boolean DEFAULT false NOT NULL,
266 can_manage_site boolean DEFAULT false NOT NULL,
267 can_edit_global_css boolean DEFAULT false NOT NULL,
268 force_password_change boolean DEFAULT false NOT NULL,
269 can_import_mail boolean DEFAULT false NOT NULL,
270 email_notify boolean DEFAULT true NOT NULL
275 -- TOC entry 20 (OID 540816)
276 -- Name: users; Type: ACL; Schema: public; Owner: rich
279 REVOKE ALL ON TABLE users FROM PUBLIC;
280 GRANT ALL ON TABLE users TO "www-data";
284 -- TOC entry 53 (OID 540816)
285 -- Name: users_id_seq; Type: ACL; Schema: public; Owner: rich
288 REVOKE ALL ON TABLE users_id_seq FROM PUBLIC;
289 GRANT ALL ON TABLE users_id_seq TO "www-data";
293 -- TOC entry 21 (OID 540832)
294 -- Name: usercookies; Type: TABLE; Schema: public; Owner: rich
297 CREATE TABLE usercookies (
298 userid integer NOT NULL,
304 -- TOC entry 22 (OID 540832)
305 -- Name: usercookies; Type: ACL; Schema: public; Owner: rich
308 REVOKE ALL ON TABLE usercookies FROM PUBLIC;
309 GRANT ALL ON TABLE usercookies TO "www-data";
313 -- TOC entry 23 (OID 540961)
314 -- Name: sitemenu; Type: TABLE; Schema: public; Owner: rich
317 CREATE TABLE sitemenu (
318 hostid integer NOT NULL,
321 ordering integer NOT NULL
326 -- TOC entry 24 (OID 540961)
327 -- Name: sitemenu; Type: ACL; Schema: public; Owner: rich
330 REVOKE ALL ON TABLE sitemenu FROM PUBLIC;
331 GRANT ALL ON TABLE sitemenu TO "www-data";
335 -- TOC entry 25 (OID 542605)
336 -- Name: contacts; Type: TABLE; Schema: public; Owner: rich
339 CREATE TABLE contacts (
341 hostid integer NOT NULL,
343 subject text NOT NULL
348 -- TOC entry 26 (OID 542605)
349 -- Name: contacts; Type: ACL; Schema: public; Owner: rich
352 REVOKE ALL ON TABLE contacts FROM PUBLIC;
353 GRANT ALL ON TABLE contacts TO "www-data";
357 -- TOC entry 54 (OID 542605)
358 -- Name: contacts_id_seq; Type: ACL; Schema: public; Owner: rich
361 REVOKE ALL ON TABLE contacts_id_seq FROM PUBLIC;
362 GRANT ALL ON TABLE contacts_id_seq TO "www-data";
366 -- TOC entry 27 (OID 542617)
367 -- Name: contact_emails; Type: TABLE; Schema: public; Owner: rich
370 CREATE TABLE contact_emails (
371 contactid integer NOT NULL,
377 -- TOC entry 28 (OID 542617)
378 -- Name: contact_emails; Type: ACL; Schema: public; Owner: rich
381 REVOKE ALL ON TABLE contact_emails FROM PUBLIC;
382 GRANT ALL ON TABLE contact_emails TO "www-data";
386 -- TOC entry 29 (OID 543499)
387 -- Name: themes; Type: TABLE; Schema: public; Owner: rich
390 CREATE TABLE themes (
391 theme_css text NOT NULL,
393 description text NOT NULL
398 -- TOC entry 30 (OID 543499)
399 -- Name: themes; Type: ACL; Schema: public; Owner: rich
402 REVOKE ALL ON TABLE themes FROM PUBLIC;
403 GRANT SELECT ON TABLE themes TO "www-data";
407 -- TOC entry 31 (OID 543592)
408 -- Name: server_settings; Type: TABLE; Schema: public; Owner: rich
411 CREATE TABLE server_settings (
412 "version" integer NOT NULL,
419 -- TOC entry 33 (OID 543592)
420 -- Name: server_settings; Type: ACL; Schema: public; Owner: rich
423 REVOKE ALL ON TABLE server_settings FROM PUBLIC;
424 GRANT SELECT ON TABLE server_settings TO "www-data";
428 -- TOC entry 34 (OID 543754)
429 -- Name: page_emails; Type: TABLE; Schema: public; Owner: rich
432 CREATE TABLE page_emails (
433 hostid integer NOT NULL,
436 entry_date date DEFAULT ('now'::text)::date NOT NULL,
437 last_sent date DEFAULT ('now'::text)::date NOT NULL,
439 opt_out text NOT NULL
444 -- TOC entry 35 (OID 543754)
445 -- Name: page_emails; Type: ACL; Schema: public; Owner: rich
448 REVOKE ALL ON TABLE page_emails FROM PUBLIC;
449 GRANT ALL ON TABLE page_emails TO "www-data";
453 -- TOC entry 36 (OID 543785)
454 -- Name: mailing_lists; Type: TABLE; Schema: public; Owner: rich
457 CREATE TABLE mailing_lists (
458 hostid integer NOT NULL,
460 entry_date date DEFAULT ('now'::text)::date NOT NULL,
462 opt_out text NOT NULL,
468 -- TOC entry 37 (OID 543785)
469 -- Name: mailing_lists; Type: ACL; Schema: public; Owner: rich
472 REVOKE ALL ON TABLE mailing_lists FROM PUBLIC;
473 GRANT ALL ON TABLE mailing_lists TO "www-data";
477 -- TOC entry 38 (OID 544445)
478 -- Name: links; Type: TABLE; Schema: public; Owner: rich
482 hostid integer NOT NULL,
483 from_url text NOT NULL,
484 to_url text NOT NULL,
485 CONSTRAINT links_not_selfref_cn CHECK ((from_url <> to_url))
490 -- TOC entry 39 (OID 544445)
491 -- Name: links; Type: ACL; Schema: public; Owner: rich
494 REVOKE ALL ON TABLE links FROM PUBLIC;
495 GRANT ALL ON TABLE links TO "www-data";
499 -- TOC entry 40 (OID 547939)
500 -- Name: templates; Type: TABLE; Schema: public; Owner: rich
503 CREATE TABLE templates (
505 title_regexp text NOT NULL,
506 url_regexp text NOT NULL,
507 extension text NOT NULL,
508 ordering integer NOT NULL
513 -- TOC entry 41 (OID 547939)
514 -- Name: templates; Type: ACL; Schema: public; Owner: rich
517 REVOKE ALL ON TABLE templates FROM PUBLIC;
518 GRANT SELECT ON TABLE templates TO "www-data";
522 -- TOC entry 55 (OID 547939)
523 -- Name: templates_id_seq; Type: ACL; Schema: public; Owner: rich
526 REVOKE ALL ON TABLE templates_id_seq FROM PUBLIC;
530 -- TOC entry 42 (OID 551123)
531 -- Name: recently_visited; Type: TABLE; Schema: public; Owner: rich
534 CREATE TABLE recently_visited (
535 userid integer NOT NULL,
536 hostid integer NOT NULL,
538 visit_time timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
543 -- TOC entry 43 (OID 551123)
544 -- Name: recently_visited; Type: ACL; Schema: public; Owner: rich
547 REVOKE ALL ON TABLE recently_visited FROM PUBLIC;
548 GRANT ALL ON TABLE recently_visited TO "www-data";
552 -- TOC entry 44 (OID 551675)
553 -- Name: messages; Type: TABLE; Schema: public; Owner: rich
556 CREATE TABLE messages (
558 subject text NOT NULL,
559 inet_message_id text NOT NULL,
560 message_date timestamp with time zone NOT NULL,
561 hostid integer NOT NULL
566 -- TOC entry 45 (OID 551675)
567 -- Name: messages; Type: ACL; Schema: public; Owner: rich
570 REVOKE ALL ON TABLE messages FROM PUBLIC;
571 GRANT ALL ON TABLE messages TO "www-data";
575 -- TOC entry 56 (OID 551675)
576 -- Name: messages_id_seq; Type: ACL; Schema: public; Owner: rich
579 REVOKE ALL ON TABLE messages_id_seq FROM PUBLIC;
580 GRANT ALL ON TABLE messages_id_seq TO "www-data";
584 -- TOC entry 46 (OID 551685)
585 -- Name: msg_references; Type: TABLE; Schema: public; Owner: rich
588 CREATE TABLE msg_references (
589 message_id integer NOT NULL,
590 inet_message_id text NOT NULL,
591 ordering integer NOT NULL
596 -- TOC entry 47 (OID 551685)
597 -- Name: msg_references; Type: ACL; Schema: public; Owner: rich
600 REVOKE ALL ON TABLE msg_references FROM PUBLIC;
601 GRANT ALL ON TABLE msg_references TO "www-data";
605 -- TOC entry 63 (OID 536388)
606 -- Name: hostnames_hostid_name_uq; Type: INDEX; Schema: public; Owner: rich
609 CREATE UNIQUE INDEX hostnames_hostid_name_uq ON hostnames USING btree (hostid, name);
613 -- TOC entry 64 (OID 536389)
614 -- Name: hostnams_name_uq; Type: INDEX; Schema: public; Owner: rich
617 CREATE UNIQUE INDEX hostnams_name_uq ON hostnames USING btree (name);
621 -- TOC entry 60 (OID 536419)
622 -- Name: pages_url_uq; Type: INDEX; Schema: public; Owner: rich
625 CREATE UNIQUE INDEX pages_url_uq ON pages USING btree (hostid, url);
629 -- TOC entry 65 (OID 536924)
630 -- Name: email_notify_email_uq; Type: INDEX; Schema: public; Owner: rich
633 CREATE UNIQUE INDEX email_notify_email_uq ON email_notify USING btree (hostid, email);
637 -- TOC entry 66 (OID 540251)
638 -- Name: images_name_uq; Type: INDEX; Schema: public; Owner: rich
641 CREATE UNIQUE INDEX images_name_uq ON images USING btree (hostid, name);
645 -- TOC entry 68 (OID 540252)
646 -- Name: files_name_uq; Type: INDEX; Schema: public; Owner: rich
649 CREATE UNIQUE INDEX files_name_uq ON files USING btree (hostid, name);
653 -- TOC entry 71 (OID 540831)
654 -- Name: users_name_uq; Type: INDEX; Schema: public; Owner: rich
657 CREATE UNIQUE INDEX users_name_uq ON users USING btree (hostid, name);
661 -- TOC entry 70 (OID 540946)
662 -- Name: users_id_uq; Type: INDEX; Schema: public; Owner: rich
665 CREATE UNIQUE INDEX users_id_uq ON users USING btree (hostid, id);
669 -- TOC entry 73 (OID 540970)
670 -- Name: sitemenu_ordering_uq; Type: INDEX; Schema: public; Owner: rich
673 CREATE UNIQUE INDEX sitemenu_ordering_uq ON sitemenu USING btree (hostid, ordering);
677 -- TOC entry 74 (OID 540971)
678 -- Name: sitemenu_url_uq; Type: INDEX; Schema: public; Owner: rich
681 CREATE UNIQUE INDEX sitemenu_url_uq ON sitemenu USING btree (hostid, url);
685 -- TOC entry 77 (OID 542626)
686 -- Name: contact_emails_uq; Type: INDEX; Schema: public; Owner: rich
689 CREATE UNIQUE INDEX contact_emails_uq ON contact_emails USING btree (contactid, email);
693 -- TOC entry 78 (OID 543505)
694 -- Name: themes_theme_css_uq; Type: INDEX; Schema: public; Owner: rich
697 CREATE UNIQUE INDEX themes_theme_css_uq ON themes USING btree (theme_css);
701 -- TOC entry 79 (OID 543763)
702 -- Name: page_emails_email_uq; Type: INDEX; Schema: public; Owner: rich
705 CREATE UNIQUE INDEX page_emails_email_uq ON page_emails USING btree (hostid, url, email);
709 -- TOC entry 80 (OID 543795)
710 -- Name: mailing_lists_email_uq; Type: INDEX; Schema: public; Owner: rich
713 CREATE UNIQUE INDEX mailing_lists_email_uq ON mailing_lists USING btree (hostid, email);
717 -- TOC entry 75 (OID 543880)
718 -- Name: contacts_name_uq; Type: INDEX; Schema: public; Owner: rich
721 CREATE UNIQUE INDEX contacts_name_uq ON contacts USING btree (hostid, name);
725 -- TOC entry 81 (OID 544454)
726 -- Name: links_uq; Type: INDEX; Schema: public; Owner: rich
729 CREATE UNIQUE INDEX links_uq ON links USING btree (hostid, from_url, to_url);
733 -- TOC entry 82 (OID 547951)
734 -- Name: templates_ext_ord_uq; Type: INDEX; Schema: public; Owner: rich
737 CREATE UNIQUE INDEX templates_ext_ord_uq ON templates USING btree (extension, ordering);
741 -- TOC entry 84 (OID 547952)
742 -- Name: templates_title_uq; Type: INDEX; Schema: public; Owner: rich
745 CREATE UNIQUE INDEX templates_title_uq ON templates USING btree (title_regexp);
749 -- TOC entry 85 (OID 547953)
750 -- Name: templates_url_uq; Type: INDEX; Schema: public; Owner: rich
753 CREATE UNIQUE INDEX templates_url_uq ON templates USING btree (url_regexp);
757 -- TOC entry 86 (OID 551151)
758 -- Name: recently_visited_uq; Type: INDEX; Schema: public; Owner: rich
761 CREATE UNIQUE INDEX recently_visited_uq ON recently_visited USING btree (userid, hostid, url);
765 -- TOC entry 87 (OID 552155)
766 -- Name: messages_inet_message_id_uq; Type: INDEX; Schema: public; Owner: rich
769 CREATE UNIQUE INDEX messages_inet_message_id_uq ON messages USING btree (hostid, inet_message_id);
773 -- TOC entry 59 (OID 552684)
774 -- Name: pages_url_ix; Type: INDEX; Schema: public; Owner: rich
777 CREATE INDEX pages_url_ix ON pages USING btree (url);
781 -- TOC entry 58 (OID 552685)
782 -- Name: pages_redirect_ix; Type: INDEX; Schema: public; Owner: rich
785 CREATE INDEX pages_redirect_ix ON pages USING btree (redirect);
789 -- TOC entry 57 (OID 536012)
790 -- Name: pages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
793 ALTER TABLE ONLY pages
794 ADD CONSTRAINT pages_pkey PRIMARY KEY (id);
798 -- TOC entry 61 (OID 536027)
799 -- Name: contents_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
802 ALTER TABLE ONLY contents
803 ADD CONSTRAINT contents_pkey PRIMARY KEY (id);
807 -- TOC entry 62 (OID 536377)
808 -- Name: hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
811 ALTER TABLE ONLY hosts
812 ADD CONSTRAINT hosts_pkey PRIMARY KEY (id);
816 -- TOC entry 67 (OID 537158)
817 -- Name: images_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
820 ALTER TABLE ONLY images
821 ADD CONSTRAINT images_pkey PRIMARY KEY (id);
825 -- TOC entry 69 (OID 537173)
826 -- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
829 ALTER TABLE ONLY files
830 ADD CONSTRAINT files_pkey PRIMARY KEY (id);
834 -- TOC entry 72 (OID 540825)
835 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
838 ALTER TABLE ONLY users
839 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
843 -- TOC entry 76 (OID 542611)
844 -- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
847 ALTER TABLE ONLY contacts
848 ADD CONSTRAINT contacts_pkey PRIMARY KEY (id);
852 -- TOC entry 83 (OID 547945)
853 -- Name: templates_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
856 ALTER TABLE ONLY templates
857 ADD CONSTRAINT templates_pkey PRIMARY KEY (id);
861 -- TOC entry 88 (OID 551681)
862 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
865 ALTER TABLE ONLY messages
866 ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
870 -- TOC entry 93 (OID 536029)
871 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
874 ALTER TABLE ONLY contents
875 ADD CONSTRAINT "$1" FOREIGN KEY (pageid) REFERENCES pages(id);
879 -- TOC entry 96 (OID 536384)
880 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
883 ALTER TABLE ONLY hostnames
884 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
888 -- TOC entry 94 (OID 536394)
889 -- Name: hosts_hostname_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
892 ALTER TABLE ONLY hosts
893 ADD CONSTRAINT hosts_hostname_cn FOREIGN KEY (id, canonical_hostname) REFERENCES hostnames(hostid, name) DEFERRABLE;
897 -- TOC entry 89 (OID 536404)
898 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
901 ALTER TABLE ONLY pages
902 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
906 -- TOC entry 97 (OID 536920)
907 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
910 ALTER TABLE ONLY email_notify
911 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
915 -- TOC entry 98 (OID 537160)
916 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
919 ALTER TABLE ONLY images
920 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
924 -- TOC entry 99 (OID 537175)
925 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
928 ALTER TABLE ONLY files
929 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
933 -- TOC entry 90 (OID 539155)
934 -- Name: pages_redirect_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
937 ALTER TABLE ONLY pages
938 ADD CONSTRAINT pages_redirect_cn FOREIGN KEY (hostid, redirect) REFERENCES pages(hostid, url) DEFERRABLE;
942 -- TOC entry 100 (OID 540827)
943 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
946 ALTER TABLE ONLY users
947 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
951 -- TOC entry 101 (OID 540837)
952 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
955 ALTER TABLE ONLY usercookies
956 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
960 -- TOC entry 91 (OID 540942)
961 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
964 ALTER TABLE ONLY pages
965 ADD CONSTRAINT "$2" FOREIGN KEY (logged_user) REFERENCES users(id);
969 -- TOC entry 92 (OID 540947)
970 -- Name: pages_user_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
973 ALTER TABLE ONLY pages
974 ADD CONSTRAINT pages_user_cn FOREIGN KEY (hostid, logged_user) REFERENCES users(hostid, id);
978 -- TOC entry 102 (OID 540966)
979 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
982 ALTER TABLE ONLY sitemenu
983 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
987 -- TOC entry 103 (OID 540972)
988 -- Name: sitemenu_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
991 ALTER TABLE ONLY sitemenu
992 ADD CONSTRAINT sitemenu_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
996 -- TOC entry 104 (OID 542613)
997 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1000 ALTER TABLE ONLY contacts
1001 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1005 -- TOC entry 105 (OID 542622)
1006 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1009 ALTER TABLE ONLY contact_emails
1010 ADD CONSTRAINT "$1" FOREIGN KEY (contactid) REFERENCES contacts(id);
1014 -- TOC entry 95 (OID 543506)
1015 -- Name: hosts_theme_css_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1018 ALTER TABLE ONLY hosts
1019 ADD CONSTRAINT hosts_theme_css_cn FOREIGN KEY (theme_css) REFERENCES themes(theme_css);
1023 -- TOC entry 106 (OID 543759)
1024 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1027 ALTER TABLE ONLY page_emails
1028 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1032 -- TOC entry 107 (OID 543764)
1033 -- Name: page_emails_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1036 ALTER TABLE ONLY page_emails
1037 ADD CONSTRAINT page_emails_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1041 -- TOC entry 108 (OID 543791)
1042 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1045 ALTER TABLE ONLY mailing_lists
1046 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1050 -- TOC entry 109 (OID 544450)
1051 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1054 ALTER TABLE ONLY links
1055 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1059 -- TOC entry 110 (OID 544455)
1060 -- Name: links_from_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1063 ALTER TABLE ONLY links
1064 ADD CONSTRAINT links_from_cn FOREIGN KEY (hostid, from_url) REFERENCES pages(hostid, url) DEFERRABLE;
1068 -- TOC entry 111 (OID 551129)
1069 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1072 ALTER TABLE ONLY recently_visited
1073 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
1077 -- TOC entry 112 (OID 551133)
1078 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
1081 ALTER TABLE ONLY recently_visited
1082 ADD CONSTRAINT "$2" FOREIGN KEY (hostid) REFERENCES hosts(id);
1086 -- TOC entry 113 (OID 551137)
1087 -- Name: recently_visited_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1090 ALTER TABLE ONLY recently_visited
1091 ADD CONSTRAINT recently_visited_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1095 -- TOC entry 114 (OID 551141)
1096 -- Name: recently_visited_userid_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1099 ALTER TABLE ONLY recently_visited
1100 ADD CONSTRAINT recently_visited_userid_cn FOREIGN KEY (hostid, userid) REFERENCES users(hostid, id);
1104 -- TOC entry 116 (OID 551690)
1105 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1108 ALTER TABLE ONLY msg_references
1109 ADD CONSTRAINT "$1" FOREIGN KEY (message_id) REFERENCES messages(id);
1113 -- TOC entry 115 (OID 551694)
1114 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1117 ALTER TABLE ONLY messages
1118 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1122 -- TOC entry 3 (OID 2200)
1123 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
1126 COMMENT ON SCHEMA public IS 'Standard public namespace';
1130 -- TOC entry 32 (OID 543592)
1131 -- Name: TABLE server_settings; Type: COMMENT; Schema: public; Owner: rich
1134 COMMENT ON TABLE server_settings IS 'This table contains global settings for the server. There should be only one row in this table. If you modify any setting, you must restart the webserver for the change to take effect. The "version" field is intended to be some sort of database version, but is currently unused.';
1138 -- PostgreSQL database dump
1141 SET client_encoding = 'UNICODE';
1142 SET check_function_bodies = false;
1144 SET search_path = public, pg_catalog;
1147 -- Data for TOC entry 3 (OID 547939)
1148 -- Name: templates; Type: TABLE DATA; Schema: public; Owner: rich
1151 COPY templates (id, title_regexp, url_regexp, extension, ordering) FROM stdin;
1152 1 ^(199[0-9]|20[0-9][0-9])/(0[1-9]|1[0-2])/(0[1-9]|1[0-9]|2[0-9]|3[01])$ ^(199[0-9]|20[0-9][0-9])/(0[1-9]|1[0-2])/(0[1-9]|1[0-9]|2[0-9]|3[01])$ calendar 10
1153 3 ^(199[0-9]|20[0-9][0-9])/(0[1-9]|1[0-2])$ ^(199[0-9]|20[0-9][0-9])/(0[1-9]|1[0-2])$ calendar 20
1154 4 ^(199[0-9]|20[0-9][0-9])$ ^(199[0-9]|20[0-9][0-9])$ calendar 30
1159 -- TOC entry 2 (OID 547937)
1160 -- Name: templates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: rich
1163 SELECT pg_catalog.setval('templates_id_seq', 4, true);
1167 -- PostgreSQL database dump
1170 SET client_encoding = 'UNICODE';
1171 SET check_function_bodies = false;
1173 SET search_path = public, pg_catalog;
1176 -- Data for TOC entry 2 (OID 543499)
1177 -- Name: themes; Type: TABLE DATA; Schema: public; Owner: rich
1180 COPY themes (theme_css, name, description) FROM stdin;
1181 /_css/easyweb.css Merjis Easy Web Marketing This is the easy web marketing stylesheet developed by Merjis Ltd. Please see http://www.merjis.com/
1182 /_css/basic.css Basic styles only Only the most essential styles. This is a good starting point if you want to completely restyle pages using site-specific CSS.