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
274 -- TOC entry 20 (OID 540816)
275 -- Name: users; Type: ACL; Schema: public; Owner: rich
278 REVOKE ALL ON TABLE users FROM PUBLIC;
279 GRANT ALL ON TABLE users TO "www-data";
283 -- TOC entry 53 (OID 540816)
284 -- Name: users_id_seq; Type: ACL; Schema: public; Owner: rich
287 REVOKE ALL ON TABLE users_id_seq FROM PUBLIC;
288 GRANT ALL ON TABLE users_id_seq TO "www-data";
292 -- TOC entry 21 (OID 540832)
293 -- Name: usercookies; Type: TABLE; Schema: public; Owner: rich
296 CREATE TABLE usercookies (
297 userid integer NOT NULL,
303 -- TOC entry 22 (OID 540832)
304 -- Name: usercookies; Type: ACL; Schema: public; Owner: rich
307 REVOKE ALL ON TABLE usercookies FROM PUBLIC;
308 GRANT ALL ON TABLE usercookies TO "www-data";
312 -- TOC entry 23 (OID 540961)
313 -- Name: sitemenu; Type: TABLE; Schema: public; Owner: rich
316 CREATE TABLE sitemenu (
317 hostid integer NOT NULL,
320 ordering integer NOT NULL
325 -- TOC entry 24 (OID 540961)
326 -- Name: sitemenu; Type: ACL; Schema: public; Owner: rich
329 REVOKE ALL ON TABLE sitemenu FROM PUBLIC;
330 GRANT ALL ON TABLE sitemenu TO "www-data";
334 -- TOC entry 25 (OID 542605)
335 -- Name: contacts; Type: TABLE; Schema: public; Owner: rich
338 CREATE TABLE contacts (
340 hostid integer NOT NULL,
342 subject text NOT NULL
347 -- TOC entry 26 (OID 542605)
348 -- Name: contacts; Type: ACL; Schema: public; Owner: rich
351 REVOKE ALL ON TABLE contacts FROM PUBLIC;
352 GRANT ALL ON TABLE contacts TO "www-data";
356 -- TOC entry 54 (OID 542605)
357 -- Name: contacts_id_seq; Type: ACL; Schema: public; Owner: rich
360 REVOKE ALL ON TABLE contacts_id_seq FROM PUBLIC;
361 GRANT ALL ON TABLE contacts_id_seq TO "www-data";
365 -- TOC entry 27 (OID 542617)
366 -- Name: contact_emails; Type: TABLE; Schema: public; Owner: rich
369 CREATE TABLE contact_emails (
370 contactid integer NOT NULL,
376 -- TOC entry 28 (OID 542617)
377 -- Name: contact_emails; Type: ACL; Schema: public; Owner: rich
380 REVOKE ALL ON TABLE contact_emails FROM PUBLIC;
381 GRANT ALL ON TABLE contact_emails TO "www-data";
385 -- TOC entry 29 (OID 543499)
386 -- Name: themes; Type: TABLE; Schema: public; Owner: rich
389 CREATE TABLE themes (
390 theme_css text NOT NULL,
392 description text NOT NULL
397 -- TOC entry 30 (OID 543499)
398 -- Name: themes; Type: ACL; Schema: public; Owner: rich
401 REVOKE ALL ON TABLE themes FROM PUBLIC;
402 GRANT SELECT ON TABLE themes TO "www-data";
406 -- TOC entry 31 (OID 543592)
407 -- Name: server_settings; Type: TABLE; Schema: public; Owner: rich
410 CREATE TABLE server_settings (
411 "version" integer NOT NULL,
418 -- TOC entry 33 (OID 543592)
419 -- Name: server_settings; Type: ACL; Schema: public; Owner: rich
422 REVOKE ALL ON TABLE server_settings FROM PUBLIC;
423 GRANT SELECT ON TABLE server_settings TO "www-data";
427 -- TOC entry 34 (OID 543754)
428 -- Name: page_emails; Type: TABLE; Schema: public; Owner: rich
431 CREATE TABLE page_emails (
432 hostid integer NOT NULL,
435 entry_date date DEFAULT ('now'::text)::date NOT NULL,
436 last_sent date DEFAULT ('now'::text)::date NOT NULL,
438 opt_out text NOT NULL
443 -- TOC entry 35 (OID 543754)
444 -- Name: page_emails; Type: ACL; Schema: public; Owner: rich
447 REVOKE ALL ON TABLE page_emails FROM PUBLIC;
448 GRANT ALL ON TABLE page_emails TO "www-data";
452 -- TOC entry 36 (OID 543785)
453 -- Name: mailing_lists; Type: TABLE; Schema: public; Owner: rich
456 CREATE TABLE mailing_lists (
457 hostid integer NOT NULL,
459 entry_date date DEFAULT ('now'::text)::date NOT NULL,
461 opt_out text NOT NULL,
467 -- TOC entry 37 (OID 543785)
468 -- Name: mailing_lists; Type: ACL; Schema: public; Owner: rich
471 REVOKE ALL ON TABLE mailing_lists FROM PUBLIC;
472 GRANT ALL ON TABLE mailing_lists TO "www-data";
476 -- TOC entry 38 (OID 544445)
477 -- Name: links; Type: TABLE; Schema: public; Owner: rich
481 hostid integer NOT NULL,
482 from_url text NOT NULL,
483 to_url text NOT NULL,
484 CONSTRAINT links_not_selfref_cn CHECK ((from_url <> to_url))
489 -- TOC entry 39 (OID 544445)
490 -- Name: links; Type: ACL; Schema: public; Owner: rich
493 REVOKE ALL ON TABLE links FROM PUBLIC;
494 GRANT ALL ON TABLE links TO "www-data";
498 -- TOC entry 40 (OID 547939)
499 -- Name: templates; Type: TABLE; Schema: public; Owner: rich
502 CREATE TABLE templates (
504 title_regexp text NOT NULL,
505 url_regexp text NOT NULL,
506 extension text NOT NULL,
507 ordering integer NOT NULL
512 -- TOC entry 41 (OID 547939)
513 -- Name: templates; Type: ACL; Schema: public; Owner: rich
516 REVOKE ALL ON TABLE templates FROM PUBLIC;
517 GRANT SELECT ON TABLE templates TO "www-data";
521 -- TOC entry 55 (OID 547939)
522 -- Name: templates_id_seq; Type: ACL; Schema: public; Owner: rich
525 REVOKE ALL ON TABLE templates_id_seq FROM PUBLIC;
529 -- TOC entry 42 (OID 551123)
530 -- Name: recently_visited; Type: TABLE; Schema: public; Owner: rich
533 CREATE TABLE recently_visited (
534 userid integer NOT NULL,
535 hostid integer NOT NULL,
537 visit_time timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
542 -- TOC entry 43 (OID 551123)
543 -- Name: recently_visited; Type: ACL; Schema: public; Owner: rich
546 REVOKE ALL ON TABLE recently_visited FROM PUBLIC;
547 GRANT ALL ON TABLE recently_visited TO "www-data";
551 -- TOC entry 44 (OID 551675)
552 -- Name: messages; Type: TABLE; Schema: public; Owner: rich
555 CREATE TABLE messages (
557 subject text NOT NULL,
558 inet_message_id text NOT NULL,
559 message_date timestamp with time zone NOT NULL,
560 hostid integer NOT NULL
565 -- TOC entry 45 (OID 551675)
566 -- Name: messages; Type: ACL; Schema: public; Owner: rich
569 REVOKE ALL ON TABLE messages FROM PUBLIC;
570 GRANT ALL ON TABLE messages TO "www-data";
574 -- TOC entry 56 (OID 551675)
575 -- Name: messages_id_seq; Type: ACL; Schema: public; Owner: rich
578 REVOKE ALL ON TABLE messages_id_seq FROM PUBLIC;
579 GRANT ALL ON TABLE messages_id_seq TO "www-data";
583 -- TOC entry 46 (OID 551685)
584 -- Name: msg_references; Type: TABLE; Schema: public; Owner: rich
587 CREATE TABLE msg_references (
588 message_id integer NOT NULL,
589 inet_message_id text NOT NULL,
590 ordering integer NOT NULL
595 -- TOC entry 47 (OID 551685)
596 -- Name: msg_references; Type: ACL; Schema: public; Owner: rich
599 REVOKE ALL ON TABLE msg_references FROM PUBLIC;
600 GRANT ALL ON TABLE msg_references TO "www-data";
604 -- TOC entry 61 (OID 536388)
605 -- Name: hostnames_hostid_name_uq; Type: INDEX; Schema: public; Owner: rich
608 CREATE UNIQUE INDEX hostnames_hostid_name_uq ON hostnames USING btree (hostid, name);
612 -- TOC entry 62 (OID 536389)
613 -- Name: hostnams_name_uq; Type: INDEX; Schema: public; Owner: rich
616 CREATE UNIQUE INDEX hostnams_name_uq ON hostnames USING btree (name);
620 -- TOC entry 58 (OID 536419)
621 -- Name: pages_url_uq; Type: INDEX; Schema: public; Owner: rich
624 CREATE UNIQUE INDEX pages_url_uq ON pages USING btree (hostid, url);
628 -- TOC entry 63 (OID 536924)
629 -- Name: email_notify_email_uq; Type: INDEX; Schema: public; Owner: rich
632 CREATE UNIQUE INDEX email_notify_email_uq ON email_notify USING btree (hostid, email);
636 -- TOC entry 64 (OID 540251)
637 -- Name: images_name_uq; Type: INDEX; Schema: public; Owner: rich
640 CREATE UNIQUE INDEX images_name_uq ON images USING btree (hostid, name);
644 -- TOC entry 66 (OID 540252)
645 -- Name: files_name_uq; Type: INDEX; Schema: public; Owner: rich
648 CREATE UNIQUE INDEX files_name_uq ON files USING btree (hostid, name);
652 -- TOC entry 69 (OID 540831)
653 -- Name: users_name_uq; Type: INDEX; Schema: public; Owner: rich
656 CREATE UNIQUE INDEX users_name_uq ON users USING btree (hostid, name);
660 -- TOC entry 68 (OID 540946)
661 -- Name: users_id_uq; Type: INDEX; Schema: public; Owner: rich
664 CREATE UNIQUE INDEX users_id_uq ON users USING btree (hostid, id);
668 -- TOC entry 71 (OID 540970)
669 -- Name: sitemenu_ordering_uq; Type: INDEX; Schema: public; Owner: rich
672 CREATE UNIQUE INDEX sitemenu_ordering_uq ON sitemenu USING btree (hostid, ordering);
676 -- TOC entry 72 (OID 540971)
677 -- Name: sitemenu_url_uq; Type: INDEX; Schema: public; Owner: rich
680 CREATE UNIQUE INDEX sitemenu_url_uq ON sitemenu USING btree (hostid, url);
684 -- TOC entry 75 (OID 542626)
685 -- Name: contact_emails_uq; Type: INDEX; Schema: public; Owner: rich
688 CREATE UNIQUE INDEX contact_emails_uq ON contact_emails USING btree (contactid, email);
692 -- TOC entry 76 (OID 543505)
693 -- Name: themes_theme_css_uq; Type: INDEX; Schema: public; Owner: rich
696 CREATE UNIQUE INDEX themes_theme_css_uq ON themes USING btree (theme_css);
700 -- TOC entry 77 (OID 543763)
701 -- Name: page_emails_email_uq; Type: INDEX; Schema: public; Owner: rich
704 CREATE UNIQUE INDEX page_emails_email_uq ON page_emails USING btree (hostid, url, email);
708 -- TOC entry 78 (OID 543795)
709 -- Name: mailing_lists_email_uq; Type: INDEX; Schema: public; Owner: rich
712 CREATE UNIQUE INDEX mailing_lists_email_uq ON mailing_lists USING btree (hostid, email);
716 -- TOC entry 73 (OID 543880)
717 -- Name: contacts_name_uq; Type: INDEX; Schema: public; Owner: rich
720 CREATE UNIQUE INDEX contacts_name_uq ON contacts USING btree (hostid, name);
724 -- TOC entry 79 (OID 544454)
725 -- Name: links_uq; Type: INDEX; Schema: public; Owner: rich
728 CREATE UNIQUE INDEX links_uq ON links USING btree (hostid, from_url, to_url);
732 -- TOC entry 80 (OID 547951)
733 -- Name: templates_ext_ord_uq; Type: INDEX; Schema: public; Owner: rich
736 CREATE UNIQUE INDEX templates_ext_ord_uq ON templates USING btree (extension, ordering);
740 -- TOC entry 82 (OID 547952)
741 -- Name: templates_title_uq; Type: INDEX; Schema: public; Owner: rich
744 CREATE UNIQUE INDEX templates_title_uq ON templates USING btree (title_regexp);
748 -- TOC entry 83 (OID 547953)
749 -- Name: templates_url_uq; Type: INDEX; Schema: public; Owner: rich
752 CREATE UNIQUE INDEX templates_url_uq ON templates USING btree (url_regexp);
756 -- TOC entry 84 (OID 551151)
757 -- Name: recently_visited_uq; Type: INDEX; Schema: public; Owner: rich
760 CREATE UNIQUE INDEX recently_visited_uq ON recently_visited USING btree (userid, hostid, url);
764 -- TOC entry 85 (OID 552155)
765 -- Name: messages_inet_message_id_uq; Type: INDEX; Schema: public; Owner: rich
768 CREATE UNIQUE INDEX messages_inet_message_id_uq ON messages USING btree (hostid, inet_message_id);
772 -- TOC entry 57 (OID 536012)
773 -- Name: pages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
776 ALTER TABLE ONLY pages
777 ADD CONSTRAINT pages_pkey PRIMARY KEY (id);
781 -- TOC entry 59 (OID 536027)
782 -- Name: contents_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
785 ALTER TABLE ONLY contents
786 ADD CONSTRAINT contents_pkey PRIMARY KEY (id);
790 -- TOC entry 60 (OID 536377)
791 -- Name: hosts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
794 ALTER TABLE ONLY hosts
795 ADD CONSTRAINT hosts_pkey PRIMARY KEY (id);
799 -- TOC entry 65 (OID 537158)
800 -- Name: images_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
803 ALTER TABLE ONLY images
804 ADD CONSTRAINT images_pkey PRIMARY KEY (id);
808 -- TOC entry 67 (OID 537173)
809 -- Name: files_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
812 ALTER TABLE ONLY files
813 ADD CONSTRAINT files_pkey PRIMARY KEY (id);
817 -- TOC entry 70 (OID 540825)
818 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
821 ALTER TABLE ONLY users
822 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
826 -- TOC entry 74 (OID 542611)
827 -- Name: contacts_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
830 ALTER TABLE ONLY contacts
831 ADD CONSTRAINT contacts_pkey PRIMARY KEY (id);
835 -- TOC entry 81 (OID 547945)
836 -- Name: templates_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
839 ALTER TABLE ONLY templates
840 ADD CONSTRAINT templates_pkey PRIMARY KEY (id);
844 -- TOC entry 86 (OID 551681)
845 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: rich
848 ALTER TABLE ONLY messages
849 ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
853 -- TOC entry 91 (OID 536029)
854 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
857 ALTER TABLE ONLY contents
858 ADD CONSTRAINT "$1" FOREIGN KEY (pageid) REFERENCES pages(id);
862 -- TOC entry 94 (OID 536384)
863 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
866 ALTER TABLE ONLY hostnames
867 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
871 -- TOC entry 92 (OID 536394)
872 -- Name: hosts_hostname_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
875 ALTER TABLE ONLY hosts
876 ADD CONSTRAINT hosts_hostname_cn FOREIGN KEY (id, canonical_hostname) REFERENCES hostnames(hostid, name) DEFERRABLE;
880 -- TOC entry 87 (OID 536404)
881 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
884 ALTER TABLE ONLY pages
885 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
889 -- TOC entry 95 (OID 536920)
890 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
893 ALTER TABLE ONLY email_notify
894 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
898 -- TOC entry 96 (OID 537160)
899 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
902 ALTER TABLE ONLY images
903 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
907 -- TOC entry 97 (OID 537175)
908 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
911 ALTER TABLE ONLY files
912 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
916 -- TOC entry 88 (OID 539155)
917 -- Name: pages_redirect_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
920 ALTER TABLE ONLY pages
921 ADD CONSTRAINT pages_redirect_cn FOREIGN KEY (hostid, redirect) REFERENCES pages(hostid, url) DEFERRABLE;
925 -- TOC entry 98 (OID 540827)
926 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
929 ALTER TABLE ONLY users
930 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
934 -- TOC entry 99 (OID 540837)
935 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
938 ALTER TABLE ONLY usercookies
939 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
943 -- TOC entry 89 (OID 540942)
944 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
947 ALTER TABLE ONLY pages
948 ADD CONSTRAINT "$2" FOREIGN KEY (logged_user) REFERENCES users(id);
952 -- TOC entry 90 (OID 540947)
953 -- Name: pages_user_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
956 ALTER TABLE ONLY pages
957 ADD CONSTRAINT pages_user_cn FOREIGN KEY (hostid, logged_user) REFERENCES users(hostid, id);
961 -- TOC entry 100 (OID 540966)
962 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
965 ALTER TABLE ONLY sitemenu
966 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
970 -- TOC entry 101 (OID 540972)
971 -- Name: sitemenu_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
974 ALTER TABLE ONLY sitemenu
975 ADD CONSTRAINT sitemenu_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
979 -- TOC entry 102 (OID 542613)
980 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
983 ALTER TABLE ONLY contacts
984 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
988 -- TOC entry 103 (OID 542622)
989 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
992 ALTER TABLE ONLY contact_emails
993 ADD CONSTRAINT "$1" FOREIGN KEY (contactid) REFERENCES contacts(id);
997 -- TOC entry 93 (OID 543506)
998 -- Name: hosts_theme_css_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1001 ALTER TABLE ONLY hosts
1002 ADD CONSTRAINT hosts_theme_css_cn FOREIGN KEY (theme_css) REFERENCES themes(theme_css);
1006 -- TOC entry 104 (OID 543759)
1007 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1010 ALTER TABLE ONLY page_emails
1011 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1015 -- TOC entry 105 (OID 543764)
1016 -- Name: page_emails_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1019 ALTER TABLE ONLY page_emails
1020 ADD CONSTRAINT page_emails_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1024 -- TOC entry 106 (OID 543791)
1025 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1028 ALTER TABLE ONLY mailing_lists
1029 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1033 -- TOC entry 107 (OID 544450)
1034 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1037 ALTER TABLE ONLY links
1038 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1042 -- TOC entry 108 (OID 544455)
1043 -- Name: links_from_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1046 ALTER TABLE ONLY links
1047 ADD CONSTRAINT links_from_cn FOREIGN KEY (hostid, from_url) REFERENCES pages(hostid, url) DEFERRABLE;
1051 -- TOC entry 109 (OID 551129)
1052 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1055 ALTER TABLE ONLY recently_visited
1056 ADD CONSTRAINT "$1" FOREIGN KEY (userid) REFERENCES users(id);
1060 -- TOC entry 110 (OID 551133)
1061 -- Name: $2; Type: FK CONSTRAINT; Schema: public; Owner: rich
1064 ALTER TABLE ONLY recently_visited
1065 ADD CONSTRAINT "$2" FOREIGN KEY (hostid) REFERENCES hosts(id);
1069 -- TOC entry 111 (OID 551137)
1070 -- Name: recently_visited_url_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1073 ALTER TABLE ONLY recently_visited
1074 ADD CONSTRAINT recently_visited_url_cn FOREIGN KEY (hostid, url) REFERENCES pages(hostid, url) DEFERRABLE;
1078 -- TOC entry 112 (OID 551141)
1079 -- Name: recently_visited_userid_cn; Type: FK CONSTRAINT; Schema: public; Owner: rich
1082 ALTER TABLE ONLY recently_visited
1083 ADD CONSTRAINT recently_visited_userid_cn FOREIGN KEY (hostid, userid) REFERENCES users(hostid, id);
1087 -- TOC entry 114 (OID 551690)
1088 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1091 ALTER TABLE ONLY msg_references
1092 ADD CONSTRAINT "$1" FOREIGN KEY (message_id) REFERENCES messages(id);
1096 -- TOC entry 113 (OID 551694)
1097 -- Name: $1; Type: FK CONSTRAINT; Schema: public; Owner: rich
1100 ALTER TABLE ONLY messages
1101 ADD CONSTRAINT "$1" FOREIGN KEY (hostid) REFERENCES hosts(id);
1105 -- TOC entry 3 (OID 2200)
1106 -- Name: SCHEMA public; Type: COMMENT; Schema: -; Owner: postgres
1109 COMMENT ON SCHEMA public IS 'Standard public namespace';
1113 -- TOC entry 32 (OID 543592)
1114 -- Name: TABLE server_settings; Type: COMMENT; Schema: public; Owner: rich
1117 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.';
1121 -- PostgreSQL database dump
1124 SET client_encoding = 'UNICODE';
1125 SET check_function_bodies = false;
1127 SET search_path = public, pg_catalog;
1130 -- Data for TOC entry 3 (OID 547939)
1131 -- Name: templates; Type: TABLE DATA; Schema: public; Owner: rich
1134 COPY templates (id, title_regexp, url_regexp, extension, ordering) FROM stdin;
1135 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
1136 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
1137 4 ^(199[0-9]|20[0-9][0-9])$ ^(199[0-9]|20[0-9][0-9])$ calendar 30
1142 -- TOC entry 2 (OID 547937)
1143 -- Name: templates_id_seq; Type: SEQUENCE SET; Schema: public; Owner: rich
1146 SELECT pg_catalog.setval('templates_id_seq', 4, true);
1150 -- PostgreSQL database dump
1153 SET client_encoding = 'UNICODE';
1154 SET check_function_bodies = false;
1156 SET search_path = public, pg_catalog;
1159 -- Data for TOC entry 2 (OID 543499)
1160 -- Name: themes; Type: TABLE DATA; Schema: public; Owner: rich
1163 COPY themes (theme_css, name, description) FROM stdin;
1164 /_css/easyweb.css Merjis Easy Web Marketing This is the easy web marketing stylesheet developed by Merjis Ltd. Please see http://www.merjis.com/