+
+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)