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 50 (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 51 (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,
115 -- TOC entry 10 (OID 536371)
116 -- Name: hosts; Type: ACL; Schema: public; Owner: rich
119 REVOKE ALL ON TABLE hosts FROM PUBLIC;
120 GRANT ALL ON TABLE hosts TO "www-data";
124 -- TOC entry 52 (OID 536371)
125 -- Name: hosts_id_seq; Type: ACL; Schema: public; Owner: rich
128 REVOKE ALL ON TABLE hosts_id_seq FROM PUBLIC;
129 GRANT ALL ON TABLE hosts_id_seq TO "www-data";
133 -- TOC entry 11 (OID 536379)
134 -- Name: hostnames; Type: TABLE; Schema: public; Owner: rich
137 CREATE TABLE hostnames (
138 hostid integer NOT NULL,
144 -- TOC entry 12 (OID 536379)
145 -- Name: hostnames; Type: ACL; Schema: public; Owner: rich
148 REVOKE ALL ON TABLE hostnames FROM PUBLIC;
149 GRANT ALL ON TABLE hostnames TO "www-data";
153 -- TOC entry 13 (OID 537151)
154 -- Name: images; Type: TABLE; Schema: public; Owner: rich
157 CREATE TABLE images (
159 hostid integer NOT NULL,
162 image bytea NOT NULL,
163 width integer NOT NULL,
164 height integer NOT NULL,
169 mime_type text NOT NULL,
174 upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
179 -- TOC entry 14 (OID 537151)
180 -- Name: images; Type: ACL; Schema: public; Owner: rich
183 REVOKE ALL ON TABLE images FROM PUBLIC;
184 GRANT ALL ON TABLE images TO "www-data";
188 -- TOC entry 53 (OID 537151)
189 -- Name: images_id_seq; Type: ACL; Schema: public; Owner: rich
192 REVOKE ALL ON TABLE images_id_seq FROM PUBLIC;
193 GRANT ALL ON TABLE images_id_seq TO "www-data";
197 -- TOC entry 15 (OID 537166)
198 -- Name: files; Type: TABLE; Schema: public; Owner: rich
203 hostid integer NOT NULL,
206 content bytea NOT NULL,
208 mime_type text NOT NULL,
209 upload_date timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
214 -- TOC entry 16 (OID 537166)
215 -- Name: files; Type: ACL; Schema: public; Owner: rich
218 REVOKE ALL ON TABLE files FROM PUBLIC;
219 GRANT ALL ON TABLE files TO "www-data";
223 -- TOC entry 54 (OID 537166)
224 -- Name: files_id_seq; Type: ACL; Schema: public; Owner: rich
227 REVOKE ALL ON TABLE files_id_seq FROM PUBLIC;
228 GRANT ALL ON TABLE files_id_seq TO "www-data";
232 -- TOC entry 17 (OID 540816)
233 -- Name: users; Type: TABLE; Schema: public; Owner: rich
238 hostid integer NOT NULL,
240 "password" text NOT NULL,
242 registration_date date DEFAULT ('now'::text)::date NOT NULL,
243 can_edit boolean DEFAULT true NOT NULL,
244 can_manage_users boolean DEFAULT false NOT NULL,
245 can_manage_contacts boolean DEFAULT false NOT NULL,
246 can_manage_site boolean DEFAULT false NOT NULL,
247 can_edit_global_css boolean DEFAULT false NOT NULL,
248 force_password_change boolean DEFAULT false NOT NULL,
249 can_import_mail boolean DEFAULT false NOT NULL,
250 email_notify boolean DEFAULT true NOT NULL,
256 -- TOC entry 18 (OID 540816)
257 -- Name: users; Type: ACL; Schema: public; Owner: rich
260 REVOKE ALL ON TABLE users FROM PUBLIC;
261 GRANT ALL ON TABLE users TO "www-data";
265 -- TOC entry 55 (OID 540816)
266 -- Name: users_id_seq; Type: ACL; Schema: public; Owner: rich
269 REVOKE ALL ON TABLE users_id_seq FROM PUBLIC;
270 GRANT ALL ON TABLE users_id_seq TO "www-data";
274 -- TOC entry 19 (OID 540832)
275 -- Name: usercookies; Type: TABLE; Schema: public; Owner: rich
278 CREATE TABLE usercookies (
279 userid integer NOT NULL,
285 -- TOC entry 20 (OID 540832)
286 -- Name: usercookies; Type: ACL; Schema: public; Owner: rich
289 REVOKE ALL ON TABLE usercookies FROM PUBLIC;
290 GRANT ALL ON TABLE usercookies TO "www-data";
294 -- TOC entry 21 (OID 540961)
295 -- Name: sitemenu; Type: TABLE; Schema: public; Owner: rich
298 CREATE TABLE sitemenu (
299 hostid integer NOT NULL,
302 ordering integer NOT NULL
307 -- TOC entry 22 (OID 540961)
308 -- Name: sitemenu; Type: ACL; Schema: public; Owner: rich
311 REVOKE ALL ON TABLE sitemenu FROM PUBLIC;
312 GRANT ALL ON TABLE sitemenu TO "www-data";
316 -- TOC entry 23 (OID 542605)
317 -- Name: contacts; Type: TABLE; Schema: public; Owner: rich
320 CREATE TABLE contacts (
322 hostid integer NOT NULL,
324 subject text NOT NULL
329 -- TOC entry 24 (OID 542605)
330 -- Name: contacts; Type: ACL; Schema: public; Owner: rich
333 REVOKE ALL ON TABLE contacts FROM PUBLIC;
334 GRANT ALL ON TABLE contacts TO "www-data";
338 -- TOC entry 56 (OID 542605)
339 -- Name: contacts_id_seq; Type: ACL; Schema: public; Owner: rich
342 REVOKE ALL ON TABLE contacts_id_seq FROM PUBLIC;
343 GRANT ALL ON TABLE contacts_id_seq TO "www-data";
347 -- TOC entry 25 (OID 542617)
348 -- Name: contact_emails; Type: TABLE; Schema: public; Owner: rich
351 CREATE TABLE contact_emails (
352 contactid integer NOT NULL,
358 -- TOC entry 26 (OID 542617)
359 -- Name: contact_emails; Type: ACL; Schema: public; Owner: rich
362 REVOKE ALL ON TABLE contact_emails FROM PUBLIC;
363 GRANT ALL ON TABLE contact_emails TO "www-data";
367 -- TOC entry 27 (OID 543499)
368 -- Name: themes; Type: TABLE; Schema: public; Owner: rich
371 CREATE TABLE themes (
372 theme_css text NOT NULL,
374 description text NOT NULL
379 -- TOC entry 28 (OID 543499)
380 -- Name: themes; Type: ACL; Schema: public; Owner: rich
383 REVOKE ALL ON TABLE themes FROM PUBLIC;
384 GRANT SELECT ON TABLE themes TO "www-data";
388 -- TOC entry 29 (OID 543592)
389 -- Name: server_settings; Type: TABLE; Schema: public; Owner: rich
392 CREATE TABLE server_settings (
393 "version" integer NOT NULL,
400 -- TOC entry 31 (OID 543592)
401 -- Name: server_settings; Type: ACL; Schema: public; Owner: rich
404 REVOKE ALL ON TABLE server_settings FROM PUBLIC;
405 GRANT SELECT ON TABLE server_settings TO "www-data";
409 -- TOC entry 32 (OID 543754)
410 -- Name: page_emails; Type: TABLE; Schema: public; Owner: rich
413 CREATE TABLE page_emails (
414 hostid integer NOT NULL,
417 entry_date date DEFAULT ('now'::text)::date NOT NULL,
418 last_sent date DEFAULT ('now'::text)::date NOT NULL,
420 opt_out text NOT NULL
425 -- TOC entry 33 (OID 543754)
426 -- Name: page_emails; Type: ACL; Schema: public; Owner: rich
429 REVOKE ALL ON TABLE page_emails FROM PUBLIC;
430 GRANT ALL ON TABLE page_emails TO "www-data";
434 -- TOC entry 34 (OID 543785)
435 -- Name: mailing_lists; Type: TABLE; Schema: public; Owner: rich
438 CREATE TABLE mailing_lists (
439 hostid integer NOT NULL,
441 entry_date date DEFAULT ('now'::text)::date NOT NULL,
443 opt_out text NOT NULL,
449 -- TOC entry 35 (OID 543785)
450 -- Name: mailing_lists; Type: ACL; Schema: public; Owner: rich
453 REVOKE ALL ON TABLE mailing_lists FROM PUBLIC;
454 GRANT ALL ON TABLE mailing_lists TO "www-data";
458 -- TOC entry 36 (OID 544445)
459 -- Name: links; Type: TABLE; Schema: public; Owner: rich
463 hostid integer NOT NULL,
464 from_url text NOT NULL,
465 to_url text NOT NULL,
466 CONSTRAINT links_not_selfref_cn CHECK ((from_url <> to_url))
471 -- TOC entry 37 (OID 544445)
472 -- Name: links; Type: ACL; Schema: public; Owner: rich
475 REVOKE ALL ON TABLE links FROM PUBLIC;
476 GRANT ALL ON TABLE links TO "www-data";
480 -- TOC entry 38 (OID 547939)
481 -- Name: templates; Type: TABLE; Schema: public; Owner: rich
484 CREATE TABLE templates (
486 title_regexp text NOT NULL,
487 url_regexp text NOT NULL,
488 extension text NOT NULL,
489 ordering integer NOT NULL
494 -- TOC entry 39 (OID 547939)
495 -- Name: templates; Type: ACL; Schema: public; Owner: rich
498 REVOKE ALL ON TABLE templates FROM PUBLIC;
499 GRANT SELECT ON TABLE templates TO "www-data";
503 -- TOC entry 57 (OID 547939)
504 -- Name: templates_id_seq; Type: ACL; Schema: public; Owner: rich
507 REVOKE ALL ON TABLE templates_id_seq FROM PUBLIC;
511 -- TOC entry 40 (OID 551123)
512 -- Name: recently_visited; Type: TABLE; Schema: public; Owner: rich
515 CREATE TABLE recently_visited (
516 userid integer NOT NULL,
517 hostid integer NOT NULL,
519 visit_time timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
524 -- TOC entry 41 (OID 551123)
525 -- Name: recently_visited; Type: ACL; Schema: public; Owner: rich
528 REVOKE ALL ON TABLE recently_visited FROM PUBLIC;
529 GRANT ALL ON TABLE recently_visited TO "www-data";
533 -- TOC entry 42 (OID 551675)
534 -- Name: messages; Type: TABLE; Schema: public; Owner: rich
537 CREATE TABLE messages (
539 subject text NOT NULL,
540 inet_message_id text NOT NULL,
541 message_date timestamp with time zone NOT NULL,
542 hostid integer NOT NULL
547 -- TOC entry 43 (OID 551675)
548 -- Name: messages; Type: ACL; Schema: public; Owner: rich
551 REVOKE ALL ON TABLE messages FROM PUBLIC;
552 GRANT ALL ON TABLE messages TO "www-data";
556 -- TOC entry 58 (OID 551675)
557 -- Name: messages_id_seq; Type: ACL; Schema: public; Owner: rich
560 REVOKE ALL ON TABLE messages_id_seq FROM PUBLIC;
561 GRANT ALL ON TABLE messages_id_seq TO "www-data";
565 -- TOC entry 44 (OID 551685)
566 -- Name: msg_references; Type: TABLE; Schema: public; Owner: rich
569 CREATE TABLE msg_references (
570 message_id integer NOT NULL,
571 inet_message_id text NOT NULL,
572 ordering integer NOT NULL
577 -- TOC entry 45 (OID 551685)
578 -- Name: msg_references; Type: ACL; Schema: public; Owner: rich
581 REVOKE ALL ON TABLE msg_references FROM PUBLIC;
582 GRANT ALL ON TABLE msg_references TO "www-data";
586 -- TOC entry 46 (OID 607075)
587 -- Name: powered_by; Type: TABLE; Schema: public; Owner: rich
590 CREATE TABLE powered_by (
598 -- TOC entry 47 (OID 607075)
599 -- Name: powered_by; Type: ACL; Schema: public; Owner: rich
602 REVOKE ALL ON TABLE powered_by FROM PUBLIC;
603 GRANT SELECT ON TABLE powered_by TO "www-data";
607 -- TOC entry 48 (OID 607136)
608 -- Name: pending_email_changes; Type: TABLE; Schema: public; Owner: rich
611 CREATE TABLE pending_email_changes (
613 change_date date DEFAULT ('now'::text)::date NOT NULL,
614 userid integer NOT NULL,
620 -- TOC entry 49 (OID 607136)
621 -- Name: pending_email_changes; Type: ACL; Schema: public; Owner: rich
624 REVOKE ALL ON TABLE pending_email_changes FROM PUBLIC;
625 GRANT ALL ON TABLE pending_email_changes TO "www-data";
629 -- TOC entry 65 (OID 536388)
630 -- Name: hostnames_hostid_name_uq; Type: INDEX; Schema: public; Owner: rich
633 CREATE UNIQUE INDEX hostnames_hostid_name_uq ON hostnames USING btree (hostid, name);
637 -- TOC entry 66 (OID 536389)
638 -- Name: hostnams_name_uq; Type: INDEX; Schema: public; Owner: rich
641 CREATE UNIQUE INDEX hostnams_name_uq ON hostnames USING btree (name);
645 -- TOC entry 62 (OID 536419)
646 -- Name: pages_url_uq; Type: INDEX; Schema: public; Owner: rich
649 CREATE UNIQUE INDEX pages_url_uq ON pages USING btree (hostid, url);
653 -- TOC entry 67 (OID 540251)
654 -- Name: images_name_uq; Type: INDEX; Schema: public; Owner: rich
657 CREATE UNIQUE INDEX images_name_uq ON images USING btree (hostid, name);
661 -- TOC entry 69 (OID 540252)
662 -- Name: files_name_uq; Type: INDEX; Schema: public; Owner: rich
665 CREATE UNIQUE INDEX files_name_uq ON files USING btree (hostid, name);
669 -- TOC entry 72 (OID 540831)
670 -- Name: users_name_uq; Type: INDEX; Schema: public; Owner: rich
673 CREATE UNIQUE INDEX users_name_uq ON users USING btree (hostid, name);
677 -- TOC entry 71 (OID 540946)
678 -- Name: users_id_uq; Type: INDEX; Schema: public; Owner: rich
681 CREATE UNIQUE INDEX users_id_uq ON users USING btree (hostid, id);
685 -- TOC entry 74 (OID 540970)
686 -- Name: sitemenu_ordering_uq; Type: INDEX; Schema: public; Owner: rich
689 CREATE UNIQUE INDEX sitemenu_ordering_uq ON sitemenu USING btree (hostid, ordering);
693 -- TOC entry 75 (OID 540971)
694 -- Name: sitemenu_url_uq; Type: INDEX; Schema: public; Owner: rich
697 CREATE UNIQUE INDEX sitemenu_url_uq ON sitemenu USING btree (hostid, url);
701 -- TOC entry 78 (OID 542626)
702 -- Name: contact_emails_uq; Type: INDEX; Schema: public; Owner: rich
705 CREATE UNIQUE INDEX contact_emails_uq ON contact_emails USING btree (contactid, email);
709 -- TOC entry 79 (OID 543505)
710 -- Name: themes_theme_css_uq; Type: INDEX; Schema: public; Owner: rich
713 CREATE UNIQUE INDEX themes_theme_css_uq ON themes USING btree (theme_css);
717 -- TOC entry 80 (OID 543763)
718 -- Name: page_emails_email_uq; Type: INDEX; Schema: public; Owner: rich
721 CREATE UNIQUE INDEX page_emails_email_uq ON page_emails USING btree (hostid, url, email);
725 -- TOC entry 81 (OID 543795)
726 -- Name: mailing_lists_email_uq; Type: INDEX; Schema: public; Owner: rich
729 CREATE UNIQUE INDEX mailing_lists_email_uq ON mailing_lists USING btree (hostid, email);
733 -- TOC entry 76 (OID 543880)
734 -- Name: contacts_name_uq; Type: INDEX; Schema: public; Owner: rich
737 CREATE UNIQUE INDEX contacts_name_uq ON contacts USING btree (hostid, name);
741 -- TOC entry 82 (OID 544454)
742 -- Name: links_uq; Type: INDEX; Schema: public; Owner: rich
745 CREATE UNIQUE INDEX links_uq ON links USING btree (hostid, from_url, to_url);
749 -- TOC entry 83 (OID 547951)
750 -- Name: templates_ext_ord_uq; Type: INDEX; Schema: public; Owner: rich
753 CREATE UNIQUE INDEX templates_ext_ord_uq ON templates USING btree (extension, ordering);
757 -- TOC entry 85 (OID 547952)
758 -- Name: templates_title_uq; Type: INDEX; Schema: public; Owner: rich
761 CREATE UNIQUE INDEX templates_title_uq ON templates USING btree (title_regexp);
765 -- TOC entry 86 (OID 547953)
766 -- Name: templates_url_uq; Type: INDEX; Schema: public; Owner: rich
769 CREATE UNIQUE INDEX templates_url_uq ON templates USING btree (url_regexp);
773 -- TOC entry 87 (OID 551151)
774 -- Name: recently_visited_uq; Type: INDEX; Schema: public; Owner: rich
777 CREATE UNIQUE INDEX recently_visited_uq ON recently_visited USING btree (userid, hostid, url);
781 -- TOC entry 88 (OID 552155)
782 -- Name: messages_inet_message_id_uq; Type: INDEX; Schema: public; Owner: rich
785 CREATE UNIQUE INDEX messages_inet_message_id_uq ON messages USING btree (hostid, inet_message_id);
789 -- TOC entry 61 (OID 552684)
790 -- Name: pages_url_ix; Type: INDEX; Schema: public; Owner: rich
793 CREATE INDEX pages_url_ix ON pages USING btree (url);
797 -- TOC entry 60 (OID 552685)
798 -- Name: pages_redirect_ix; Type: INDEX; Schema: public; Owner: rich
801 CREATE INDEX pages_redirect_ix ON pages USING btree (redirect);
805 -- TOC entry 59 (OID 536012)
806 -- Name: pages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
809 ALTER TABLE ONLY pages
810 ADD CONSTRAINT pages_pkey PRIMARY KEY (id);
814 -- TOC entry 63 (OID 536027)
815 -- Name: contents_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
818 ALTER TABLE ONLY contents
819 ADD CONSTRAINT contents_pkey PRIMARY KEY (id);
823 -- TOC entry 64 (OID 536377)
824 -- Name: hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
827 ALTER TABLE ONLY hosts
828 ADD CONSTRAINT hosts_pkey PRIMARY KEY (id);
832 -- TOC entry 68 (OID 537158)
833 -- Name: images_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
836 ALTER TABLE ONLY images
837 ADD CONSTRAINT images_pkey PRIMARY KEY (id);
841 -- TOC entry 70 (OID 537173)
842 -- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
845 ALTER TABLE ONLY files
846 ADD CONSTRAINT files_pkey PRIMARY KEY (id);
850 -- TOC entry 73 (OID 540825)
851 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
854 ALTER TABLE ONLY users
855 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
859 -- TOC entry 77 (OID 542611)
860 -- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
863 ALTER TABLE ONLY contacts
864 ADD CONSTRAINT contacts_pkey PRIMARY KEY (id);
868 -- TOC entry 84 (OID 547945)
869 -- Name: templates_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
872 ALTER TABLE ONLY templates
873 ADD CONSTRAINT templates_pkey PRIMARY KEY (id);
877 -- TOC entry 89 (OID 551681)
878 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
881 ALTER TABLE ONLY messages
882 ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
886 -- TOC entry 90 (OID 607081)
887 -- Name: powered_by_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
890 ALTER TABLE ONLY powered_by
891 ADD CONSTRAINT powered_by_pkey PRIMARY KEY (id);
895 -- TOC entry 91 (OID 607141)
896 -- Name: pending_email_changes_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
899 ALTER TABLE ONLY pending_email_changes
900 ADD CONSTRAINT pending_email_changes_pkey PRIMARY KEY ("key");
904 -- TOC entry 96 (OID 536029)
905 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
908 ALTER TABLE ONLY contents
909 ADD CONSTRAINT "$1" FOREIGN KEY (pageid) REFERENCES pages(id);
913 -- TOC entry 100 (OID 536384)
914 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
917 ALTER TABLE ONLY hostnames
918 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
922 -- TOC entry 97 (OID 536394)
923 -- Name: hosts_hostname_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
926 ALTER TABLE ONLY hosts
927 ADD CONSTRAINT hosts_hostname_cn FOREIGN KEY (id, canonical_hostname) REFERENCES hostnames(hostid, name) DEFERRABLE;
931 -- TOC entry 92 (OID 536404)
932 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
935 ALTER TABLE ONLY pages
936 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
940 -- TOC entry 101 (OID 537160)
941 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
944 ALTER TABLE ONLY images
945 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
949 -- TOC entry 102 (OID 537175)
950 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
953 ALTER TABLE ONLY files
954 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
958 -- TOC entry 93 (OID 539155)
959 -- Name: pages_redirect_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
962 ALTER TABLE ONLY pages
963 ADD CONSTRAINT pages_redirect_cn FOREIGN KEY (hostid, redirect) REFERENCES pages(hostid, url) DEFERRABLE;
967 -- TOC entry 103 (OID 540827)
968 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
971 ALTER TABLE ONLY users
972 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
976 -- TOC entry 104 (OID 540837)
977 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
980 ALTER TABLE ONLY usercookies
981 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
985 -- TOC entry 94 (OID 540942)
986 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
989 ALTER TABLE ONLY pages
990 ADD CONSTRAINT "$2" FOREIGN KEY (logged_user) REFERENCES users(id);
994 -- TOC entry 95 (OID 540947)
995 -- Name: pages_user_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
998 ALTER TABLE ONLY pages
999 ADD CONSTRAINT pages_user_cn FOREIGN KEY (hostid, logged_user) REFERENCES users(hostid, id);
1003 -- TOC entry 105 (OID 540966)
1004 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1007 ALTER TABLE ONLY sitemenu
1008 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1012 -- TOC entry 106 (OID 540972)
1013 -- Name: sitemenu_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1016 ALTER TABLE ONLY sitemenu
1017 ADD CONSTRAINT sitemenu_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1021 -- TOC entry 107 (OID 542613)
1022 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1025 ALTER TABLE ONLY contacts
1026 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1030 -- TOC entry 108 (OID 542622)
1031 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1034 ALTER TABLE ONLY contact_emails
1035 ADD CONSTRAINT "$1" FOREIGN KEY (contactid) REFERENCES contacts(id);
1039 -- TOC entry 98 (OID 543506)
1040 -- Name: hosts_theme_css_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1043 ALTER TABLE ONLY hosts
1044 ADD CONSTRAINT hosts_theme_css_cn FOREIGN KEY (theme_css) REFERENCES themes(theme_css);
1048 -- TOC entry 109 (OID 543759)
1049 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1052 ALTER TABLE ONLY page_emails
1053 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1057 -- TOC entry 110 (OID 543764)
1058 -- Name: page_emails_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1061 ALTER TABLE ONLY page_emails
1062 ADD CONSTRAINT page_emails_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1066 -- TOC entry 111 (OID 543791)
1067 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1070 ALTER TABLE ONLY mailing_lists
1071 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1075 -- TOC entry 112 (OID 544450)
1076 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1079 ALTER TABLE ONLY links
1080 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1084 -- TOC entry 113 (OID 544455)
1085 -- Name: links_from_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1088 ALTER TABLE ONLY links
1089 ADD CONSTRAINT links_from_cn FOREIGN KEY (hostid, from_url) REFERENCES pages(hostid, url) DEFERRABLE;
1093 -- TOC entry 114 (OID 551129)
1094 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1097 ALTER TABLE ONLY recently_visited
1098 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
1102 -- TOC entry 115 (OID 551133)
1103 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
1106 ALTER TABLE ONLY recently_visited
1107 ADD CONSTRAINT "$2" FOREIGN KEY (hostid) REFERENCES hosts(id);
1111 -- TOC entry 116 (OID 551137)
1112 -- Name: recently_visited_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1115 ALTER TABLE ONLY recently_visited
1116 ADD CONSTRAINT recently_visited_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1120 -- TOC entry 117 (OID 551141)
1121 -- Name: recently_visited_userid_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1124 ALTER TABLE ONLY recently_visited
1125 ADD CONSTRAINT recently_visited_userid_cn FOREIGN KEY (hostid, userid) REFERENCES users(hostid, id);
1129 -- TOC entry 119 (OID 551690)
1130 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1133 ALTER TABLE ONLY msg_references
1134 ADD CONSTRAINT "$1" FOREIGN KEY (message_id) REFERENCES messages(id);
1138 -- TOC entry 118 (OID 551694)
1139 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1142 ALTER TABLE ONLY messages
1143 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1147 -- TOC entry 99 (OID 607083)
1148 -- Name: hosts_powered_by_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1151 ALTER TABLE ONLY hosts
1152 ADD CONSTRAINT hosts_powered_by_cn FOREIGN KEY (powered_by) REFERENCES powered_by(id);
1156 -- TOC entry 120 (OID 607143)
1157 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1160 ALTER TABLE ONLY pending_email_changes
1161 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
1165 -- TOC entry 3 (OID 2200)
1166 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
1169 COMMENT ON SCHEMA public IS 'Standard public namespace';
1173 -- TOC entry 30 (OID 543592)
1174 -- Name: TABLE server_settings; Type: COMMENT; Schema: public; Owner: rich
1177 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.';
1181 -- PostgreSQL database dump
1184 SET client_encoding = 'UNICODE';
1185 SET check_function_bodies = false;
1187 SET search_path = public, pg_catalog;
1190 -- Data for TOC entry 3 (OID 547939)
1191 -- Name: templates; Type: TABLE DATA; Schema: public; Owner: rich
1194 COPY templates (id, title_regexp, url_regexp, extension, ordering) FROM stdin;
1195 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
1196 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
1197 4 ^(199[0-9]|20[0-9][0-9])$ ^(199[0-9]|20[0-9][0-9])$ calendar 30
1202 -- TOC entry 2 (OID 547937)
1203 -- Name: templates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: rich
1206 SELECT pg_catalog.setval('templates_id_seq', 4, true);
1210 -- PostgreSQL database dump
1213 SET client_encoding = 'UNICODE';
1214 SET check_function_bodies = false;
1216 SET search_path = public, pg_catalog;
1219 -- Data for TOC entry 2 (OID 543499)
1220 -- Name: themes; Type: TABLE DATA; Schema: public; Owner: rich
1223 COPY themes (theme_css, name, description) FROM stdin;
1224 /_css/easyweb.css Merjis Easy Web Marketing This is the easy web marketing stylesheet developed by Merjis Ltd. Please see http://www.merjis.com/
1225 /_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.