     ip_address character varying(255) DEFAULT NULL::character varying,
     canonical_host_id integer
 );
+
+
+--
+-- Name: hmrc_all_hits; Type: MATERIALIZED VIEW; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE MATERIALIZED VIEW hmrc_all_hits AS
+ SELECT hits.path,
+    sum(hits.count) AS count,
+    hits.http_status,
+    min(hits.mapping_id) AS mapping_id,
+    min(hits.host_id) AS host_id
+   FROM (hits
+     JOIN hosts ON ((hits.host_id = hosts.id)))
+  WHERE (hosts.site_id = 56)
+  GROUP BY hits.path, hits.http_status
+  ORDER BY sum(hits.count) DESC
+  WITH NO DATA;
+
+
+--
+-- Name: host_paths; Type: TABLE; Schema: public; Owner: -; Tablespace: 
+--
+
+CREATE TABLE host_paths (
+    id integer NOT NULL,
+    path character varying(2048) DEFAULT NULL::character varying,
+    host_id integer,
+    mapping_id integer,
+    canonical_path character varying(2048)
+);
+
+
+--
+-- Name: host_paths_id_seq; Type: SEQUENCE; Schema: public; Owner: -
+--
+
+CREATE SEQUENCE host_paths_id_seq
+    START WITH 1
+    INCREMENT BY 1
+    NO MINVALUE
+    NO MAXVALUE
+    CACHE 1;
+
+
+--
+-- Name: host_paths_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
+--
+
+ALTER SEQUENCE host_paths_id_seq OWNED BY host_paths.id;
 
 
 --

    global_redirect_append_path boolean DEFAULT false NOT NULL,
    global_type character varying(255) DEFAULT NULL::character varying,
    homepage_title character varying(255) DEFAULT NULL::character varying,
    homepage_furl character varying(255) DEFAULT NULL::character varying
);





--
-- Name: index_organisations_on_content_id; Type: INDEX; Schema: public; Owner: -; Tablespace: 
--

CREATE UNIQUE INDEX index_organisations_on_content_id ON organisations USING btree (content_id);


--
-- Name: index_organisations_on_title; Type: INDEX; Schema: public; Owner: -; Tablespace: 
--

