Skip to content

Instantly share code, notes, and snippets.

@boffbowsh
Created December 18, 2017 14:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boffbowsh/2364e15c4b4b0f7d851bc79f028080b5 to your computer and use it in GitHub Desktop.
Save boffbowsh/2364e15c4b4b0f7d851bc79f028080b5 to your computer and use it in GitHub Desktop.
--
-- PostgreSQL database dump
--
-- Dumped from database version 9.6.2
-- Dumped by pg_dump version 10.1
-- Started on 2017-12-18 13:59:03 GMT
SET statement_timeout = 0;
SET lock_timeout = 0;
SET idle_in_transaction_session_timeout = 0;
SET client_encoding = 'UTF8';
SET standard_conforming_strings = on;
SET check_function_bodies = false;
SET client_min_messages = warning;
SET row_security = off;
--
-- TOC entry 1 (class 3079 OID 13308)
-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
--
-- TOC entry 4959 (class 0 OID 0)
-- Dependencies: 1
-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
--
-- TOC entry 2 (class 3079 OID 18963)
-- Name: postgis; Type: EXTENSION; Schema: -; Owner:
--
CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
--
-- TOC entry 4960 (class 0 OID 0)
-- Dependencies: 2
-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner:
--
COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
SET search_path = public, pg_catalog;
SET default_tablespace = '';
SET default_with_oids = false;
--
-- TOC entry 201 (class 1259 OID 23031)
-- Name: account_emailaddress; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE account_emailaddress (
id integer NOT NULL,
user_id integer NOT NULL,
email character varying(254) NOT NULL,
verified boolean NOT NULL,
"primary" boolean NOT NULL
);
ALTER TABLE account_emailaddress OWNER TO electionleaflets_production;
--
-- TOC entry 202 (class 1259 OID 23034)
-- Name: account_emailaddress_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE account_emailaddress_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE account_emailaddress_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4961 (class 0 OID 0)
-- Dependencies: 202
-- Name: account_emailaddress_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE account_emailaddress_id_seq OWNED BY account_emailaddress.id;
--
-- TOC entry 203 (class 1259 OID 23036)
-- Name: account_emailconfirmation; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE account_emailconfirmation (
id integer NOT NULL,
email_address_id integer NOT NULL,
created timestamp with time zone NOT NULL,
sent timestamp with time zone,
key character varying(64) NOT NULL
);
ALTER TABLE account_emailconfirmation OWNER TO electionleaflets_production;
--
-- TOC entry 204 (class 1259 OID 23039)
-- Name: account_emailconfirmation_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE account_emailconfirmation_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE account_emailconfirmation_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4962 (class 0 OID 0)
-- Dependencies: 204
-- Name: account_emailconfirmation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE account_emailconfirmation_id_seq OWNED BY account_emailconfirmation.id;
--
-- TOC entry 205 (class 1259 OID 23041)
-- Name: analysis_leafletproperties; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE analysis_leafletproperties (
id integer NOT NULL,
created timestamp with time zone NOT NULL,
modified timestamp with time zone NOT NULL,
key character varying(100) NOT NULL,
value character varying(255) NOT NULL,
leaflet_id integer NOT NULL,
user_id integer NOT NULL
);
ALTER TABLE analysis_leafletproperties OWNER TO electionleaflets_production;
--
-- TOC entry 206 (class 1259 OID 23044)
-- Name: analysis_leafletproperties_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE analysis_leafletproperties_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE analysis_leafletproperties_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4963 (class 0 OID 0)
-- Dependencies: 206
-- Name: analysis_leafletproperties_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE analysis_leafletproperties_id_seq OWNED BY analysis_leafletproperties.id;
--
-- TOC entry 207 (class 1259 OID 23046)
-- Name: auth_group; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE auth_group (
id integer NOT NULL,
name character varying(80) NOT NULL
);
ALTER TABLE auth_group OWNER TO electionleaflets_production;
--
-- TOC entry 208 (class 1259 OID 23049)
-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE auth_group_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE auth_group_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4964 (class 0 OID 0)
-- Dependencies: 208
-- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE auth_group_id_seq OWNED BY auth_group.id;
--
-- TOC entry 209 (class 1259 OID 23051)
-- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE auth_group_permissions (
id integer NOT NULL,
group_id integer NOT NULL,
permission_id integer NOT NULL
);
ALTER TABLE auth_group_permissions OWNER TO electionleaflets_production;
--
-- TOC entry 210 (class 1259 OID 23054)
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE auth_group_permissions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE auth_group_permissions_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4965 (class 0 OID 0)
-- Dependencies: 210
-- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE auth_group_permissions_id_seq OWNED BY auth_group_permissions.id;
--
-- TOC entry 211 (class 1259 OID 23056)
-- Name: auth_permission; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE auth_permission (
id integer NOT NULL,
name character varying(255) NOT NULL,
content_type_id integer NOT NULL,
codename character varying(100) NOT NULL
);
ALTER TABLE auth_permission OWNER TO electionleaflets_production;
--
-- TOC entry 212 (class 1259 OID 23059)
-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE auth_permission_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE auth_permission_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4966 (class 0 OID 0)
-- Dependencies: 212
-- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE auth_permission_id_seq OWNED BY auth_permission.id;
--
-- TOC entry 213 (class 1259 OID 23061)
-- Name: auth_user; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE auth_user (
id integer NOT NULL,
password character varying(128) NOT NULL,
last_login timestamp with time zone,
is_superuser boolean NOT NULL,
username character varying(30) NOT NULL,
first_name character varying(30) NOT NULL,
last_name character varying(30) NOT NULL,
email character varying(254) NOT NULL,
is_staff boolean NOT NULL,
is_active boolean NOT NULL,
date_joined timestamp with time zone NOT NULL
);
ALTER TABLE auth_user OWNER TO electionleaflets_production;
--
-- TOC entry 214 (class 1259 OID 23064)
-- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE auth_user_groups (
id integer NOT NULL,
user_id integer NOT NULL,
group_id integer NOT NULL
);
ALTER TABLE auth_user_groups OWNER TO electionleaflets_production;
--
-- TOC entry 215 (class 1259 OID 23067)
-- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE auth_user_groups_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE auth_user_groups_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4967 (class 0 OID 0)
-- Dependencies: 215
-- Name: auth_user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE auth_user_groups_id_seq OWNED BY auth_user_groups.id;
--
-- TOC entry 216 (class 1259 OID 23069)
-- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE auth_user_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE auth_user_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4968 (class 0 OID 0)
-- Dependencies: 216
-- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE auth_user_id_seq OWNED BY auth_user.id;
--
-- TOC entry 217 (class 1259 OID 23071)
-- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE auth_user_user_permissions (
id integer NOT NULL,
user_id integer NOT NULL,
permission_id integer NOT NULL
);
ALTER TABLE auth_user_user_permissions OWNER TO electionleaflets_production;
--
-- TOC entry 218 (class 1259 OID 23074)
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE auth_user_user_permissions_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE auth_user_user_permissions_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4969 (class 0 OID 0)
-- Dependencies: 218
-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE auth_user_user_permissions_id_seq OWNED BY auth_user_user_permissions.id;
--
-- TOC entry 219 (class 1259 OID 23076)
-- Name: boundaries_boundary; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE boundaries_boundary (
id integer NOT NULL,
constituency_id integer NOT NULL,
boundary text NOT NULL,
zoom integer NOT NULL,
north double precision NOT NULL,
south double precision NOT NULL,
east double precision NOT NULL,
west double precision NOT NULL
);
ALTER TABLE boundaries_boundary OWNER TO electionleaflets_production;
--
-- TOC entry 220 (class 1259 OID 23082)
-- Name: boundaries_boundary_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE boundaries_boundary_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE boundaries_boundary_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4970 (class 0 OID 0)
-- Dependencies: 220
-- Name: boundaries_boundary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE boundaries_boundary_id_seq OWNED BY boundaries_boundary.id;
--
-- TOC entry 221 (class 1259 OID 23084)
-- Name: category; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE category (
id integer NOT NULL,
name character varying(765) NOT NULL,
description text NOT NULL,
default_value integer,
slug character varying(255) NOT NULL
);
ALTER TABLE category OWNER TO electionleaflets_production;
--
-- TOC entry 222 (class 1259 OID 23090)
-- Name: category_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE category_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE category_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4971 (class 0 OID 0)
-- Dependencies: 222
-- Name: category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE category_id_seq OWNED BY category.id;
--
-- TOC entry 223 (class 1259 OID 23092)
-- Name: constituencies_constituency; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE constituencies_constituency (
constituency_id character varying(10) NOT NULL,
name character varying(765) NOT NULL,
country_name character varying(255) NOT NULL,
alternative_name character varying(765) NOT NULL,
retired integer,
slug character varying(255) NOT NULL,
count integer,
wikipedia_url character varying(765) NOT NULL,
url_id character varying(300) NOT NULL,
guardian_aristotle_id integer,
guardian_pa_code integer
);
ALTER TABLE constituencies_constituency OWNER TO electionleaflets_production;
--
-- TOC entry 224 (class 1259 OID 23098)
-- Name: contentblock; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE contentblock (
id integer NOT NULL,
name character varying(64) NOT NULL,
content text NOT NULL
);
ALTER TABLE contentblock OWNER TO electionleaflets_production;
--
-- TOC entry 225 (class 1259 OID 23104)
-- Name: contentblock_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE contentblock_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE contentblock_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4972 (class 0 OID 0)
-- Dependencies: 225
-- Name: contentblock_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE contentblock_id_seq OWNED BY contentblock.id;
--
-- TOC entry 226 (class 1259 OID 23106)
-- Name: country; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE country (
country_id integer NOT NULL,
iso character varying(6) NOT NULL,
name character varying(240) NOT NULL,
iso3 character varying(9) NOT NULL
);
ALTER TABLE country OWNER TO electionleaflets_production;
--
-- TOC entry 227 (class 1259 OID 23109)
-- Name: django_admin_log; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE django_admin_log (
id integer NOT NULL,
action_time timestamp with time zone NOT NULL,
object_id text,
object_repr character varying(200) NOT NULL,
action_flag smallint NOT NULL,
change_message text NOT NULL,
content_type_id integer,
user_id integer NOT NULL,
CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0))
);
ALTER TABLE django_admin_log OWNER TO electionleaflets_production;
--
-- TOC entry 228 (class 1259 OID 23116)
-- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE django_admin_log_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE django_admin_log_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4973 (class 0 OID 0)
-- Dependencies: 228
-- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE django_admin_log_id_seq OWNED BY django_admin_log.id;
--
-- TOC entry 229 (class 1259 OID 23118)
-- Name: django_content_type; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE django_content_type (
id integer NOT NULL,
app_label character varying(100) NOT NULL,
model character varying(100) NOT NULL
);
ALTER TABLE django_content_type OWNER TO electionleaflets_production;
--
-- TOC entry 230 (class 1259 OID 23121)
-- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE django_content_type_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE django_content_type_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4974 (class 0 OID 0)
-- Dependencies: 230
-- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE django_content_type_id_seq OWNED BY django_content_type.id;
--
-- TOC entry 231 (class 1259 OID 23123)
-- Name: django_migrations; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE django_migrations (
id integer NOT NULL,
app character varying(255) NOT NULL,
name character varying(255) NOT NULL,
applied timestamp with time zone NOT NULL
);
ALTER TABLE django_migrations OWNER TO electionleaflets_production;
--
-- TOC entry 232 (class 1259 OID 23129)
-- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE django_migrations_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE django_migrations_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4975 (class 0 OID 0)
-- Dependencies: 232
-- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE django_migrations_id_seq OWNED BY django_migrations.id;
--
-- TOC entry 233 (class 1259 OID 23131)
-- Name: django_session; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE django_session (
session_key character varying(40) NOT NULL,
session_data text NOT NULL,
expire_date timestamp with time zone NOT NULL
);
ALTER TABLE django_session OWNER TO electionleaflets_production;
--
-- TOC entry 234 (class 1259 OID 23137)
-- Name: django_site; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE django_site (
id integer NOT NULL,
domain character varying(100) NOT NULL,
name character varying(50) NOT NULL
);
ALTER TABLE django_site OWNER TO electionleaflets_production;
--
-- TOC entry 235 (class 1259 OID 23140)
-- Name: django_site_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE django_site_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE django_site_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4976 (class 0 OID 0)
-- Dependencies: 235
-- Name: django_site_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE django_site_id_seq OWNED BY django_site.id;
--
-- TOC entry 236 (class 1259 OID 23142)
-- Name: djkombu_message; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE djkombu_message (
id integer NOT NULL,
visible boolean NOT NULL,
sent_at timestamp with time zone,
payload text NOT NULL,
queue_id integer NOT NULL
);
ALTER TABLE djkombu_message OWNER TO electionleaflets_production;
--
-- TOC entry 237 (class 1259 OID 23148)
-- Name: djkombu_message_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE djkombu_message_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE djkombu_message_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4977 (class 0 OID 0)
-- Dependencies: 237
-- Name: djkombu_message_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE djkombu_message_id_seq OWNED BY djkombu_message.id;
--
-- TOC entry 238 (class 1259 OID 23150)
-- Name: djkombu_queue; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE djkombu_queue (
id integer NOT NULL,
name character varying(200) NOT NULL
);
ALTER TABLE djkombu_queue OWNER TO electionleaflets_production;
--
-- TOC entry 239 (class 1259 OID 23153)
-- Name: djkombu_queue_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE djkombu_queue_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE djkombu_queue_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4978 (class 0 OID 0)
-- Dependencies: 239
-- Name: djkombu_queue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE djkombu_queue_id_seq OWNED BY djkombu_queue.id;
--
-- TOC entry 240 (class 1259 OID 23155)
-- Name: el_cache; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE el_cache (
cache_key character varying(255) NOT NULL,
value text NOT NULL,
expires timestamp with time zone NOT NULL
);
ALTER TABLE el_cache OWNER TO electionleaflets_production;
--
-- TOC entry 241 (class 1259 OID 23161)
-- Name: elections_election; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE elections_election (
id integer NOT NULL,
name character varying(128) NOT NULL,
description text NOT NULL,
live_date timestamp with time zone NOT NULL,
dead_date timestamp with time zone NOT NULL,
active boolean NOT NULL,
country_id integer
);
ALTER TABLE elections_election OWNER TO electionleaflets_production;
--
-- TOC entry 242 (class 1259 OID 23167)
-- Name: elections_election_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE elections_election_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE elections_election_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4979 (class 0 OID 0)
-- Dependencies: 242
-- Name: elections_election_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE elections_election_id_seq OWNED BY elections_election.id;
--
-- TOC entry 243 (class 1259 OID 23169)
-- Name: email_alert; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE email_alert (
email_alert_id integer NOT NULL,
email character varying(150) NOT NULL,
frequency_hours integer NOT NULL,
last_sent timestamp with time zone,
type character varying(150) NOT NULL,
parent_id integer NOT NULL,
activated integer,
confirm_id character varying(300) NOT NULL,
title character varying(765) NOT NULL
);
ALTER TABLE email_alert OWNER TO electionleaflets_production;
--
-- TOC entry 244 (class 1259 OID 23175)
-- Name: email_que; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE email_que (
email_que_id integer NOT NULL,
name character varying(765) NOT NULL,
email character varying(765) NOT NULL,
postcode character varying(60) NOT NULL,
delivery_date timestamp with time zone NOT NULL
);
ALTER TABLE email_que OWNER TO electionleaflets_production;
--
-- TOC entry 245 (class 1259 OID 23181)
-- Name: image_que; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE image_que (
image_que_id integer NOT NULL,
upload_key character varying(765) NOT NULL,
name character varying(300) NOT NULL,
email character varying(300) NOT NULL,
image_key character varying(765) NOT NULL,
uploaded_date timestamp with time zone NOT NULL
);
ALTER TABLE image_que OWNER TO electionleaflets_production;
--
-- TOC entry 246 (class 1259 OID 23187)
-- Name: image_que_seq; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE image_que_seq (
sequence integer NOT NULL
);
ALTER TABLE image_que_seq OWNER TO electionleaflets_production;
--
-- TOC entry 247 (class 1259 OID 23190)
-- Name: leaflets_leaflet; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE leaflets_leaflet (
id integer NOT NULL,
title character varying(765) NOT NULL,
description text,
imprint text,
postcode character varying(150) NOT NULL,
name character varying(300) NOT NULL,
email character varying(300) NOT NULL,
date_uploaded timestamp with time zone NOT NULL,
date_delivered timestamp with time zone,
constituency_id character varying(10),
publisher_party_id character varying(100),
status character varying(255),
location geometry(Point,4326),
person_id integer,
reviewed boolean NOT NULL,
election_id integer,
publisher_person_id integer
);
ALTER TABLE leaflets_leaflet OWNER TO electionleaflets_production;
--
-- TOC entry 248 (class 1259 OID 23196)
-- Name: leaflets_leaflet_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE leaflets_leaflet_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE leaflets_leaflet_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4980 (class 0 OID 0)
-- Dependencies: 248
-- Name: leaflets_leaflet_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE leaflets_leaflet_id_seq OWNED BY leaflets_leaflet.id;
--
-- TOC entry 249 (class 1259 OID 23198)
-- Name: leaflets_leafletimage; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE leaflets_leafletimage (
id integer NOT NULL,
image character varying(255) NOT NULL,
leaflet_id integer NOT NULL,
image_type character varying(255),
legacy_image_key character varying(255),
image_text text NOT NULL,
raw_image character varying(255) NOT NULL,
exif_data bytea,
orientation smallint NOT NULL,
CONSTRAINT leaflets_leafletimage_orientation_check CHECK ((orientation >= 0))
);
ALTER TABLE leaflets_leafletimage OWNER TO electionleaflets_production;
--
-- TOC entry 250 (class 1259 OID 23204)
-- Name: leaflets_leafletimage_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE leaflets_leafletimage_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE leaflets_leafletimage_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4981 (class 0 OID 0)
-- Dependencies: 250
-- Name: leaflets_leafletimage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE leaflets_leafletimage_id_seq OWNED BY leaflets_leafletimage.id;
--
-- TOC entry 251 (class 1259 OID 23206)
-- Name: party; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE party (
id integer NOT NULL,
name character varying(765) NOT NULL,
country_id integer NOT NULL,
major integer,
logo_file character varying(300) NOT NULL,
url_id character varying(765) NOT NULL,
colour character varying(18) NOT NULL,
twitter_account character varying(150) NOT NULL,
slug character varying(255) NOT NULL,
count integer NOT NULL,
popular integer NOT NULL,
force_top integer NOT NULL,
show_on_add_page boolean NOT NULL
);
ALTER TABLE party OWNER TO electionleaflets_production;
--
-- TOC entry 252 (class 1259 OID 23212)
-- Name: party_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE party_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE party_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4982 (class 0 OID 0)
-- Dependencies: 252
-- Name: party_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE party_id_seq OWNED BY party.id;
--
-- TOC entry 253 (class 1259 OID 23214)
-- Name: people_partymemberships; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE people_partymemberships (
id integer NOT NULL,
membership_start date NOT NULL,
membership_end date,
party_id character varying(100) NOT NULL,
person_id integer NOT NULL
);
ALTER TABLE people_partymemberships OWNER TO electionleaflets_production;
--
-- TOC entry 254 (class 1259 OID 23217)
-- Name: people_partymemberships_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE people_partymemberships_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE people_partymemberships_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4983 (class 0 OID 0)
-- Dependencies: 254
-- Name: people_partymemberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE people_partymemberships_id_seq OWNED BY people_partymemberships.id;
--
-- TOC entry 255 (class 1259 OID 23219)
-- Name: people_person; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE people_person (
id integer NOT NULL,
name character varying(255) NOT NULL,
remote_id character varying(255),
source_url character varying(200),
source_name character varying(100) NOT NULL,
image_url character varying(200)
);
ALTER TABLE people_person OWNER TO electionleaflets_production;
--
-- TOC entry 256 (class 1259 OID 23225)
-- Name: people_person_elections; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE people_person_elections (
id integer NOT NULL,
person_id integer NOT NULL,
election_id integer NOT NULL
);
ALTER TABLE people_person_elections OWNER TO electionleaflets_production;
--
-- TOC entry 257 (class 1259 OID 23228)
-- Name: people_person_elections_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE people_person_elections_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE people_person_elections_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4984 (class 0 OID 0)
-- Dependencies: 257
-- Name: people_person_elections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE people_person_elections_id_seq OWNED BY people_person_elections.id;
--
-- TOC entry 258 (class 1259 OID 23230)
-- Name: people_person_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE people_person_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE people_person_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4985 (class 0 OID 0)
-- Dependencies: 258
-- Name: people_person_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE people_person_id_seq OWNED BY people_person.id;
--
-- TOC entry 259 (class 1259 OID 23232)
-- Name: people_personconstituencies; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE people_personconstituencies (
id integer NOT NULL,
constituency_id character varying(10) NOT NULL,
election_id integer NOT NULL,
person_id integer NOT NULL
);
ALTER TABLE people_personconstituencies OWNER TO electionleaflets_production;
--
-- TOC entry 260 (class 1259 OID 23235)
-- Name: people_personconstituencies_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE people_personconstituencies_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE people_personconstituencies_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4986 (class 0 OID 0)
-- Dependencies: 260
-- Name: people_personconstituencies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE people_personconstituencies_id_seq OWNED BY people_personconstituencies.id;
--
-- TOC entry 261 (class 1259 OID 23237)
-- Name: promise; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE promise (
promise_id integer NOT NULL,
leaflet_id integer NOT NULL,
detail text NOT NULL
);
ALTER TABLE promise OWNER TO electionleaflets_production;
--
-- TOC entry 262 (class 1259 OID 23243)
-- Name: rate_interesting; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE rate_interesting (
rate_interesting_id integer NOT NULL,
leaflet_id integer NOT NULL,
description text NOT NULL,
user_name character varying(765) NOT NULL,
user_email character varying(765) NOT NULL
);
ALTER TABLE rate_interesting OWNER TO electionleaflets_production;
--
-- TOC entry 263 (class 1259 OID 23249)
-- Name: rate_interesting_seq; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE rate_interesting_seq (
sequence integer NOT NULL
);
ALTER TABLE rate_interesting_seq OWNER TO electionleaflets_production;
--
-- TOC entry 264 (class 1259 OID 23252)
-- Name: rate_type; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE rate_type (
rate_type_id integer NOT NULL,
left_label character varying(150) NOT NULL,
right_label character varying(150) NOT NULL
);
ALTER TABLE rate_type OWNER TO electionleaflets_production;
--
-- TOC entry 265 (class 1259 OID 23255)
-- Name: rate_value; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE rate_value (
rate_value_id integer NOT NULL,
leaflet_id integer NOT NULL,
user_name character varying(300) NOT NULL,
user_email character varying(300) NOT NULL,
rate_type_id integer NOT NULL,
value integer NOT NULL
);
ALTER TABLE rate_value OWNER TO electionleaflets_production;
--
-- TOC entry 266 (class 1259 OID 23261)
-- Name: rate_value_seq; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE rate_value_seq (
sequence integer NOT NULL
);
ALTER TABLE rate_value_seq OWNER TO electionleaflets_production;
--
-- TOC entry 267 (class 1259 OID 23264)
-- Name: socialaccount_socialaccount; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE socialaccount_socialaccount (
id integer NOT NULL,
user_id integer NOT NULL,
provider character varying(30) NOT NULL,
uid character varying(191) NOT NULL,
last_login timestamp with time zone NOT NULL,
date_joined timestamp with time zone NOT NULL,
extra_data text NOT NULL
);
ALTER TABLE socialaccount_socialaccount OWNER TO electionleaflets_production;
--
-- TOC entry 268 (class 1259 OID 23270)
-- Name: socialaccount_socialaccount_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE socialaccount_socialaccount_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE socialaccount_socialaccount_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4987 (class 0 OID 0)
-- Dependencies: 268
-- Name: socialaccount_socialaccount_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE socialaccount_socialaccount_id_seq OWNED BY socialaccount_socialaccount.id;
--
-- TOC entry 269 (class 1259 OID 23272)
-- Name: socialaccount_socialapp; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE socialaccount_socialapp (
id integer NOT NULL,
provider character varying(30) NOT NULL,
name character varying(40) NOT NULL,
client_id character varying(191) NOT NULL,
secret character varying(191) NOT NULL,
key character varying(191) NOT NULL
);
ALTER TABLE socialaccount_socialapp OWNER TO electionleaflets_production;
--
-- TOC entry 270 (class 1259 OID 23275)
-- Name: socialaccount_socialapp_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE socialaccount_socialapp_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE socialaccount_socialapp_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4988 (class 0 OID 0)
-- Dependencies: 270
-- Name: socialaccount_socialapp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE socialaccount_socialapp_id_seq OWNED BY socialaccount_socialapp.id;
--
-- TOC entry 271 (class 1259 OID 23277)
-- Name: socialaccount_socialapp_sites; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE socialaccount_socialapp_sites (
id integer NOT NULL,
socialapp_id integer NOT NULL,
site_id integer NOT NULL
);
ALTER TABLE socialaccount_socialapp_sites OWNER TO electionleaflets_production;
--
-- TOC entry 272 (class 1259 OID 23280)
-- Name: socialaccount_socialapp_sites_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE socialaccount_socialapp_sites_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE socialaccount_socialapp_sites_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4989 (class 0 OID 0)
-- Dependencies: 272
-- Name: socialaccount_socialapp_sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE socialaccount_socialapp_sites_id_seq OWNED BY socialaccount_socialapp_sites.id;
--
-- TOC entry 273 (class 1259 OID 23282)
-- Name: socialaccount_socialtoken; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE socialaccount_socialtoken (
id integer NOT NULL,
app_id integer NOT NULL,
account_id integer NOT NULL,
token text NOT NULL,
token_secret text NOT NULL,
expires_at timestamp with time zone
);
ALTER TABLE socialaccount_socialtoken OWNER TO electionleaflets_production;
--
-- TOC entry 274 (class 1259 OID 23288)
-- Name: socialaccount_socialtoken_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE socialaccount_socialtoken_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE socialaccount_socialtoken_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4990 (class 0 OID 0)
-- Dependencies: 274
-- Name: socialaccount_socialtoken_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE socialaccount_socialtoken_id_seq OWNED BY socialaccount_socialtoken.id;
--
-- TOC entry 275 (class 1259 OID 23290)
-- Name: tag; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE tag (
id integer NOT NULL,
tag character varying(765) NOT NULL,
tag_clean character varying(765) NOT NULL,
slug character varying(255) NOT NULL,
dead integer
);
ALTER TABLE tag OWNER TO electionleaflets_production;
--
-- TOC entry 276 (class 1259 OID 23296)
-- Name: tag_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE tag_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE tag_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4991 (class 0 OID 0)
-- Dependencies: 276
-- Name: tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE tag_id_seq OWNED BY tag.id;
--
-- TOC entry 277 (class 1259 OID 23298)
-- Name: thumbnail_kvstore; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE thumbnail_kvstore (
key character varying(200) NOT NULL,
value text NOT NULL
);
ALTER TABLE thumbnail_kvstore OWNER TO electionleaflets_production;
--
-- TOC entry 278 (class 1259 OID 23304)
-- Name: uk_political_parties_party; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE uk_political_parties_party (
party_id character varying(100) NOT NULL,
party_name character varying(765) NOT NULL,
registered_date date NOT NULL,
party_address text NOT NULL,
postcode character varying(15),
email character varying(75),
status character varying(100) NOT NULL,
slug character varying(50) NOT NULL,
party_type character varying(100) NOT NULL,
register character varying(255),
weight integer
);
ALTER TABLE uk_political_parties_party OWNER TO electionleaflets_production;
--
-- TOC entry 279 (class 1259 OID 23310)
-- Name: uk_political_parties_partyemblem; Type: TABLE; Schema: public; Owner: electionleaflets_production
--
CREATE TABLE uk_political_parties_partyemblem (
id integer NOT NULL,
emblem_url character varying(200) NOT NULL,
party_id character varying(100) NOT NULL
);
ALTER TABLE uk_political_parties_partyemblem OWNER TO electionleaflets_production;
--
-- TOC entry 280 (class 1259 OID 23313)
-- Name: uk_political_parties_partyemblem_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
--
CREATE SEQUENCE uk_political_parties_partyemblem_id_seq
START WITH 1
INCREMENT BY 1
NO MINVALUE
NO MAXVALUE
CACHE 1;
ALTER TABLE uk_political_parties_partyemblem_id_seq OWNER TO electionleaflets_production;
--
-- TOC entry 4992 (class 0 OID 0)
-- Dependencies: 280
-- Name: uk_political_parties_partyemblem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
--
ALTER SEQUENCE uk_political_parties_partyemblem_id_seq OWNED BY uk_political_parties_partyemblem.id;
--
-- TOC entry 4576 (class 2604 OID 23315)
-- Name: account_emailaddress id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailaddress ALTER COLUMN id SET DEFAULT nextval('account_emailaddress_id_seq'::regclass);
--
-- TOC entry 4577 (class 2604 OID 23316)
-- Name: account_emailconfirmation id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailconfirmation ALTER COLUMN id SET DEFAULT nextval('account_emailconfirmation_id_seq'::regclass);
--
-- TOC entry 4578 (class 2604 OID 23317)
-- Name: analysis_leafletproperties id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY analysis_leafletproperties ALTER COLUMN id SET DEFAULT nextval('analysis_leafletproperties_id_seq'::regclass);
--
-- TOC entry 4579 (class 2604 OID 23318)
-- Name: auth_group id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group ALTER COLUMN id SET DEFAULT nextval('auth_group_id_seq'::regclass);
--
-- TOC entry 4580 (class 2604 OID 23319)
-- Name: auth_group_permissions id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('auth_group_permissions_id_seq'::regclass);
--
-- TOC entry 4581 (class 2604 OID 23320)
-- Name: auth_permission id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_permission ALTER COLUMN id SET DEFAULT nextval('auth_permission_id_seq'::regclass);
--
-- TOC entry 4582 (class 2604 OID 23321)
-- Name: auth_user id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user ALTER COLUMN id SET DEFAULT nextval('auth_user_id_seq'::regclass);
--
-- TOC entry 4583 (class 2604 OID 23322)
-- Name: auth_user_groups id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_groups ALTER COLUMN id SET DEFAULT nextval('auth_user_groups_id_seq'::regclass);
--
-- TOC entry 4584 (class 2604 OID 23323)
-- Name: auth_user_user_permissions id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_user_permissions ALTER COLUMN id SET DEFAULT nextval('auth_user_user_permissions_id_seq'::regclass);
--
-- TOC entry 4585 (class 2604 OID 23324)
-- Name: boundaries_boundary id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY boundaries_boundary ALTER COLUMN id SET DEFAULT nextval('boundaries_boundary_id_seq'::regclass);
--
-- TOC entry 4586 (class 2604 OID 23325)
-- Name: category id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY category ALTER COLUMN id SET DEFAULT nextval('category_id_seq'::regclass);
--
-- TOC entry 4587 (class 2604 OID 23326)
-- Name: contentblock id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY contentblock ALTER COLUMN id SET DEFAULT nextval('contentblock_id_seq'::regclass);
--
-- TOC entry 4588 (class 2604 OID 23327)
-- Name: django_admin_log id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_admin_log ALTER COLUMN id SET DEFAULT nextval('django_admin_log_id_seq'::regclass);
--
-- TOC entry 4590 (class 2604 OID 23328)
-- Name: django_content_type id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_content_type ALTER COLUMN id SET DEFAULT nextval('django_content_type_id_seq'::regclass);
--
-- TOC entry 4591 (class 2604 OID 23329)
-- Name: django_migrations id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_migrations ALTER COLUMN id SET DEFAULT nextval('django_migrations_id_seq'::regclass);
--
-- TOC entry 4592 (class 2604 OID 23330)
-- Name: django_site id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_site ALTER COLUMN id SET DEFAULT nextval('django_site_id_seq'::regclass);
--
-- TOC entry 4593 (class 2604 OID 23331)
-- Name: djkombu_message id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY djkombu_message ALTER COLUMN id SET DEFAULT nextval('djkombu_message_id_seq'::regclass);
--
-- TOC entry 4594 (class 2604 OID 23332)
-- Name: djkombu_queue id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY djkombu_queue ALTER COLUMN id SET DEFAULT nextval('djkombu_queue_id_seq'::regclass);
--
-- TOC entry 4595 (class 2604 OID 23333)
-- Name: elections_election id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY elections_election ALTER COLUMN id SET DEFAULT nextval('elections_election_id_seq'::regclass);
--
-- TOC entry 4596 (class 2604 OID 23334)
-- Name: leaflets_leaflet id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leaflet ALTER COLUMN id SET DEFAULT nextval('leaflets_leaflet_id_seq'::regclass);
--
-- TOC entry 4597 (class 2604 OID 23335)
-- Name: leaflets_leafletimage id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leafletimage ALTER COLUMN id SET DEFAULT nextval('leaflets_leafletimage_id_seq'::regclass);
--
-- TOC entry 4599 (class 2604 OID 23336)
-- Name: party id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY party ALTER COLUMN id SET DEFAULT nextval('party_id_seq'::regclass);
--
-- TOC entry 4600 (class 2604 OID 23337)
-- Name: people_partymemberships id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_partymemberships ALTER COLUMN id SET DEFAULT nextval('people_partymemberships_id_seq'::regclass);
--
-- TOC entry 4601 (class 2604 OID 23338)
-- Name: people_person id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person ALTER COLUMN id SET DEFAULT nextval('people_person_id_seq'::regclass);
--
-- TOC entry 4602 (class 2604 OID 23339)
-- Name: people_person_elections id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person_elections ALTER COLUMN id SET DEFAULT nextval('people_person_elections_id_seq'::regclass);
--
-- TOC entry 4603 (class 2604 OID 23340)
-- Name: people_personconstituencies id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_personconstituencies ALTER COLUMN id SET DEFAULT nextval('people_personconstituencies_id_seq'::regclass);
--
-- TOC entry 4604 (class 2604 OID 23341)
-- Name: socialaccount_socialaccount id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialaccount ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialaccount_id_seq'::regclass);
--
-- TOC entry 4605 (class 2604 OID 23342)
-- Name: socialaccount_socialapp id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialapp_id_seq'::regclass);
--
-- TOC entry 4606 (class 2604 OID 23343)
-- Name: socialaccount_socialapp_sites id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp_sites ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialapp_sites_id_seq'::regclass);
--
-- TOC entry 4607 (class 2604 OID 23344)
-- Name: socialaccount_socialtoken id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialtoken ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialtoken_id_seq'::regclass);
--
-- TOC entry 4608 (class 2604 OID 23345)
-- Name: tag id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY tag ALTER COLUMN id SET DEFAULT nextval('tag_id_seq'::regclass);
--
-- TOC entry 4609 (class 2604 OID 23346)
-- Name: uk_political_parties_partyemblem id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY uk_political_parties_partyemblem ALTER COLUMN id SET DEFAULT nextval('uk_political_parties_partyemblem_id_seq'::regclass);
--
-- TOC entry 4611 (class 2606 OID 31712)
-- Name: account_emailaddress account_emailaddress_email_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailaddress
ADD CONSTRAINT account_emailaddress_email_key UNIQUE (email);
--
-- TOC entry 4614 (class 2606 OID 23698)
-- Name: account_emailaddress account_emailaddress_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailaddress
ADD CONSTRAINT account_emailaddress_pkey PRIMARY KEY (id);
--
-- TOC entry 4618 (class 2606 OID 23700)
-- Name: account_emailconfirmation account_emailconfirmation_key_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailconfirmation
ADD CONSTRAINT account_emailconfirmation_key_key UNIQUE (key);
--
-- TOC entry 4621 (class 2606 OID 23702)
-- Name: account_emailconfirmation account_emailconfirmation_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailconfirmation
ADD CONSTRAINT account_emailconfirmation_pkey PRIMARY KEY (id);
--
-- TOC entry 4628 (class 2606 OID 23704)
-- Name: analysis_leafletproperties analysis_leafletproperties_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY analysis_leafletproperties
ADD CONSTRAINT analysis_leafletproperties_pkey PRIMARY KEY (id);
--
-- TOC entry 4631 (class 2606 OID 23706)
-- Name: auth_group auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group
ADD CONSTRAINT auth_group_name_key UNIQUE (name);
--
-- TOC entry 4637 (class 2606 OID 23708)
-- Name: auth_group_permissions auth_group_permissions_group_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group_permissions
ADD CONSTRAINT auth_group_permissions_group_id_permission_id_key UNIQUE (group_id, permission_id);
--
-- TOC entry 4639 (class 2606 OID 23710)
-- Name: auth_group_permissions auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group_permissions
ADD CONSTRAINT auth_group_permissions_pkey PRIMARY KEY (id);
--
-- TOC entry 4633 (class 2606 OID 23712)
-- Name: auth_group auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group
ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id);
--
-- TOC entry 4642 (class 2606 OID 23714)
-- Name: auth_permission auth_permission_content_type_id_codename_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_permission
ADD CONSTRAINT auth_permission_content_type_id_codename_key UNIQUE (content_type_id, codename);
--
-- TOC entry 4644 (class 2606 OID 23716)
-- Name: auth_permission auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_permission
ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id);
--
-- TOC entry 4652 (class 2606 OID 23718)
-- Name: auth_user_groups auth_user_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_groups
ADD CONSTRAINT auth_user_groups_pkey PRIMARY KEY (id);
--
-- TOC entry 4654 (class 2606 OID 23720)
-- Name: auth_user_groups auth_user_groups_user_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_groups
ADD CONSTRAINT auth_user_groups_user_id_group_id_key UNIQUE (user_id, group_id);
--
-- TOC entry 4646 (class 2606 OID 23722)
-- Name: auth_user auth_user_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user
ADD CONSTRAINT auth_user_pkey PRIMARY KEY (id);
--
-- TOC entry 4658 (class 2606 OID 23724)
-- Name: auth_user_user_permissions auth_user_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_user_permissions
ADD CONSTRAINT auth_user_user_permissions_pkey PRIMARY KEY (id);
--
-- TOC entry 4660 (class 2606 OID 23726)
-- Name: auth_user_user_permissions auth_user_user_permissions_user_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_user_permissions
ADD CONSTRAINT auth_user_user_permissions_user_id_permission_id_key UNIQUE (user_id, permission_id);
--
-- TOC entry 4648 (class 2606 OID 23728)
-- Name: auth_user auth_user_username_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user
ADD CONSTRAINT auth_user_username_key UNIQUE (username);
--
-- TOC entry 4663 (class 2606 OID 23730)
-- Name: boundaries_boundary boundaries_boundary_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY boundaries_boundary
ADD CONSTRAINT boundaries_boundary_pkey PRIMARY KEY (id);
--
-- TOC entry 4665 (class 2606 OID 23732)
-- Name: category category_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY category
ADD CONSTRAINT category_pkey PRIMARY KEY (id);
--
-- TOC entry 4670 (class 2606 OID 23734)
-- Name: constituencies_constituency constituencies_constituency_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY constituencies_constituency
ADD CONSTRAINT constituencies_constituency_pkey PRIMARY KEY (constituency_id);
--
-- TOC entry 4674 (class 2606 OID 23736)
-- Name: contentblock contentblock_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY contentblock
ADD CONSTRAINT contentblock_pkey PRIMARY KEY (id);
--
-- TOC entry 4676 (class 2606 OID 23738)
-- Name: country country_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY country
ADD CONSTRAINT country_pkey PRIMARY KEY (country_id);
--
-- TOC entry 4680 (class 2606 OID 23740)
-- Name: django_admin_log django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_admin_log
ADD CONSTRAINT django_admin_log_pkey PRIMARY KEY (id);
--
-- TOC entry 4682 (class 2606 OID 23742)
-- Name: django_content_type django_content_type_app_label_45f3b1d93ec8c61c_uniq; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_content_type
ADD CONSTRAINT django_content_type_app_label_45f3b1d93ec8c61c_uniq UNIQUE (app_label, model);
--
-- TOC entry 4684 (class 2606 OID 23744)
-- Name: django_content_type django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_content_type
ADD CONSTRAINT django_content_type_pkey PRIMARY KEY (id);
--
-- TOC entry 4686 (class 2606 OID 23746)
-- Name: django_migrations django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_migrations
ADD CONSTRAINT django_migrations_pkey PRIMARY KEY (id);
--
-- TOC entry 4689 (class 2606 OID 23748)
-- Name: django_session django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_session
ADD CONSTRAINT django_session_pkey PRIMARY KEY (session_key);
--
-- TOC entry 4692 (class 2606 OID 31726)
-- Name: django_site django_site_domain_a2e37b91_uniq; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_site
ADD CONSTRAINT django_site_domain_a2e37b91_uniq UNIQUE (domain);
--
-- TOC entry 4694 (class 2606 OID 23750)
-- Name: django_site django_site_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_site
ADD CONSTRAINT django_site_pkey PRIMARY KEY (id);
--
-- TOC entry 4696 (class 2606 OID 23752)
-- Name: djkombu_message djkombu_message_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY djkombu_message
ADD CONSTRAINT djkombu_message_pkey PRIMARY KEY (id);
--
-- TOC entry 4701 (class 2606 OID 23754)
-- Name: djkombu_queue djkombu_queue_name_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY djkombu_queue
ADD CONSTRAINT djkombu_queue_name_key UNIQUE (name);
--
-- TOC entry 4704 (class 2606 OID 23756)
-- Name: djkombu_queue djkombu_queue_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY djkombu_queue
ADD CONSTRAINT djkombu_queue_pkey PRIMARY KEY (id);
--
-- TOC entry 4707 (class 2606 OID 23758)
-- Name: el_cache el_cache_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY el_cache
ADD CONSTRAINT el_cache_pkey PRIMARY KEY (cache_key);
--
-- TOC entry 4710 (class 2606 OID 23760)
-- Name: elections_election elections_election_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY elections_election
ADD CONSTRAINT elections_election_pkey PRIMARY KEY (id);
--
-- TOC entry 4712 (class 2606 OID 23762)
-- Name: email_alert email_alert_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY email_alert
ADD CONSTRAINT email_alert_pkey PRIMARY KEY (email_alert_id);
--
-- TOC entry 4714 (class 2606 OID 23764)
-- Name: email_que email_que_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY email_que
ADD CONSTRAINT email_que_pkey PRIMARY KEY (email_que_id);
--
-- TOC entry 4716 (class 2606 OID 23766)
-- Name: image_que image_que_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY image_que
ADD CONSTRAINT image_que_pkey PRIMARY KEY (image_que_id);
--
-- TOC entry 4718 (class 2606 OID 23768)
-- Name: image_que_seq image_que_seq_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY image_que_seq
ADD CONSTRAINT image_que_seq_pkey PRIMARY KEY (sequence);
--
-- TOC entry 4726 (class 2606 OID 23770)
-- Name: leaflets_leaflet leaflets_leaflet_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leaflet
ADD CONSTRAINT leaflets_leaflet_pkey PRIMARY KEY (id);
--
-- TOC entry 4729 (class 2606 OID 23772)
-- Name: leaflets_leafletimage leaflets_leafletimage_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leafletimage
ADD CONSTRAINT leaflets_leafletimage_pkey PRIMARY KEY (id);
--
-- TOC entry 4732 (class 2606 OID 23774)
-- Name: party party_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY party
ADD CONSTRAINT party_pkey PRIMARY KEY (id);
--
-- TOC entry 4738 (class 2606 OID 23776)
-- Name: people_partymemberships people_partymemberships_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_partymemberships
ADD CONSTRAINT people_partymemberships_pkey PRIMARY KEY (id);
--
-- TOC entry 4744 (class 2606 OID 23778)
-- Name: people_person_elections people_person_elections_person_id_election_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person_elections
ADD CONSTRAINT people_person_elections_person_id_election_id_key UNIQUE (person_id, election_id);
--
-- TOC entry 4746 (class 2606 OID 23780)
-- Name: people_person_elections people_person_elections_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person_elections
ADD CONSTRAINT people_person_elections_pkey PRIMARY KEY (id);
--
-- TOC entry 4740 (class 2606 OID 23782)
-- Name: people_person people_person_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person
ADD CONSTRAINT people_person_pkey PRIMARY KEY (id);
--
-- TOC entry 4751 (class 2606 OID 23784)
-- Name: people_personconstituencies people_personconstituencies_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_personconstituencies
ADD CONSTRAINT people_personconstituencies_pkey PRIMARY KEY (id);
--
-- TOC entry 4753 (class 2606 OID 23786)
-- Name: promise promise_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY promise
ADD CONSTRAINT promise_pkey PRIMARY KEY (promise_id);
--
-- TOC entry 4755 (class 2606 OID 23788)
-- Name: rate_interesting rate_interesting_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY rate_interesting
ADD CONSTRAINT rate_interesting_pkey PRIMARY KEY (rate_interesting_id);
--
-- TOC entry 4757 (class 2606 OID 23790)
-- Name: rate_interesting_seq rate_interesting_seq_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY rate_interesting_seq
ADD CONSTRAINT rate_interesting_seq_pkey PRIMARY KEY (sequence);
--
-- TOC entry 4759 (class 2606 OID 23792)
-- Name: rate_type rate_type_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY rate_type
ADD CONSTRAINT rate_type_pkey PRIMARY KEY (rate_type_id);
--
-- TOC entry 4761 (class 2606 OID 23794)
-- Name: rate_value rate_value_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY rate_value
ADD CONSTRAINT rate_value_pkey PRIMARY KEY (rate_value_id);
--
-- TOC entry 4763 (class 2606 OID 23796)
-- Name: rate_value_seq rate_value_seq_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY rate_value_seq
ADD CONSTRAINT rate_value_seq_pkey PRIMARY KEY (sequence);
--
-- TOC entry 4765 (class 2606 OID 23798)
-- Name: socialaccount_socialaccount socialaccount_socialaccount_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialaccount
ADD CONSTRAINT socialaccount_socialaccount_pkey PRIMARY KEY (id);
--
-- TOC entry 4767 (class 2606 OID 31729)
-- Name: socialaccount_socialaccount socialaccount_socialaccount_provider_uid_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialaccount
ADD CONSTRAINT socialaccount_socialaccount_provider_uid_key UNIQUE (provider, uid);
--
-- TOC entry 4770 (class 2606 OID 23802)
-- Name: socialaccount_socialapp socialaccount_socialapp_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp
ADD CONSTRAINT socialaccount_socialapp_pkey PRIMARY KEY (id);
--
-- TOC entry 4772 (class 2606 OID 23804)
-- Name: socialaccount_socialapp_sites socialaccount_socialapp_sites_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp_sites
ADD CONSTRAINT socialaccount_socialapp_sites_pkey PRIMARY KEY (id);
--
-- TOC entry 4776 (class 2606 OID 23806)
-- Name: socialaccount_socialapp_sites socialaccount_socialapp_sites_socialapp_id_site_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp_sites
ADD CONSTRAINT socialaccount_socialapp_sites_socialapp_id_site_id_key UNIQUE (socialapp_id, site_id);
--
-- TOC entry 4780 (class 2606 OID 23808)
-- Name: socialaccount_socialtoken socialaccount_socialtoken_app_id_account_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialtoken
ADD CONSTRAINT socialaccount_socialtoken_app_id_account_id_key UNIQUE (app_id, account_id);
--
-- TOC entry 4782 (class 2606 OID 23810)
-- Name: socialaccount_socialtoken socialaccount_socialtoken_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialtoken
ADD CONSTRAINT socialaccount_socialtoken_pkey PRIMARY KEY (id);
--
-- TOC entry 4784 (class 2606 OID 23812)
-- Name: tag tag_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY tag
ADD CONSTRAINT tag_pkey PRIMARY KEY (id);
--
-- TOC entry 4789 (class 2606 OID 23814)
-- Name: thumbnail_kvstore thumbnail_kvstore_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY thumbnail_kvstore
ADD CONSTRAINT thumbnail_kvstore_pkey PRIMARY KEY (key);
--
-- TOC entry 4792 (class 2606 OID 23816)
-- Name: uk_political_parties_party uk_political_parties_party_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY uk_political_parties_party
ADD CONSTRAINT uk_political_parties_party_pkey PRIMARY KEY (party_id);
--
-- TOC entry 4795 (class 2606 OID 23818)
-- Name: uk_political_parties_partyemblem uk_political_parties_partyemblem_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY uk_political_parties_partyemblem
ADD CONSTRAINT uk_political_parties_partyemblem_pkey PRIMARY KEY (id);
--
-- TOC entry 4612 (class 1259 OID 31713)
-- Name: account_emailaddress_email_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX account_emailaddress_email_like ON account_emailaddress USING btree (email varchar_pattern_ops);
--
-- TOC entry 4615 (class 1259 OID 23820)
-- Name: account_emailaddress_user_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX account_emailaddress_user_id ON account_emailaddress USING btree (user_id);
--
-- TOC entry 4616 (class 1259 OID 23821)
-- Name: account_emailconfirmation_email_address_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX account_emailconfirmation_email_address_id ON account_emailconfirmation USING btree (email_address_id);
--
-- TOC entry 4619 (class 1259 OID 23822)
-- Name: account_emailconfirmation_key_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX account_emailconfirmation_key_like ON account_emailconfirmation USING btree (key varchar_pattern_ops);
--
-- TOC entry 4622 (class 1259 OID 23823)
-- Name: analysis_leafletproperties_168f9da0; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX analysis_leafletproperties_168f9da0 ON analysis_leafletproperties USING btree (leaflet_id);
--
-- TOC entry 4623 (class 1259 OID 23824)
-- Name: analysis_leafletproperties_2063c160; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX analysis_leafletproperties_2063c160 ON analysis_leafletproperties USING btree (value);
--
-- TOC entry 4624 (class 1259 OID 23825)
-- Name: analysis_leafletproperties_3c6e0b8a; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX analysis_leafletproperties_3c6e0b8a ON analysis_leafletproperties USING btree (key);
--
-- TOC entry 4625 (class 1259 OID 23826)
-- Name: analysis_leafletproperties_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX analysis_leafletproperties_e8701ad4 ON analysis_leafletproperties USING btree (user_id);
--
-- TOC entry 4626 (class 1259 OID 23827)
-- Name: analysis_leafletproperties_key_726062b929723bbc_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX analysis_leafletproperties_key_726062b929723bbc_like ON analysis_leafletproperties USING btree (key varchar_pattern_ops);
--
-- TOC entry 4629 (class 1259 OID 23828)
-- Name: analysis_leafletproperties_value_48979daf9e89ab4c_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX analysis_leafletproperties_value_48979daf9e89ab4c_like ON analysis_leafletproperties USING btree (value varchar_pattern_ops);
--
-- TOC entry 4634 (class 1259 OID 23829)
-- Name: auth_group_permissions_0e939a4f; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_group_permissions_0e939a4f ON auth_group_permissions USING btree (group_id);
--
-- TOC entry 4635 (class 1259 OID 23830)
-- Name: auth_group_permissions_8373b171; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_group_permissions_8373b171 ON auth_group_permissions USING btree (permission_id);
--
-- TOC entry 4640 (class 1259 OID 23831)
-- Name: auth_permission_417f1b1c; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_permission_417f1b1c ON auth_permission USING btree (content_type_id);
--
-- TOC entry 4649 (class 1259 OID 23832)
-- Name: auth_user_groups_0e939a4f; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_user_groups_0e939a4f ON auth_user_groups USING btree (group_id);
--
-- TOC entry 4650 (class 1259 OID 23833)
-- Name: auth_user_groups_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_user_groups_e8701ad4 ON auth_user_groups USING btree (user_id);
--
-- TOC entry 4655 (class 1259 OID 23834)
-- Name: auth_user_user_permissions_8373b171; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_user_user_permissions_8373b171 ON auth_user_user_permissions USING btree (permission_id);
--
-- TOC entry 4656 (class 1259 OID 23835)
-- Name: auth_user_user_permissions_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX auth_user_user_permissions_e8701ad4 ON auth_user_user_permissions USING btree (user_id);
--
-- TOC entry 4661 (class 1259 OID 23836)
-- Name: boundaries_boundary_constituency_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX boundaries_boundary_constituency_id ON boundaries_boundary USING btree (constituency_id);
--
-- TOC entry 4666 (class 1259 OID 23837)
-- Name: category_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX category_slug ON category USING btree (slug);
--
-- TOC entry 4667 (class 1259 OID 23838)
-- Name: category_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX category_slug_like ON category USING btree (slug varchar_pattern_ops);
--
-- TOC entry 4668 (class 1259 OID 23839)
-- Name: constituencies_constituency_constituency_id_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX constituencies_constituency_constituency_id_like ON constituencies_constituency USING btree (constituency_id varchar_pattern_ops);
--
-- TOC entry 4671 (class 1259 OID 23840)
-- Name: constituencies_constituency_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX constituencies_constituency_slug ON constituencies_constituency USING btree (slug);
--
-- TOC entry 4672 (class 1259 OID 23841)
-- Name: constituencies_constituency_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX constituencies_constituency_slug_like ON constituencies_constituency USING btree (slug varchar_pattern_ops);
--
-- TOC entry 4677 (class 1259 OID 23842)
-- Name: django_admin_log_417f1b1c; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX django_admin_log_417f1b1c ON django_admin_log USING btree (content_type_id);
--
-- TOC entry 4678 (class 1259 OID 23843)
-- Name: django_admin_log_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX django_admin_log_e8701ad4 ON django_admin_log USING btree (user_id);
--
-- TOC entry 4687 (class 1259 OID 23844)
-- Name: django_session_de54fa62; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX django_session_de54fa62 ON django_session USING btree (expire_date);
--
-- TOC entry 4690 (class 1259 OID 31727)
-- Name: django_site_domain_a2e37b91_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX django_site_domain_a2e37b91_like ON django_site USING btree (domain varchar_pattern_ops);
--
-- TOC entry 4697 (class 1259 OID 23845)
-- Name: djkombu_message_queue_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX djkombu_message_queue_id ON djkombu_message USING btree (queue_id);
--
-- TOC entry 4698 (class 1259 OID 23846)
-- Name: djkombu_message_sent_at; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX djkombu_message_sent_at ON djkombu_message USING btree (sent_at);
--
-- TOC entry 4699 (class 1259 OID 23847)
-- Name: djkombu_message_visible; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX djkombu_message_visible ON djkombu_message USING btree (visible);
--
-- TOC entry 4702 (class 1259 OID 23848)
-- Name: djkombu_queue_name_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX djkombu_queue_name_like ON djkombu_queue USING btree (name varchar_pattern_ops);
--
-- TOC entry 4705 (class 1259 OID 23849)
-- Name: el_cache_expires; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX el_cache_expires ON el_cache USING btree (expires);
--
-- TOC entry 4708 (class 1259 OID 23850)
-- Name: elections_election_93bfec8a; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX elections_election_93bfec8a ON elections_election USING btree (country_id);
--
-- TOC entry 4719 (class 1259 OID 23851)
-- Name: leaflets_leaflet_225d2087; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leaflet_225d2087 ON leaflets_leaflet USING btree (publisher_person_id);
--
-- TOC entry 4720 (class 1259 OID 23852)
-- Name: leaflets_leaflet_2af093ee; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leaflet_2af093ee ON leaflets_leaflet USING btree (constituency_id);
--
-- TOC entry 4721 (class 1259 OID 23853)
-- Name: leaflets_leaflet_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leaflet_a8452ca7 ON leaflets_leaflet USING btree (person_id);
--
-- TOC entry 4722 (class 1259 OID 23854)
-- Name: leaflets_leaflet_ece3e99c; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leaflet_ece3e99c ON leaflets_leaflet USING btree (publisher_party_id);
--
-- TOC entry 4723 (class 1259 OID 23855)
-- Name: leaflets_leaflet_f8f30b52; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leaflet_f8f30b52 ON leaflets_leaflet USING btree (election_id);
--
-- TOC entry 4724 (class 1259 OID 23856)
-- Name: leaflets_leaflet_location_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leaflet_location_id ON leaflets_leaflet USING gist (location);
--
-- TOC entry 4727 (class 1259 OID 23857)
-- Name: leaflets_leafletimage_168f9da0; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX leaflets_leafletimage_168f9da0 ON leaflets_leafletimage USING btree (leaflet_id);
--
-- TOC entry 4730 (class 1259 OID 23858)
-- Name: party_country_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX party_country_id ON party USING btree (country_id);
--
-- TOC entry 4733 (class 1259 OID 23859)
-- Name: party_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX party_slug ON party USING btree (slug);
--
-- TOC entry 4734 (class 1259 OID 23860)
-- Name: party_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX party_slug_like ON party USING btree (slug varchar_pattern_ops);
--
-- TOC entry 4735 (class 1259 OID 23861)
-- Name: people_partymemberships_2c662395; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_partymemberships_2c662395 ON people_partymemberships USING btree (party_id);
--
-- TOC entry 4736 (class 1259 OID 23862)
-- Name: people_partymemberships_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_partymemberships_a8452ca7 ON people_partymemberships USING btree (person_id);
--
-- TOC entry 4741 (class 1259 OID 23863)
-- Name: people_person_elections_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_person_elections_a8452ca7 ON people_person_elections USING btree (person_id);
--
-- TOC entry 4742 (class 1259 OID 23864)
-- Name: people_person_elections_f8f30b52; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_person_elections_f8f30b52 ON people_person_elections USING btree (election_id);
--
-- TOC entry 4747 (class 1259 OID 23865)
-- Name: people_personconstituencies_721b30ed; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_personconstituencies_721b30ed ON people_personconstituencies USING btree (constituency_id);
--
-- TOC entry 4748 (class 1259 OID 23866)
-- Name: people_personconstituencies_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_personconstituencies_a8452ca7 ON people_personconstituencies USING btree (person_id);
--
-- TOC entry 4749 (class 1259 OID 23867)
-- Name: people_personconstituencies_f8f30b52; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX people_personconstituencies_f8f30b52 ON people_personconstituencies USING btree (election_id);
--
-- TOC entry 4768 (class 1259 OID 23868)
-- Name: socialaccount_socialaccount_user_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX socialaccount_socialaccount_user_id ON socialaccount_socialaccount USING btree (user_id);
--
-- TOC entry 4773 (class 1259 OID 23869)
-- Name: socialaccount_socialapp_sites_site_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX socialaccount_socialapp_sites_site_id ON socialaccount_socialapp_sites USING btree (site_id);
--
-- TOC entry 4774 (class 1259 OID 23870)
-- Name: socialaccount_socialapp_sites_socialapp_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX socialaccount_socialapp_sites_socialapp_id ON socialaccount_socialapp_sites USING btree (socialapp_id);
--
-- TOC entry 4777 (class 1259 OID 23871)
-- Name: socialaccount_socialtoken_account_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX socialaccount_socialtoken_account_id ON socialaccount_socialtoken USING btree (account_id);
--
-- TOC entry 4778 (class 1259 OID 23872)
-- Name: socialaccount_socialtoken_app_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX socialaccount_socialtoken_app_id ON socialaccount_socialtoken USING btree (app_id);
--
-- TOC entry 4785 (class 1259 OID 23873)
-- Name: tag_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX tag_slug ON tag USING btree (slug);
--
-- TOC entry 4786 (class 1259 OID 23874)
-- Name: tag_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX tag_slug_like ON tag USING btree (slug varchar_pattern_ops);
--
-- TOC entry 4787 (class 1259 OID 23875)
-- Name: thumbnail_kvstore_key_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX thumbnail_kvstore_key_like ON thumbnail_kvstore USING btree (key varchar_pattern_ops);
--
-- TOC entry 4790 (class 1259 OID 23876)
-- Name: uk_political_parties_party_2dbcba41; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX uk_political_parties_party_2dbcba41 ON uk_political_parties_party USING btree (slug);
--
-- TOC entry 4793 (class 1259 OID 23877)
-- Name: uk_political_parties_partyemblem_2c662395; Type: INDEX; Schema: public; Owner: electionleaflets_production
--
CREATE INDEX uk_political_parties_partyemblem_2c662395 ON uk_political_parties_partyemblem USING btree (party_id);
--
-- TOC entry 4796 (class 2606 OID 23878)
-- Name: account_emailaddress account_emailaddress_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailaddress
ADD CONSTRAINT account_emailaddress_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4797 (class 2606 OID 23883)
-- Name: account_emailconfirmation account_emailconfirmation_email_address_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY account_emailconfirmation
ADD CONSTRAINT account_emailconfirmation_email_address_id_fkey FOREIGN KEY (email_address_id) REFERENCES account_emailaddress(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4798 (class 2606 OID 23888)
-- Name: analysis_leafletproperties analysis_lea_leaflet_id_682ed73ca5f54e4d_fk_leaflets_leaflet_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY analysis_leafletproperties
ADD CONSTRAINT analysis_lea_leaflet_id_682ed73ca5f54e4d_fk_leaflets_leaflet_id FOREIGN KEY (leaflet_id) REFERENCES leaflets_leaflet(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4799 (class 2606 OID 23893)
-- Name: analysis_leafletproperties analysis_leafletproper_user_id_57a4384c3644c9c6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY analysis_leafletproperties
ADD CONSTRAINT analysis_leafletproper_user_id_57a4384c3644c9c6_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4802 (class 2606 OID 23898)
-- Name: auth_permission auth_content_type_id_508cf46651277a81_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_permission
ADD CONSTRAINT auth_content_type_id_508cf46651277a81_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4800 (class 2606 OID 23903)
-- Name: auth_group_permissions auth_group_permissio_group_id_689710a9a73b7457_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group_permissions
ADD CONSTRAINT auth_group_permissio_group_id_689710a9a73b7457_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4801 (class 2606 OID 23908)
-- Name: auth_group_permissions auth_group_permission_id_1f49ccbbdc69d2fc_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_group_permissions
ADD CONSTRAINT auth_group_permission_id_1f49ccbbdc69d2fc_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4805 (class 2606 OID 23913)
-- Name: auth_user_user_permissions auth_user__permission_id_384b62483d7071f0_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_user_permissions
ADD CONSTRAINT auth_user__permission_id_384b62483d7071f0_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4803 (class 2606 OID 23918)
-- Name: auth_user_groups auth_user_groups_group_id_33ac548dcf5f8e37_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_groups
ADD CONSTRAINT auth_user_groups_group_id_33ac548dcf5f8e37_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4804 (class 2606 OID 23923)
-- Name: auth_user_groups auth_user_groups_user_id_4b5ed4ffdb8fd9b0_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_groups
ADD CONSTRAINT auth_user_groups_user_id_4b5ed4ffdb8fd9b0_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4806 (class 2606 OID 23928)
-- Name: auth_user_user_permissions auth_user_user_permiss_user_id_7f0938558328534a_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY auth_user_user_permissions
ADD CONSTRAINT auth_user_user_permiss_user_id_7f0938558328534a_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4816 (class 2606 OID 23933)
-- Name: people_partymemberships ccfae136d2190a04c8f973a195cf2dfe; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_partymemberships
ADD CONSTRAINT ccfae136d2190a04c8f973a195cf2dfe FOREIGN KEY (party_id) REFERENCES uk_political_parties_party(party_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4811 (class 2606 OID 23938)
-- Name: leaflets_leaflet d13fde9954a3037991cdbd91750d8bfd; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leaflet
ADD CONSTRAINT d13fde9954a3037991cdbd91750d8bfd FOREIGN KEY (publisher_party_id) REFERENCES uk_political_parties_party(party_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4828 (class 2606 OID 23943)
-- Name: uk_political_parties_partyemblem d5a7a036fa6be56b2d8c39e76c4ef949; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY uk_political_parties_partyemblem
ADD CONSTRAINT d5a7a036fa6be56b2d8c39e76c4ef949 FOREIGN KEY (party_id) REFERENCES uk_political_parties_party(party_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4820 (class 2606 OID 23948)
-- Name: people_personconstituencies d5be8e440f22f18ea44a9036b6a8be26; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_personconstituencies
ADD CONSTRAINT d5be8e440f22f18ea44a9036b6a8be26 FOREIGN KEY (constituency_id) REFERENCES constituencies_constituency(constituency_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4812 (class 2606 OID 23953)
-- Name: leaflets_leaflet d8b9c279fbe369ba0450343e34162a2d; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leaflet
ADD CONSTRAINT d8b9c279fbe369ba0450343e34162a2d FOREIGN KEY (constituency_id) REFERENCES constituencies_constituency(constituency_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4807 (class 2606 OID 23958)
-- Name: django_admin_log djan_content_type_id_697914295151027a_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_admin_log
ADD CONSTRAINT djan_content_type_id_697914295151027a_fk_django_content_type_id FOREIGN KEY (content_type_id) REFERENCES django_content_type(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4808 (class 2606 OID 23963)
-- Name: django_admin_log django_admin_log_user_id_52fdd58701c5f563_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY django_admin_log
ADD CONSTRAINT django_admin_log_user_id_52fdd58701c5f563_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4809 (class 2606 OID 23968)
-- Name: djkombu_message djkombu_message_queue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY djkombu_message
ADD CONSTRAINT djkombu_message_queue_id_fkey FOREIGN KEY (queue_id) REFERENCES djkombu_queue(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4810 (class 2606 OID 23973)
-- Name: elections_election elections_ele_country_id_7f3abbba8ded3c57_fk_country_country_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY elections_election
ADD CONSTRAINT elections_ele_country_id_7f3abbba8ded3c57_fk_country_country_id FOREIGN KEY (country_id) REFERENCES country(country_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4813 (class 2606 OID 23978)
-- Name: leaflets_leaflet leaflets__election_id_2da416a6501bb73b_fk_elections_election_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leaflet
ADD CONSTRAINT leaflets__election_id_2da416a6501bb73b_fk_elections_election_id FOREIGN KEY (election_id) REFERENCES elections_election(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4814 (class 2606 OID 23983)
-- Name: leaflets_leafletimage leaflets_lea_leaflet_id_2fddb239d3a18790_fk_leaflets_leaflet_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY leaflets_leafletimage
ADD CONSTRAINT leaflets_lea_leaflet_id_2fddb239d3a18790_fk_leaflets_leaflet_id FOREIGN KEY (leaflet_id) REFERENCES leaflets_leaflet(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4815 (class 2606 OID 23988)
-- Name: party party_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY party
ADD CONSTRAINT party_country_id_fkey FOREIGN KEY (country_id) REFERENCES country(country_id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4817 (class 2606 OID 23993)
-- Name: people_partymemberships people_partymemb_person_id_19ba6912a1bed719_fk_people_person_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_partymemberships
ADD CONSTRAINT people_partymemb_person_id_19ba6912a1bed719_fk_people_person_id FOREIGN KEY (person_id) REFERENCES people_person(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4821 (class 2606 OID 23998)
-- Name: people_personconstituencies people_pe_election_id_17f9e1eac4c27be3_fk_elections_election_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_personconstituencies
ADD CONSTRAINT people_pe_election_id_17f9e1eac4c27be3_fk_elections_election_id FOREIGN KEY (election_id) REFERENCES elections_election(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4818 (class 2606 OID 24003)
-- Name: people_person_elections people_pe_election_id_26f1fd33a410fd32_fk_elections_election_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person_elections
ADD CONSTRAINT people_pe_election_id_26f1fd33a410fd32_fk_elections_election_id FOREIGN KEY (election_id) REFERENCES elections_election(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4819 (class 2606 OID 24008)
-- Name: people_person_elections people_person_ele_person_id_cc79e09b07e0eda_fk_people_person_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_person_elections
ADD CONSTRAINT people_person_ele_person_id_cc79e09b07e0eda_fk_people_person_id FOREIGN KEY (person_id) REFERENCES people_person(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4822 (class 2606 OID 24013)
-- Name: people_personconstituencies people_personcon_person_id_246ec89d33771511_fk_people_person_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY people_personconstituencies
ADD CONSTRAINT people_personcon_person_id_246ec89d33771511_fk_people_person_id FOREIGN KEY (person_id) REFERENCES people_person(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4823 (class 2606 OID 24018)
-- Name: socialaccount_socialaccount socialaccount_socialaccount_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialaccount
ADD CONSTRAINT socialaccount_socialaccount_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4824 (class 2606 OID 24023)
-- Name: socialaccount_socialapp_sites socialaccount_socialapp_sites_site_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp_sites
ADD CONSTRAINT socialaccount_socialapp_sites_site_id_fkey FOREIGN KEY (site_id) REFERENCES django_site(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4826 (class 2606 OID 24028)
-- Name: socialaccount_socialtoken socialaccount_socialtoken_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialtoken
ADD CONSTRAINT socialaccount_socialtoken_account_id_fkey FOREIGN KEY (account_id) REFERENCES socialaccount_socialaccount(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4827 (class 2606 OID 24033)
-- Name: socialaccount_socialtoken socialaccount_socialtoken_app_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialtoken
ADD CONSTRAINT socialaccount_socialtoken_app_id_fkey FOREIGN KEY (app_id) REFERENCES socialaccount_socialapp(id) DEFERRABLE INITIALLY DEFERRED;
--
-- TOC entry 4825 (class 2606 OID 24038)
-- Name: socialaccount_socialapp_sites socialapp_id_refs_id_e7a43014; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
--
ALTER TABLE ONLY socialaccount_socialapp_sites
ADD CONSTRAINT socialapp_id_refs_id_e7a43014 FOREIGN KEY (socialapp_id) REFERENCES socialaccount_socialapp(id) DEFERRABLE INITIALLY DEFERRED;
-- Completed on 2017-12-18 14:00:47 GMT
--
-- PostgreSQL database dump complete
--
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment