+-- TOC entry 21 (OID 540961)
+-- Name: sitemenu; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE sitemenu (
+ hostid integer NOT NULL,
+ url text NOT NULL,
+ label text NOT NULL,
+ ordering integer NOT NULL
+);
+
+
+--
+-- TOC entry 22 (OID 540961)
+-- Name: sitemenu; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE sitemenu FROM PUBLIC;
+GRANT ALL ON TABLE sitemenu TO "www-data";
+
+
+--
+-- TOC entry 23 (OID 542605)
+-- Name: contacts; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE contacts (
+ id serial NOT NULL,
+ hostid integer NOT NULL,
+ name text NOT NULL,
+ subject text NOT NULL
+);
+
+
+--
+-- TOC entry 24 (OID 542605)
+-- Name: contacts; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE contacts FROM PUBLIC;
+GRANT ALL ON TABLE contacts TO "www-data";
+
+
+--
+-- TOC entry 56 (OID 542605)
+-- Name: contacts_id_seq; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE contacts_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE contacts_id_seq TO "www-data";
+
+
+--
+-- TOC entry 25 (OID 542617)
+-- Name: contact_emails; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE contact_emails (
+ contactid integer NOT NULL,
+ email text NOT NULL
+);
+
+
+--
+-- TOC entry 26 (OID 542617)
+-- Name: contact_emails; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE contact_emails FROM PUBLIC;
+GRANT ALL ON TABLE contact_emails TO "www-data";
+
+
+--
+-- TOC entry 27 (OID 543499)
+-- Name: themes; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE themes (
+ theme_css text NOT NULL,
+ name text NOT NULL,
+ description text NOT NULL
+);
+
+
+--
+-- TOC entry 28 (OID 543499)
+-- Name: themes; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE themes FROM PUBLIC;
+GRANT SELECT ON TABLE themes TO "www-data";
+
+
+--
+-- TOC entry 29 (OID 543592)
+-- Name: server_settings; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE server_settings (
+ "version" integer NOT NULL,
+ stats_page text,
+ crash_email text
+);
+
+
+--
+-- TOC entry 31 (OID 543592)
+-- Name: server_settings; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE server_settings FROM PUBLIC;
+GRANT SELECT ON TABLE server_settings TO "www-data";
+
+
+--
+-- TOC entry 32 (OID 543754)
+-- Name: page_emails; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE page_emails (
+ hostid integer NOT NULL,
+ url text NOT NULL,
+ email text NOT NULL,
+ entry_date date DEFAULT ('now'::text)::date NOT NULL,
+ last_sent date DEFAULT ('now'::text)::date NOT NULL,
+ pending text,
+ opt_out text NOT NULL
+);
+
+
+--
+-- TOC entry 33 (OID 543754)
+-- Name: page_emails; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE page_emails FROM PUBLIC;
+GRANT ALL ON TABLE page_emails TO "www-data";
+
+
+--
+-- TOC entry 34 (OID 543785)
+-- Name: mailing_lists; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE mailing_lists (
+ hostid integer NOT NULL,
+ email text NOT NULL,
+ entry_date date DEFAULT ('now'::text)::date NOT NULL,
+ pending text,
+ opt_out text NOT NULL,
+ name text NOT NULL
+);
+
+
+--
+-- TOC entry 35 (OID 543785)
+-- Name: mailing_lists; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE mailing_lists FROM PUBLIC;
+GRANT ALL ON TABLE mailing_lists TO "www-data";
+
+
+--
+-- TOC entry 36 (OID 544445)
+-- Name: links; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE links (
+ hostid integer NOT NULL,
+ from_url text NOT NULL,
+ to_url text NOT NULL,
+ CONSTRAINT links_not_selfref_cn CHECK ((from_url <> to_url))
+);
+
+
+--
+-- TOC entry 37 (OID 544445)
+-- Name: links; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE links FROM PUBLIC;
+GRANT ALL ON TABLE links TO "www-data";
+
+
+--
+-- TOC entry 38 (OID 547939)
+-- Name: templates; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE templates (
+ id serial NOT NULL,
+ title_regexp text NOT NULL,
+ url_regexp text NOT NULL,
+ extension text NOT NULL,
+ ordering integer NOT NULL
+);
+
+
+--
+-- TOC entry 39 (OID 547939)
+-- Name: templates; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE templates FROM PUBLIC;
+GRANT SELECT ON TABLE templates TO "www-data";
+
+
+--
+-- TOC entry 57 (OID 547939)
+-- Name: templates_id_seq; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE templates_id_seq FROM PUBLIC;
+
+
+--
+-- TOC entry 40 (OID 551123)
+-- Name: recently_visited; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE recently_visited (
+ userid integer NOT NULL,
+ hostid integer NOT NULL,
+ url text NOT NULL,
+ visit_time timestamp without time zone DEFAULT ('now'::text)::timestamp(6) with time zone NOT NULL
+);
+
+
+--
+-- TOC entry 41 (OID 551123)
+-- Name: recently_visited; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE recently_visited FROM PUBLIC;
+GRANT ALL ON TABLE recently_visited TO "www-data";
+
+
+--
+-- TOC entry 42 (OID 551675)
+-- Name: messages; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE messages (
+ id serial NOT NULL,
+ subject text NOT NULL,
+ inet_message_id text NOT NULL,
+ message_date timestamp with time zone NOT NULL,
+ hostid integer NOT NULL
+);
+
+
+--
+-- TOC entry 43 (OID 551675)
+-- Name: messages; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE messages FROM PUBLIC;
+GRANT ALL ON TABLE messages TO "www-data";
+
+
+--
+-- TOC entry 58 (OID 551675)
+-- Name: messages_id_seq; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE messages_id_seq FROM PUBLIC;
+GRANT ALL ON TABLE messages_id_seq TO "www-data";
+
+
+--
+-- TOC entry 44 (OID 551685)
+-- Name: msg_references; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE msg_references (
+ message_id integer NOT NULL,
+ inet_message_id text NOT NULL,
+ ordering integer NOT NULL
+);
+
+
+--
+-- TOC entry 45 (OID 551685)
+-- Name: msg_references; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE msg_references FROM PUBLIC;
+GRANT ALL ON TABLE msg_references TO "www-data";
+
+
+--
+-- TOC entry 46 (OID 607075)
+-- Name: powered_by; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE powered_by (
+ id serial NOT NULL,
+ name text NOT NULL,
+ url text NOT NULL
+);
+
+
+--
+-- TOC entry 47 (OID 607075)
+-- Name: powered_by; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE powered_by FROM PUBLIC;
+GRANT SELECT ON TABLE powered_by TO "www-data";
+
+
+--
+-- TOC entry 48 (OID 607136)
+-- Name: pending_email_changes; Type: TABLE; Schema: public; Owner: rich
+--
+
+CREATE TABLE pending_email_changes (
+ "key" text NOT NULL,
+ change_date date DEFAULT ('now'::text)::date NOT NULL,
+ userid integer NOT NULL,
+ email text NOT NULL
+);
+
+
+--
+-- TOC entry 49 (OID 607136)
+-- Name: pending_email_changes; Type: ACL; Schema: public; Owner: rich
+--
+
+REVOKE ALL ON TABLE pending_email_changes FROM PUBLIC;
+GRANT ALL ON TABLE pending_email_changes TO "www-data";
+
+
+--
+-- TOC entry 65 (OID 536388)