· 8 years ago · Dec 21, 2017, 08:40 AM
1--
2-- PostgreSQL database dump
3--
4
5-- Dumped from database version 9.6.2
6-- Dumped by pg_dump version 10.1
7
8-- Started on 2017-12-18 13:59:03 GMT
9
10SET statement_timeout = 0;
11SET lock_timeout = 0;
12SET idle_in_transaction_session_timeout = 0;
13SET client_encoding = 'UTF8';
14SET standard_conforming_strings = on;
15SET check_function_bodies = false;
16SET client_min_messages = warning;
17SET row_security = off;
18
19--
20-- TOC entry 1 (class 3079 OID 13308)
21-- Name: plpgsql; Type: EXTENSION; Schema: -; Owner:
22--
23
24CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
25
26
27--
28-- TOC entry 4959 (class 0 OID 0)
29-- Dependencies: 1
30-- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner:
31--
32
33COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
34
35
36--
37-- TOC entry 2 (class 3079 OID 18963)
38-- Name: postgis; Type: EXTENSION; Schema: -; Owner:
39--
40
41CREATE EXTENSION IF NOT EXISTS postgis WITH SCHEMA public;
42
43
44--
45-- TOC entry 4960 (class 0 OID 0)
46-- Dependencies: 2
47-- Name: EXTENSION postgis; Type: COMMENT; Schema: -; Owner:
48--
49
50COMMENT ON EXTENSION postgis IS 'PostGIS geometry, geography, and raster spatial types and functions';
51
52
53SET search_path = public, pg_catalog;
54
55SET default_tablespace = '';
56
57SET default_with_oids = false;
58
59--
60-- TOC entry 201 (class 1259 OID 23031)
61-- Name: account_emailaddress; Type: TABLE; Schema: public; Owner: electionleaflets_production
62--
63
64CREATE TABLE account_emailaddress (
65 id integer NOT NULL,
66 user_id integer NOT NULL,
67 email character varying(254) NOT NULL,
68 verified boolean NOT NULL,
69 "primary" boolean NOT NULL
70);
71
72
73ALTER TABLE account_emailaddress OWNER TO electionleaflets_production;
74
75--
76-- TOC entry 202 (class 1259 OID 23034)
77-- Name: account_emailaddress_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
78--
79
80CREATE SEQUENCE account_emailaddress_id_seq
81 START WITH 1
82 INCREMENT BY 1
83 NO MINVALUE
84 NO MAXVALUE
85 CACHE 1;
86
87
88ALTER TABLE account_emailaddress_id_seq OWNER TO electionleaflets_production;
89
90--
91-- TOC entry 4961 (class 0 OID 0)
92-- Dependencies: 202
93-- Name: account_emailaddress_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
94--
95
96ALTER SEQUENCE account_emailaddress_id_seq OWNED BY account_emailaddress.id;
97
98
99--
100-- TOC entry 203 (class 1259 OID 23036)
101-- Name: account_emailconfirmation; Type: TABLE; Schema: public; Owner: electionleaflets_production
102--
103
104CREATE TABLE account_emailconfirmation (
105 id integer NOT NULL,
106 email_address_id integer NOT NULL,
107 created timestamp with time zone NOT NULL,
108 sent timestamp with time zone,
109 key character varying(64) NOT NULL
110);
111
112
113ALTER TABLE account_emailconfirmation OWNER TO electionleaflets_production;
114
115--
116-- TOC entry 204 (class 1259 OID 23039)
117-- Name: account_emailconfirmation_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
118--
119
120CREATE SEQUENCE account_emailconfirmation_id_seq
121 START WITH 1
122 INCREMENT BY 1
123 NO MINVALUE
124 NO MAXVALUE
125 CACHE 1;
126
127
128ALTER TABLE account_emailconfirmation_id_seq OWNER TO electionleaflets_production;
129
130--
131-- TOC entry 4962 (class 0 OID 0)
132-- Dependencies: 204
133-- Name: account_emailconfirmation_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
134--
135
136ALTER SEQUENCE account_emailconfirmation_id_seq OWNED BY account_emailconfirmation.id;
137
138
139--
140-- TOC entry 205 (class 1259 OID 23041)
141-- Name: analysis_leafletproperties; Type: TABLE; Schema: public; Owner: electionleaflets_production
142--
143
144CREATE TABLE analysis_leafletproperties (
145 id integer NOT NULL,
146 created timestamp with time zone NOT NULL,
147 modified timestamp with time zone NOT NULL,
148 key character varying(100) NOT NULL,
149 value character varying(255) NOT NULL,
150 leaflet_id integer NOT NULL,
151 user_id integer NOT NULL
152);
153
154
155ALTER TABLE analysis_leafletproperties OWNER TO electionleaflets_production;
156
157--
158-- TOC entry 206 (class 1259 OID 23044)
159-- Name: analysis_leafletproperties_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
160--
161
162CREATE SEQUENCE analysis_leafletproperties_id_seq
163 START WITH 1
164 INCREMENT BY 1
165 NO MINVALUE
166 NO MAXVALUE
167 CACHE 1;
168
169
170ALTER TABLE analysis_leafletproperties_id_seq OWNER TO electionleaflets_production;
171
172--
173-- TOC entry 4963 (class 0 OID 0)
174-- Dependencies: 206
175-- Name: analysis_leafletproperties_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
176--
177
178ALTER SEQUENCE analysis_leafletproperties_id_seq OWNED BY analysis_leafletproperties.id;
179
180
181--
182-- TOC entry 207 (class 1259 OID 23046)
183-- Name: auth_group; Type: TABLE; Schema: public; Owner: electionleaflets_production
184--
185
186CREATE TABLE auth_group (
187 id integer NOT NULL,
188 name character varying(80) NOT NULL
189);
190
191
192ALTER TABLE auth_group OWNER TO electionleaflets_production;
193
194--
195-- TOC entry 208 (class 1259 OID 23049)
196-- Name: auth_group_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
197--
198
199CREATE SEQUENCE auth_group_id_seq
200 START WITH 1
201 INCREMENT BY 1
202 NO MINVALUE
203 NO MAXVALUE
204 CACHE 1;
205
206
207ALTER TABLE auth_group_id_seq OWNER TO electionleaflets_production;
208
209--
210-- TOC entry 4964 (class 0 OID 0)
211-- Dependencies: 208
212-- Name: auth_group_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
213--
214
215ALTER SEQUENCE auth_group_id_seq OWNED BY auth_group.id;
216
217
218--
219-- TOC entry 209 (class 1259 OID 23051)
220-- Name: auth_group_permissions; Type: TABLE; Schema: public; Owner: electionleaflets_production
221--
222
223CREATE TABLE auth_group_permissions (
224 id integer NOT NULL,
225 group_id integer NOT NULL,
226 permission_id integer NOT NULL
227);
228
229
230ALTER TABLE auth_group_permissions OWNER TO electionleaflets_production;
231
232--
233-- TOC entry 210 (class 1259 OID 23054)
234-- Name: auth_group_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
235--
236
237CREATE SEQUENCE auth_group_permissions_id_seq
238 START WITH 1
239 INCREMENT BY 1
240 NO MINVALUE
241 NO MAXVALUE
242 CACHE 1;
243
244
245ALTER TABLE auth_group_permissions_id_seq OWNER TO electionleaflets_production;
246
247--
248-- TOC entry 4965 (class 0 OID 0)
249-- Dependencies: 210
250-- Name: auth_group_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
251--
252
253ALTER SEQUENCE auth_group_permissions_id_seq OWNED BY auth_group_permissions.id;
254
255
256--
257-- TOC entry 211 (class 1259 OID 23056)
258-- Name: auth_permission; Type: TABLE; Schema: public; Owner: electionleaflets_production
259--
260
261CREATE TABLE auth_permission (
262 id integer NOT NULL,
263 name character varying(255) NOT NULL,
264 content_type_id integer NOT NULL,
265 codename character varying(100) NOT NULL
266);
267
268
269ALTER TABLE auth_permission OWNER TO electionleaflets_production;
270
271--
272-- TOC entry 212 (class 1259 OID 23059)
273-- Name: auth_permission_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
274--
275
276CREATE SEQUENCE auth_permission_id_seq
277 START WITH 1
278 INCREMENT BY 1
279 NO MINVALUE
280 NO MAXVALUE
281 CACHE 1;
282
283
284ALTER TABLE auth_permission_id_seq OWNER TO electionleaflets_production;
285
286--
287-- TOC entry 4966 (class 0 OID 0)
288-- Dependencies: 212
289-- Name: auth_permission_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
290--
291
292ALTER SEQUENCE auth_permission_id_seq OWNED BY auth_permission.id;
293
294
295--
296-- TOC entry 213 (class 1259 OID 23061)
297-- Name: auth_user; Type: TABLE; Schema: public; Owner: electionleaflets_production
298--
299
300CREATE TABLE auth_user (
301 id integer NOT NULL,
302 password character varying(128) NOT NULL,
303 last_login timestamp with time zone,
304 is_superuser boolean NOT NULL,
305 username character varying(30) NOT NULL,
306 first_name character varying(30) NOT NULL,
307 last_name character varying(30) NOT NULL,
308 email character varying(254) NOT NULL,
309 is_staff boolean NOT NULL,
310 is_active boolean NOT NULL,
311 date_joined timestamp with time zone NOT NULL
312);
313
314
315ALTER TABLE auth_user OWNER TO electionleaflets_production;
316
317--
318-- TOC entry 214 (class 1259 OID 23064)
319-- Name: auth_user_groups; Type: TABLE; Schema: public; Owner: electionleaflets_production
320--
321
322CREATE TABLE auth_user_groups (
323 id integer NOT NULL,
324 user_id integer NOT NULL,
325 group_id integer NOT NULL
326);
327
328
329ALTER TABLE auth_user_groups OWNER TO electionleaflets_production;
330
331--
332-- TOC entry 215 (class 1259 OID 23067)
333-- Name: auth_user_groups_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
334--
335
336CREATE SEQUENCE auth_user_groups_id_seq
337 START WITH 1
338 INCREMENT BY 1
339 NO MINVALUE
340 NO MAXVALUE
341 CACHE 1;
342
343
344ALTER TABLE auth_user_groups_id_seq OWNER TO electionleaflets_production;
345
346--
347-- TOC entry 4967 (class 0 OID 0)
348-- Dependencies: 215
349-- Name: auth_user_groups_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
350--
351
352ALTER SEQUENCE auth_user_groups_id_seq OWNED BY auth_user_groups.id;
353
354
355--
356-- TOC entry 216 (class 1259 OID 23069)
357-- Name: auth_user_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
358--
359
360CREATE SEQUENCE auth_user_id_seq
361 START WITH 1
362 INCREMENT BY 1
363 NO MINVALUE
364 NO MAXVALUE
365 CACHE 1;
366
367
368ALTER TABLE auth_user_id_seq OWNER TO electionleaflets_production;
369
370--
371-- TOC entry 4968 (class 0 OID 0)
372-- Dependencies: 216
373-- Name: auth_user_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
374--
375
376ALTER SEQUENCE auth_user_id_seq OWNED BY auth_user.id;
377
378
379--
380-- TOC entry 217 (class 1259 OID 23071)
381-- Name: auth_user_user_permissions; Type: TABLE; Schema: public; Owner: electionleaflets_production
382--
383
384CREATE TABLE auth_user_user_permissions (
385 id integer NOT NULL,
386 user_id integer NOT NULL,
387 permission_id integer NOT NULL
388);
389
390
391ALTER TABLE auth_user_user_permissions OWNER TO electionleaflets_production;
392
393--
394-- TOC entry 218 (class 1259 OID 23074)
395-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
396--
397
398CREATE SEQUENCE auth_user_user_permissions_id_seq
399 START WITH 1
400 INCREMENT BY 1
401 NO MINVALUE
402 NO MAXVALUE
403 CACHE 1;
404
405
406ALTER TABLE auth_user_user_permissions_id_seq OWNER TO electionleaflets_production;
407
408--
409-- TOC entry 4969 (class 0 OID 0)
410-- Dependencies: 218
411-- Name: auth_user_user_permissions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
412--
413
414ALTER SEQUENCE auth_user_user_permissions_id_seq OWNED BY auth_user_user_permissions.id;
415
416
417--
418-- TOC entry 219 (class 1259 OID 23076)
419-- Name: boundaries_boundary; Type: TABLE; Schema: public; Owner: electionleaflets_production
420--
421
422CREATE TABLE boundaries_boundary (
423 id integer NOT NULL,
424 constituency_id integer NOT NULL,
425 boundary text NOT NULL,
426 zoom integer NOT NULL,
427 north double precision NOT NULL,
428 south double precision NOT NULL,
429 east double precision NOT NULL,
430 west double precision NOT NULL
431);
432
433
434ALTER TABLE boundaries_boundary OWNER TO electionleaflets_production;
435
436--
437-- TOC entry 220 (class 1259 OID 23082)
438-- Name: boundaries_boundary_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
439--
440
441CREATE SEQUENCE boundaries_boundary_id_seq
442 START WITH 1
443 INCREMENT BY 1
444 NO MINVALUE
445 NO MAXVALUE
446 CACHE 1;
447
448
449ALTER TABLE boundaries_boundary_id_seq OWNER TO electionleaflets_production;
450
451--
452-- TOC entry 4970 (class 0 OID 0)
453-- Dependencies: 220
454-- Name: boundaries_boundary_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
455--
456
457ALTER SEQUENCE boundaries_boundary_id_seq OWNED BY boundaries_boundary.id;
458
459
460--
461-- TOC entry 221 (class 1259 OID 23084)
462-- Name: category; Type: TABLE; Schema: public; Owner: electionleaflets_production
463--
464
465CREATE TABLE category (
466 id integer NOT NULL,
467 name character varying(765) NOT NULL,
468 description text NOT NULL,
469 default_value integer,
470 slug character varying(255) NOT NULL
471);
472
473
474ALTER TABLE category OWNER TO electionleaflets_production;
475
476--
477-- TOC entry 222 (class 1259 OID 23090)
478-- Name: category_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
479--
480
481CREATE SEQUENCE category_id_seq
482 START WITH 1
483 INCREMENT BY 1
484 NO MINVALUE
485 NO MAXVALUE
486 CACHE 1;
487
488
489ALTER TABLE category_id_seq OWNER TO electionleaflets_production;
490
491--
492-- TOC entry 4971 (class 0 OID 0)
493-- Dependencies: 222
494-- Name: category_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
495--
496
497ALTER SEQUENCE category_id_seq OWNED BY category.id;
498
499
500--
501-- TOC entry 223 (class 1259 OID 23092)
502-- Name: constituencies_constituency; Type: TABLE; Schema: public; Owner: electionleaflets_production
503--
504
505CREATE TABLE constituencies_constituency (
506 constituency_id character varying(10) NOT NULL,
507 name character varying(765) NOT NULL,
508 country_name character varying(255) NOT NULL,
509 alternative_name character varying(765) NOT NULL,
510 retired integer,
511 slug character varying(255) NOT NULL,
512 count integer,
513 wikipedia_url character varying(765) NOT NULL,
514 url_id character varying(300) NOT NULL,
515 guardian_aristotle_id integer,
516 guardian_pa_code integer
517);
518
519
520ALTER TABLE constituencies_constituency OWNER TO electionleaflets_production;
521
522--
523-- TOC entry 224 (class 1259 OID 23098)
524-- Name: contentblock; Type: TABLE; Schema: public; Owner: electionleaflets_production
525--
526
527CREATE TABLE contentblock (
528 id integer NOT NULL,
529 name character varying(64) NOT NULL,
530 content text NOT NULL
531);
532
533
534ALTER TABLE contentblock OWNER TO electionleaflets_production;
535
536--
537-- TOC entry 225 (class 1259 OID 23104)
538-- Name: contentblock_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
539--
540
541CREATE SEQUENCE contentblock_id_seq
542 START WITH 1
543 INCREMENT BY 1
544 NO MINVALUE
545 NO MAXVALUE
546 CACHE 1;
547
548
549ALTER TABLE contentblock_id_seq OWNER TO electionleaflets_production;
550
551--
552-- TOC entry 4972 (class 0 OID 0)
553-- Dependencies: 225
554-- Name: contentblock_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
555--
556
557ALTER SEQUENCE contentblock_id_seq OWNED BY contentblock.id;
558
559
560--
561-- TOC entry 226 (class 1259 OID 23106)
562-- Name: country; Type: TABLE; Schema: public; Owner: electionleaflets_production
563--
564
565CREATE TABLE country (
566 country_id integer NOT NULL,
567 iso character varying(6) NOT NULL,
568 name character varying(240) NOT NULL,
569 iso3 character varying(9) NOT NULL
570);
571
572
573ALTER TABLE country OWNER TO electionleaflets_production;
574
575--
576-- TOC entry 227 (class 1259 OID 23109)
577-- Name: django_admin_log; Type: TABLE; Schema: public; Owner: electionleaflets_production
578--
579
580CREATE TABLE django_admin_log (
581 id integer NOT NULL,
582 action_time timestamp with time zone NOT NULL,
583 object_id text,
584 object_repr character varying(200) NOT NULL,
585 action_flag smallint NOT NULL,
586 change_message text NOT NULL,
587 content_type_id integer,
588 user_id integer NOT NULL,
589 CONSTRAINT django_admin_log_action_flag_check CHECK ((action_flag >= 0))
590);
591
592
593ALTER TABLE django_admin_log OWNER TO electionleaflets_production;
594
595--
596-- TOC entry 228 (class 1259 OID 23116)
597-- Name: django_admin_log_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
598--
599
600CREATE SEQUENCE django_admin_log_id_seq
601 START WITH 1
602 INCREMENT BY 1
603 NO MINVALUE
604 NO MAXVALUE
605 CACHE 1;
606
607
608ALTER TABLE django_admin_log_id_seq OWNER TO electionleaflets_production;
609
610--
611-- TOC entry 4973 (class 0 OID 0)
612-- Dependencies: 228
613-- Name: django_admin_log_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
614--
615
616ALTER SEQUENCE django_admin_log_id_seq OWNED BY django_admin_log.id;
617
618
619--
620-- TOC entry 229 (class 1259 OID 23118)
621-- Name: django_content_type; Type: TABLE; Schema: public; Owner: electionleaflets_production
622--
623
624CREATE TABLE django_content_type (
625 id integer NOT NULL,
626 app_label character varying(100) NOT NULL,
627 model character varying(100) NOT NULL
628);
629
630
631ALTER TABLE django_content_type OWNER TO electionleaflets_production;
632
633--
634-- TOC entry 230 (class 1259 OID 23121)
635-- Name: django_content_type_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
636--
637
638CREATE SEQUENCE django_content_type_id_seq
639 START WITH 1
640 INCREMENT BY 1
641 NO MINVALUE
642 NO MAXVALUE
643 CACHE 1;
644
645
646ALTER TABLE django_content_type_id_seq OWNER TO electionleaflets_production;
647
648--
649-- TOC entry 4974 (class 0 OID 0)
650-- Dependencies: 230
651-- Name: django_content_type_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
652--
653
654ALTER SEQUENCE django_content_type_id_seq OWNED BY django_content_type.id;
655
656
657--
658-- TOC entry 231 (class 1259 OID 23123)
659-- Name: django_migrations; Type: TABLE; Schema: public; Owner: electionleaflets_production
660--
661
662CREATE TABLE django_migrations (
663 id integer NOT NULL,
664 app character varying(255) NOT NULL,
665 name character varying(255) NOT NULL,
666 applied timestamp with time zone NOT NULL
667);
668
669
670ALTER TABLE django_migrations OWNER TO electionleaflets_production;
671
672--
673-- TOC entry 232 (class 1259 OID 23129)
674-- Name: django_migrations_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
675--
676
677CREATE SEQUENCE django_migrations_id_seq
678 START WITH 1
679 INCREMENT BY 1
680 NO MINVALUE
681 NO MAXVALUE
682 CACHE 1;
683
684
685ALTER TABLE django_migrations_id_seq OWNER TO electionleaflets_production;
686
687--
688-- TOC entry 4975 (class 0 OID 0)
689-- Dependencies: 232
690-- Name: django_migrations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
691--
692
693ALTER SEQUENCE django_migrations_id_seq OWNED BY django_migrations.id;
694
695
696--
697-- TOC entry 233 (class 1259 OID 23131)
698-- Name: django_session; Type: TABLE; Schema: public; Owner: electionleaflets_production
699--
700
701CREATE TABLE django_session (
702 session_key character varying(40) NOT NULL,
703 session_data text NOT NULL,
704 expire_date timestamp with time zone NOT NULL
705);
706
707
708ALTER TABLE django_session OWNER TO electionleaflets_production;
709
710--
711-- TOC entry 234 (class 1259 OID 23137)
712-- Name: django_site; Type: TABLE; Schema: public; Owner: electionleaflets_production
713--
714
715CREATE TABLE django_site (
716 id integer NOT NULL,
717 domain character varying(100) NOT NULL,
718 name character varying(50) NOT NULL
719);
720
721
722ALTER TABLE django_site OWNER TO electionleaflets_production;
723
724--
725-- TOC entry 235 (class 1259 OID 23140)
726-- Name: django_site_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
727--
728
729CREATE SEQUENCE django_site_id_seq
730 START WITH 1
731 INCREMENT BY 1
732 NO MINVALUE
733 NO MAXVALUE
734 CACHE 1;
735
736
737ALTER TABLE django_site_id_seq OWNER TO electionleaflets_production;
738
739--
740-- TOC entry 4976 (class 0 OID 0)
741-- Dependencies: 235
742-- Name: django_site_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
743--
744
745ALTER SEQUENCE django_site_id_seq OWNED BY django_site.id;
746
747
748--
749-- TOC entry 236 (class 1259 OID 23142)
750-- Name: djkombu_message; Type: TABLE; Schema: public; Owner: electionleaflets_production
751--
752
753CREATE TABLE djkombu_message (
754 id integer NOT NULL,
755 visible boolean NOT NULL,
756 sent_at timestamp with time zone,
757 payload text NOT NULL,
758 queue_id integer NOT NULL
759);
760
761
762ALTER TABLE djkombu_message OWNER TO electionleaflets_production;
763
764--
765-- TOC entry 237 (class 1259 OID 23148)
766-- Name: djkombu_message_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
767--
768
769CREATE SEQUENCE djkombu_message_id_seq
770 START WITH 1
771 INCREMENT BY 1
772 NO MINVALUE
773 NO MAXVALUE
774 CACHE 1;
775
776
777ALTER TABLE djkombu_message_id_seq OWNER TO electionleaflets_production;
778
779--
780-- TOC entry 4977 (class 0 OID 0)
781-- Dependencies: 237
782-- Name: djkombu_message_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
783--
784
785ALTER SEQUENCE djkombu_message_id_seq OWNED BY djkombu_message.id;
786
787
788--
789-- TOC entry 238 (class 1259 OID 23150)
790-- Name: djkombu_queue; Type: TABLE; Schema: public; Owner: electionleaflets_production
791--
792
793CREATE TABLE djkombu_queue (
794 id integer NOT NULL,
795 name character varying(200) NOT NULL
796);
797
798
799ALTER TABLE djkombu_queue OWNER TO electionleaflets_production;
800
801--
802-- TOC entry 239 (class 1259 OID 23153)
803-- Name: djkombu_queue_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
804--
805
806CREATE SEQUENCE djkombu_queue_id_seq
807 START WITH 1
808 INCREMENT BY 1
809 NO MINVALUE
810 NO MAXVALUE
811 CACHE 1;
812
813
814ALTER TABLE djkombu_queue_id_seq OWNER TO electionleaflets_production;
815
816--
817-- TOC entry 4978 (class 0 OID 0)
818-- Dependencies: 239
819-- Name: djkombu_queue_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
820--
821
822ALTER SEQUENCE djkombu_queue_id_seq OWNED BY djkombu_queue.id;
823
824
825--
826-- TOC entry 240 (class 1259 OID 23155)
827-- Name: el_cache; Type: TABLE; Schema: public; Owner: electionleaflets_production
828--
829
830CREATE TABLE el_cache (
831 cache_key character varying(255) NOT NULL,
832 value text NOT NULL,
833 expires timestamp with time zone NOT NULL
834);
835
836
837ALTER TABLE el_cache OWNER TO electionleaflets_production;
838
839--
840-- TOC entry 241 (class 1259 OID 23161)
841-- Name: elections_election; Type: TABLE; Schema: public; Owner: electionleaflets_production
842--
843
844CREATE TABLE elections_election (
845 id integer NOT NULL,
846 name character varying(128) NOT NULL,
847 description text NOT NULL,
848 live_date timestamp with time zone NOT NULL,
849 dead_date timestamp with time zone NOT NULL,
850 active boolean NOT NULL,
851 country_id integer
852);
853
854
855ALTER TABLE elections_election OWNER TO electionleaflets_production;
856
857--
858-- TOC entry 242 (class 1259 OID 23167)
859-- Name: elections_election_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
860--
861
862CREATE SEQUENCE elections_election_id_seq
863 START WITH 1
864 INCREMENT BY 1
865 NO MINVALUE
866 NO MAXVALUE
867 CACHE 1;
868
869
870ALTER TABLE elections_election_id_seq OWNER TO electionleaflets_production;
871
872--
873-- TOC entry 4979 (class 0 OID 0)
874-- Dependencies: 242
875-- Name: elections_election_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
876--
877
878ALTER SEQUENCE elections_election_id_seq OWNED BY elections_election.id;
879
880
881--
882-- TOC entry 243 (class 1259 OID 23169)
883-- Name: email_alert; Type: TABLE; Schema: public; Owner: electionleaflets_production
884--
885
886CREATE TABLE email_alert (
887 email_alert_id integer NOT NULL,
888 email character varying(150) NOT NULL,
889 frequency_hours integer NOT NULL,
890 last_sent timestamp with time zone,
891 type character varying(150) NOT NULL,
892 parent_id integer NOT NULL,
893 activated integer,
894 confirm_id character varying(300) NOT NULL,
895 title character varying(765) NOT NULL
896);
897
898
899ALTER TABLE email_alert OWNER TO electionleaflets_production;
900
901--
902-- TOC entry 244 (class 1259 OID 23175)
903-- Name: email_que; Type: TABLE; Schema: public; Owner: electionleaflets_production
904--
905
906CREATE TABLE email_que (
907 email_que_id integer NOT NULL,
908 name character varying(765) NOT NULL,
909 email character varying(765) NOT NULL,
910 postcode character varying(60) NOT NULL,
911 delivery_date timestamp with time zone NOT NULL
912);
913
914
915ALTER TABLE email_que OWNER TO electionleaflets_production;
916
917--
918-- TOC entry 245 (class 1259 OID 23181)
919-- Name: image_que; Type: TABLE; Schema: public; Owner: electionleaflets_production
920--
921
922CREATE TABLE image_que (
923 image_que_id integer NOT NULL,
924 upload_key character varying(765) NOT NULL,
925 name character varying(300) NOT NULL,
926 email character varying(300) NOT NULL,
927 image_key character varying(765) NOT NULL,
928 uploaded_date timestamp with time zone NOT NULL
929);
930
931
932ALTER TABLE image_que OWNER TO electionleaflets_production;
933
934--
935-- TOC entry 246 (class 1259 OID 23187)
936-- Name: image_que_seq; Type: TABLE; Schema: public; Owner: electionleaflets_production
937--
938
939CREATE TABLE image_que_seq (
940 sequence integer NOT NULL
941);
942
943
944ALTER TABLE image_que_seq OWNER TO electionleaflets_production;
945
946--
947-- TOC entry 247 (class 1259 OID 23190)
948-- Name: leaflets_leaflet; Type: TABLE; Schema: public; Owner: electionleaflets_production
949--
950
951CREATE TABLE leaflets_leaflet (
952 id integer NOT NULL,
953 title character varying(765) NOT NULL,
954 description text,
955 imprint text,
956 postcode character varying(150) NOT NULL,
957 name character varying(300) NOT NULL,
958 email character varying(300) NOT NULL,
959 date_uploaded timestamp with time zone NOT NULL,
960 date_delivered timestamp with time zone,
961 constituency_id character varying(10),
962 publisher_party_id character varying(100),
963 status character varying(255),
964 location geometry(Point,4326),
965 person_id integer,
966 reviewed boolean NOT NULL,
967 election_id integer,
968 publisher_person_id integer
969);
970
971
972ALTER TABLE leaflets_leaflet OWNER TO electionleaflets_production;
973
974--
975-- TOC entry 248 (class 1259 OID 23196)
976-- Name: leaflets_leaflet_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
977--
978
979CREATE SEQUENCE leaflets_leaflet_id_seq
980 START WITH 1
981 INCREMENT BY 1
982 NO MINVALUE
983 NO MAXVALUE
984 CACHE 1;
985
986
987ALTER TABLE leaflets_leaflet_id_seq OWNER TO electionleaflets_production;
988
989--
990-- TOC entry 4980 (class 0 OID 0)
991-- Dependencies: 248
992-- Name: leaflets_leaflet_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
993--
994
995ALTER SEQUENCE leaflets_leaflet_id_seq OWNED BY leaflets_leaflet.id;
996
997
998--
999-- TOC entry 249 (class 1259 OID 23198)
1000-- Name: leaflets_leafletimage; Type: TABLE; Schema: public; Owner: electionleaflets_production
1001--
1002
1003CREATE TABLE leaflets_leafletimage (
1004 id integer NOT NULL,
1005 image character varying(255) NOT NULL,
1006 leaflet_id integer NOT NULL,
1007 image_type character varying(255),
1008 legacy_image_key character varying(255),
1009 image_text text NOT NULL,
1010 raw_image character varying(255) NOT NULL,
1011 exif_data bytea,
1012 orientation smallint NOT NULL,
1013 CONSTRAINT leaflets_leafletimage_orientation_check CHECK ((orientation >= 0))
1014);
1015
1016
1017ALTER TABLE leaflets_leafletimage OWNER TO electionleaflets_production;
1018
1019--
1020-- TOC entry 250 (class 1259 OID 23204)
1021-- Name: leaflets_leafletimage_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1022--
1023
1024CREATE SEQUENCE leaflets_leafletimage_id_seq
1025 START WITH 1
1026 INCREMENT BY 1
1027 NO MINVALUE
1028 NO MAXVALUE
1029 CACHE 1;
1030
1031
1032ALTER TABLE leaflets_leafletimage_id_seq OWNER TO electionleaflets_production;
1033
1034--
1035-- TOC entry 4981 (class 0 OID 0)
1036-- Dependencies: 250
1037-- Name: leaflets_leafletimage_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1038--
1039
1040ALTER SEQUENCE leaflets_leafletimage_id_seq OWNED BY leaflets_leafletimage.id;
1041
1042
1043--
1044-- TOC entry 251 (class 1259 OID 23206)
1045-- Name: party; Type: TABLE; Schema: public; Owner: electionleaflets_production
1046--
1047
1048CREATE TABLE party (
1049 id integer NOT NULL,
1050 name character varying(765) NOT NULL,
1051 country_id integer NOT NULL,
1052 major integer,
1053 logo_file character varying(300) NOT NULL,
1054 url_id character varying(765) NOT NULL,
1055 colour character varying(18) NOT NULL,
1056 twitter_account character varying(150) NOT NULL,
1057 slug character varying(255) NOT NULL,
1058 count integer NOT NULL,
1059 popular integer NOT NULL,
1060 force_top integer NOT NULL,
1061 show_on_add_page boolean NOT NULL
1062);
1063
1064
1065ALTER TABLE party OWNER TO electionleaflets_production;
1066
1067--
1068-- TOC entry 252 (class 1259 OID 23212)
1069-- Name: party_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1070--
1071
1072CREATE SEQUENCE party_id_seq
1073 START WITH 1
1074 INCREMENT BY 1
1075 NO MINVALUE
1076 NO MAXVALUE
1077 CACHE 1;
1078
1079
1080ALTER TABLE party_id_seq OWNER TO electionleaflets_production;
1081
1082--
1083-- TOC entry 4982 (class 0 OID 0)
1084-- Dependencies: 252
1085-- Name: party_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1086--
1087
1088ALTER SEQUENCE party_id_seq OWNED BY party.id;
1089
1090
1091--
1092-- TOC entry 253 (class 1259 OID 23214)
1093-- Name: people_partymemberships; Type: TABLE; Schema: public; Owner: electionleaflets_production
1094--
1095
1096CREATE TABLE people_partymemberships (
1097 id integer NOT NULL,
1098 membership_start date NOT NULL,
1099 membership_end date,
1100 party_id character varying(100) NOT NULL,
1101 person_id integer NOT NULL
1102);
1103
1104
1105ALTER TABLE people_partymemberships OWNER TO electionleaflets_production;
1106
1107--
1108-- TOC entry 254 (class 1259 OID 23217)
1109-- Name: people_partymemberships_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1110--
1111
1112CREATE SEQUENCE people_partymemberships_id_seq
1113 START WITH 1
1114 INCREMENT BY 1
1115 NO MINVALUE
1116 NO MAXVALUE
1117 CACHE 1;
1118
1119
1120ALTER TABLE people_partymemberships_id_seq OWNER TO electionleaflets_production;
1121
1122--
1123-- TOC entry 4983 (class 0 OID 0)
1124-- Dependencies: 254
1125-- Name: people_partymemberships_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1126--
1127
1128ALTER SEQUENCE people_partymemberships_id_seq OWNED BY people_partymemberships.id;
1129
1130
1131--
1132-- TOC entry 255 (class 1259 OID 23219)
1133-- Name: people_person; Type: TABLE; Schema: public; Owner: electionleaflets_production
1134--
1135
1136CREATE TABLE people_person (
1137 id integer NOT NULL,
1138 name character varying(255) NOT NULL,
1139 remote_id character varying(255),
1140 source_url character varying(200),
1141 source_name character varying(100) NOT NULL,
1142 image_url character varying(200)
1143);
1144
1145
1146ALTER TABLE people_person OWNER TO electionleaflets_production;
1147
1148--
1149-- TOC entry 256 (class 1259 OID 23225)
1150-- Name: people_person_elections; Type: TABLE; Schema: public; Owner: electionleaflets_production
1151--
1152
1153CREATE TABLE people_person_elections (
1154 id integer NOT NULL,
1155 person_id integer NOT NULL,
1156 election_id integer NOT NULL
1157);
1158
1159
1160ALTER TABLE people_person_elections OWNER TO electionleaflets_production;
1161
1162--
1163-- TOC entry 257 (class 1259 OID 23228)
1164-- Name: people_person_elections_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1165--
1166
1167CREATE SEQUENCE people_person_elections_id_seq
1168 START WITH 1
1169 INCREMENT BY 1
1170 NO MINVALUE
1171 NO MAXVALUE
1172 CACHE 1;
1173
1174
1175ALTER TABLE people_person_elections_id_seq OWNER TO electionleaflets_production;
1176
1177--
1178-- TOC entry 4984 (class 0 OID 0)
1179-- Dependencies: 257
1180-- Name: people_person_elections_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1181--
1182
1183ALTER SEQUENCE people_person_elections_id_seq OWNED BY people_person_elections.id;
1184
1185
1186--
1187-- TOC entry 258 (class 1259 OID 23230)
1188-- Name: people_person_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1189--
1190
1191CREATE SEQUENCE people_person_id_seq
1192 START WITH 1
1193 INCREMENT BY 1
1194 NO MINVALUE
1195 NO MAXVALUE
1196 CACHE 1;
1197
1198
1199ALTER TABLE people_person_id_seq OWNER TO electionleaflets_production;
1200
1201--
1202-- TOC entry 4985 (class 0 OID 0)
1203-- Dependencies: 258
1204-- Name: people_person_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1205--
1206
1207ALTER SEQUENCE people_person_id_seq OWNED BY people_person.id;
1208
1209
1210--
1211-- TOC entry 259 (class 1259 OID 23232)
1212-- Name: people_personconstituencies; Type: TABLE; Schema: public; Owner: electionleaflets_production
1213--
1214
1215CREATE TABLE people_personconstituencies (
1216 id integer NOT NULL,
1217 constituency_id character varying(10) NOT NULL,
1218 election_id integer NOT NULL,
1219 person_id integer NOT NULL
1220);
1221
1222
1223ALTER TABLE people_personconstituencies OWNER TO electionleaflets_production;
1224
1225--
1226-- TOC entry 260 (class 1259 OID 23235)
1227-- Name: people_personconstituencies_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1228--
1229
1230CREATE SEQUENCE people_personconstituencies_id_seq
1231 START WITH 1
1232 INCREMENT BY 1
1233 NO MINVALUE
1234 NO MAXVALUE
1235 CACHE 1;
1236
1237
1238ALTER TABLE people_personconstituencies_id_seq OWNER TO electionleaflets_production;
1239
1240--
1241-- TOC entry 4986 (class 0 OID 0)
1242-- Dependencies: 260
1243-- Name: people_personconstituencies_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1244--
1245
1246ALTER SEQUENCE people_personconstituencies_id_seq OWNED BY people_personconstituencies.id;
1247
1248
1249--
1250-- TOC entry 261 (class 1259 OID 23237)
1251-- Name: promise; Type: TABLE; Schema: public; Owner: electionleaflets_production
1252--
1253
1254CREATE TABLE promise (
1255 promise_id integer NOT NULL,
1256 leaflet_id integer NOT NULL,
1257 detail text NOT NULL
1258);
1259
1260
1261ALTER TABLE promise OWNER TO electionleaflets_production;
1262
1263--
1264-- TOC entry 262 (class 1259 OID 23243)
1265-- Name: rate_interesting; Type: TABLE; Schema: public; Owner: electionleaflets_production
1266--
1267
1268CREATE TABLE rate_interesting (
1269 rate_interesting_id integer NOT NULL,
1270 leaflet_id integer NOT NULL,
1271 description text NOT NULL,
1272 user_name character varying(765) NOT NULL,
1273 user_email character varying(765) NOT NULL
1274);
1275
1276
1277ALTER TABLE rate_interesting OWNER TO electionleaflets_production;
1278
1279--
1280-- TOC entry 263 (class 1259 OID 23249)
1281-- Name: rate_interesting_seq; Type: TABLE; Schema: public; Owner: electionleaflets_production
1282--
1283
1284CREATE TABLE rate_interesting_seq (
1285 sequence integer NOT NULL
1286);
1287
1288
1289ALTER TABLE rate_interesting_seq OWNER TO electionleaflets_production;
1290
1291--
1292-- TOC entry 264 (class 1259 OID 23252)
1293-- Name: rate_type; Type: TABLE; Schema: public; Owner: electionleaflets_production
1294--
1295
1296CREATE TABLE rate_type (
1297 rate_type_id integer NOT NULL,
1298 left_label character varying(150) NOT NULL,
1299 right_label character varying(150) NOT NULL
1300);
1301
1302
1303ALTER TABLE rate_type OWNER TO electionleaflets_production;
1304
1305--
1306-- TOC entry 265 (class 1259 OID 23255)
1307-- Name: rate_value; Type: TABLE; Schema: public; Owner: electionleaflets_production
1308--
1309
1310CREATE TABLE rate_value (
1311 rate_value_id integer NOT NULL,
1312 leaflet_id integer NOT NULL,
1313 user_name character varying(300) NOT NULL,
1314 user_email character varying(300) NOT NULL,
1315 rate_type_id integer NOT NULL,
1316 value integer NOT NULL
1317);
1318
1319
1320ALTER TABLE rate_value OWNER TO electionleaflets_production;
1321
1322--
1323-- TOC entry 266 (class 1259 OID 23261)
1324-- Name: rate_value_seq; Type: TABLE; Schema: public; Owner: electionleaflets_production
1325--
1326
1327CREATE TABLE rate_value_seq (
1328 sequence integer NOT NULL
1329);
1330
1331
1332ALTER TABLE rate_value_seq OWNER TO electionleaflets_production;
1333
1334--
1335-- TOC entry 267 (class 1259 OID 23264)
1336-- Name: socialaccount_socialaccount; Type: TABLE; Schema: public; Owner: electionleaflets_production
1337--
1338
1339CREATE TABLE socialaccount_socialaccount (
1340 id integer NOT NULL,
1341 user_id integer NOT NULL,
1342 provider character varying(30) NOT NULL,
1343 uid character varying(191) NOT NULL,
1344 last_login timestamp with time zone NOT NULL,
1345 date_joined timestamp with time zone NOT NULL,
1346 extra_data text NOT NULL
1347);
1348
1349
1350ALTER TABLE socialaccount_socialaccount OWNER TO electionleaflets_production;
1351
1352--
1353-- TOC entry 268 (class 1259 OID 23270)
1354-- Name: socialaccount_socialaccount_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1355--
1356
1357CREATE SEQUENCE socialaccount_socialaccount_id_seq
1358 START WITH 1
1359 INCREMENT BY 1
1360 NO MINVALUE
1361 NO MAXVALUE
1362 CACHE 1;
1363
1364
1365ALTER TABLE socialaccount_socialaccount_id_seq OWNER TO electionleaflets_production;
1366
1367--
1368-- TOC entry 4987 (class 0 OID 0)
1369-- Dependencies: 268
1370-- Name: socialaccount_socialaccount_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1371--
1372
1373ALTER SEQUENCE socialaccount_socialaccount_id_seq OWNED BY socialaccount_socialaccount.id;
1374
1375
1376--
1377-- TOC entry 269 (class 1259 OID 23272)
1378-- Name: socialaccount_socialapp; Type: TABLE; Schema: public; Owner: electionleaflets_production
1379--
1380
1381CREATE TABLE socialaccount_socialapp (
1382 id integer NOT NULL,
1383 provider character varying(30) NOT NULL,
1384 name character varying(40) NOT NULL,
1385 client_id character varying(191) NOT NULL,
1386 secret character varying(191) NOT NULL,
1387 key character varying(191) NOT NULL
1388);
1389
1390
1391ALTER TABLE socialaccount_socialapp OWNER TO electionleaflets_production;
1392
1393--
1394-- TOC entry 270 (class 1259 OID 23275)
1395-- Name: socialaccount_socialapp_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1396--
1397
1398CREATE SEQUENCE socialaccount_socialapp_id_seq
1399 START WITH 1
1400 INCREMENT BY 1
1401 NO MINVALUE
1402 NO MAXVALUE
1403 CACHE 1;
1404
1405
1406ALTER TABLE socialaccount_socialapp_id_seq OWNER TO electionleaflets_production;
1407
1408--
1409-- TOC entry 4988 (class 0 OID 0)
1410-- Dependencies: 270
1411-- Name: socialaccount_socialapp_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1412--
1413
1414ALTER SEQUENCE socialaccount_socialapp_id_seq OWNED BY socialaccount_socialapp.id;
1415
1416
1417--
1418-- TOC entry 271 (class 1259 OID 23277)
1419-- Name: socialaccount_socialapp_sites; Type: TABLE; Schema: public; Owner: electionleaflets_production
1420--
1421
1422CREATE TABLE socialaccount_socialapp_sites (
1423 id integer NOT NULL,
1424 socialapp_id integer NOT NULL,
1425 site_id integer NOT NULL
1426);
1427
1428
1429ALTER TABLE socialaccount_socialapp_sites OWNER TO electionleaflets_production;
1430
1431--
1432-- TOC entry 272 (class 1259 OID 23280)
1433-- Name: socialaccount_socialapp_sites_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1434--
1435
1436CREATE SEQUENCE socialaccount_socialapp_sites_id_seq
1437 START WITH 1
1438 INCREMENT BY 1
1439 NO MINVALUE
1440 NO MAXVALUE
1441 CACHE 1;
1442
1443
1444ALTER TABLE socialaccount_socialapp_sites_id_seq OWNER TO electionleaflets_production;
1445
1446--
1447-- TOC entry 4989 (class 0 OID 0)
1448-- Dependencies: 272
1449-- Name: socialaccount_socialapp_sites_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1450--
1451
1452ALTER SEQUENCE socialaccount_socialapp_sites_id_seq OWNED BY socialaccount_socialapp_sites.id;
1453
1454
1455--
1456-- TOC entry 273 (class 1259 OID 23282)
1457-- Name: socialaccount_socialtoken; Type: TABLE; Schema: public; Owner: electionleaflets_production
1458--
1459
1460CREATE TABLE socialaccount_socialtoken (
1461 id integer NOT NULL,
1462 app_id integer NOT NULL,
1463 account_id integer NOT NULL,
1464 token text NOT NULL,
1465 token_secret text NOT NULL,
1466 expires_at timestamp with time zone
1467);
1468
1469
1470ALTER TABLE socialaccount_socialtoken OWNER TO electionleaflets_production;
1471
1472--
1473-- TOC entry 274 (class 1259 OID 23288)
1474-- Name: socialaccount_socialtoken_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1475--
1476
1477CREATE SEQUENCE socialaccount_socialtoken_id_seq
1478 START WITH 1
1479 INCREMENT BY 1
1480 NO MINVALUE
1481 NO MAXVALUE
1482 CACHE 1;
1483
1484
1485ALTER TABLE socialaccount_socialtoken_id_seq OWNER TO electionleaflets_production;
1486
1487--
1488-- TOC entry 4990 (class 0 OID 0)
1489-- Dependencies: 274
1490-- Name: socialaccount_socialtoken_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1491--
1492
1493ALTER SEQUENCE socialaccount_socialtoken_id_seq OWNED BY socialaccount_socialtoken.id;
1494
1495
1496--
1497-- TOC entry 275 (class 1259 OID 23290)
1498-- Name: tag; Type: TABLE; Schema: public; Owner: electionleaflets_production
1499--
1500
1501CREATE TABLE tag (
1502 id integer NOT NULL,
1503 tag character varying(765) NOT NULL,
1504 tag_clean character varying(765) NOT NULL,
1505 slug character varying(255) NOT NULL,
1506 dead integer
1507);
1508
1509
1510ALTER TABLE tag OWNER TO electionleaflets_production;
1511
1512--
1513-- TOC entry 276 (class 1259 OID 23296)
1514-- Name: tag_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1515--
1516
1517CREATE SEQUENCE tag_id_seq
1518 START WITH 1
1519 INCREMENT BY 1
1520 NO MINVALUE
1521 NO MAXVALUE
1522 CACHE 1;
1523
1524
1525ALTER TABLE tag_id_seq OWNER TO electionleaflets_production;
1526
1527--
1528-- TOC entry 4991 (class 0 OID 0)
1529-- Dependencies: 276
1530-- Name: tag_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1531--
1532
1533ALTER SEQUENCE tag_id_seq OWNED BY tag.id;
1534
1535
1536--
1537-- TOC entry 277 (class 1259 OID 23298)
1538-- Name: thumbnail_kvstore; Type: TABLE; Schema: public; Owner: electionleaflets_production
1539--
1540
1541CREATE TABLE thumbnail_kvstore (
1542 key character varying(200) NOT NULL,
1543 value text NOT NULL
1544);
1545
1546
1547ALTER TABLE thumbnail_kvstore OWNER TO electionleaflets_production;
1548
1549--
1550-- TOC entry 278 (class 1259 OID 23304)
1551-- Name: uk_political_parties_party; Type: TABLE; Schema: public; Owner: electionleaflets_production
1552--
1553
1554CREATE TABLE uk_political_parties_party (
1555 party_id character varying(100) NOT NULL,
1556 party_name character varying(765) NOT NULL,
1557 registered_date date NOT NULL,
1558 party_address text NOT NULL,
1559 postcode character varying(15),
1560 email character varying(75),
1561 status character varying(100) NOT NULL,
1562 slug character varying(50) NOT NULL,
1563 party_type character varying(100) NOT NULL,
1564 register character varying(255),
1565 weight integer
1566);
1567
1568
1569ALTER TABLE uk_political_parties_party OWNER TO electionleaflets_production;
1570
1571--
1572-- TOC entry 279 (class 1259 OID 23310)
1573-- Name: uk_political_parties_partyemblem; Type: TABLE; Schema: public; Owner: electionleaflets_production
1574--
1575
1576CREATE TABLE uk_political_parties_partyemblem (
1577 id integer NOT NULL,
1578 emblem_url character varying(200) NOT NULL,
1579 party_id character varying(100) NOT NULL
1580);
1581
1582
1583ALTER TABLE uk_political_parties_partyemblem OWNER TO electionleaflets_production;
1584
1585--
1586-- TOC entry 280 (class 1259 OID 23313)
1587-- Name: uk_political_parties_partyemblem_id_seq; Type: SEQUENCE; Schema: public; Owner: electionleaflets_production
1588--
1589
1590CREATE SEQUENCE uk_political_parties_partyemblem_id_seq
1591 START WITH 1
1592 INCREMENT BY 1
1593 NO MINVALUE
1594 NO MAXVALUE
1595 CACHE 1;
1596
1597
1598ALTER TABLE uk_political_parties_partyemblem_id_seq OWNER TO electionleaflets_production;
1599
1600--
1601-- TOC entry 4992 (class 0 OID 0)
1602-- Dependencies: 280
1603-- Name: uk_political_parties_partyemblem_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: electionleaflets_production
1604--
1605
1606ALTER SEQUENCE uk_political_parties_partyemblem_id_seq OWNED BY uk_political_parties_partyemblem.id;
1607
1608
1609--
1610-- TOC entry 4576 (class 2604 OID 23315)
1611-- Name: account_emailaddress id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1612--
1613
1614ALTER TABLE ONLY account_emailaddress ALTER COLUMN id SET DEFAULT nextval('account_emailaddress_id_seq'::regclass);
1615
1616
1617--
1618-- TOC entry 4577 (class 2604 OID 23316)
1619-- Name: account_emailconfirmation id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1620--
1621
1622ALTER TABLE ONLY account_emailconfirmation ALTER COLUMN id SET DEFAULT nextval('account_emailconfirmation_id_seq'::regclass);
1623
1624
1625--
1626-- TOC entry 4578 (class 2604 OID 23317)
1627-- Name: analysis_leafletproperties id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1628--
1629
1630ALTER TABLE ONLY analysis_leafletproperties ALTER COLUMN id SET DEFAULT nextval('analysis_leafletproperties_id_seq'::regclass);
1631
1632
1633--
1634-- TOC entry 4579 (class 2604 OID 23318)
1635-- Name: auth_group id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1636--
1637
1638ALTER TABLE ONLY auth_group ALTER COLUMN id SET DEFAULT nextval('auth_group_id_seq'::regclass);
1639
1640
1641--
1642-- TOC entry 4580 (class 2604 OID 23319)
1643-- Name: auth_group_permissions id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1644--
1645
1646ALTER TABLE ONLY auth_group_permissions ALTER COLUMN id SET DEFAULT nextval('auth_group_permissions_id_seq'::regclass);
1647
1648
1649--
1650-- TOC entry 4581 (class 2604 OID 23320)
1651-- Name: auth_permission id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1652--
1653
1654ALTER TABLE ONLY auth_permission ALTER COLUMN id SET DEFAULT nextval('auth_permission_id_seq'::regclass);
1655
1656
1657--
1658-- TOC entry 4582 (class 2604 OID 23321)
1659-- Name: auth_user id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1660--
1661
1662ALTER TABLE ONLY auth_user ALTER COLUMN id SET DEFAULT nextval('auth_user_id_seq'::regclass);
1663
1664
1665--
1666-- TOC entry 4583 (class 2604 OID 23322)
1667-- Name: auth_user_groups id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1668--
1669
1670ALTER TABLE ONLY auth_user_groups ALTER COLUMN id SET DEFAULT nextval('auth_user_groups_id_seq'::regclass);
1671
1672
1673--
1674-- TOC entry 4584 (class 2604 OID 23323)
1675-- Name: auth_user_user_permissions id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1676--
1677
1678ALTER TABLE ONLY auth_user_user_permissions ALTER COLUMN id SET DEFAULT nextval('auth_user_user_permissions_id_seq'::regclass);
1679
1680
1681--
1682-- TOC entry 4585 (class 2604 OID 23324)
1683-- Name: boundaries_boundary id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1684--
1685
1686ALTER TABLE ONLY boundaries_boundary ALTER COLUMN id SET DEFAULT nextval('boundaries_boundary_id_seq'::regclass);
1687
1688
1689--
1690-- TOC entry 4586 (class 2604 OID 23325)
1691-- Name: category id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1692--
1693
1694ALTER TABLE ONLY category ALTER COLUMN id SET DEFAULT nextval('category_id_seq'::regclass);
1695
1696
1697--
1698-- TOC entry 4587 (class 2604 OID 23326)
1699-- Name: contentblock id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1700--
1701
1702ALTER TABLE ONLY contentblock ALTER COLUMN id SET DEFAULT nextval('contentblock_id_seq'::regclass);
1703
1704
1705--
1706-- TOC entry 4588 (class 2604 OID 23327)
1707-- Name: django_admin_log id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1708--
1709
1710ALTER TABLE ONLY django_admin_log ALTER COLUMN id SET DEFAULT nextval('django_admin_log_id_seq'::regclass);
1711
1712
1713--
1714-- TOC entry 4590 (class 2604 OID 23328)
1715-- Name: django_content_type id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1716--
1717
1718ALTER TABLE ONLY django_content_type ALTER COLUMN id SET DEFAULT nextval('django_content_type_id_seq'::regclass);
1719
1720
1721--
1722-- TOC entry 4591 (class 2604 OID 23329)
1723-- Name: django_migrations id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1724--
1725
1726ALTER TABLE ONLY django_migrations ALTER COLUMN id SET DEFAULT nextval('django_migrations_id_seq'::regclass);
1727
1728
1729--
1730-- TOC entry 4592 (class 2604 OID 23330)
1731-- Name: django_site id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1732--
1733
1734ALTER TABLE ONLY django_site ALTER COLUMN id SET DEFAULT nextval('django_site_id_seq'::regclass);
1735
1736
1737--
1738-- TOC entry 4593 (class 2604 OID 23331)
1739-- Name: djkombu_message id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1740--
1741
1742ALTER TABLE ONLY djkombu_message ALTER COLUMN id SET DEFAULT nextval('djkombu_message_id_seq'::regclass);
1743
1744
1745--
1746-- TOC entry 4594 (class 2604 OID 23332)
1747-- Name: djkombu_queue id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1748--
1749
1750ALTER TABLE ONLY djkombu_queue ALTER COLUMN id SET DEFAULT nextval('djkombu_queue_id_seq'::regclass);
1751
1752
1753--
1754-- TOC entry 4595 (class 2604 OID 23333)
1755-- Name: elections_election id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1756--
1757
1758ALTER TABLE ONLY elections_election ALTER COLUMN id SET DEFAULT nextval('elections_election_id_seq'::regclass);
1759
1760
1761--
1762-- TOC entry 4596 (class 2604 OID 23334)
1763-- Name: leaflets_leaflet id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1764--
1765
1766ALTER TABLE ONLY leaflets_leaflet ALTER COLUMN id SET DEFAULT nextval('leaflets_leaflet_id_seq'::regclass);
1767
1768
1769--
1770-- TOC entry 4597 (class 2604 OID 23335)
1771-- Name: leaflets_leafletimage id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1772--
1773
1774ALTER TABLE ONLY leaflets_leafletimage ALTER COLUMN id SET DEFAULT nextval('leaflets_leafletimage_id_seq'::regclass);
1775
1776
1777--
1778-- TOC entry 4599 (class 2604 OID 23336)
1779-- Name: party id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1780--
1781
1782ALTER TABLE ONLY party ALTER COLUMN id SET DEFAULT nextval('party_id_seq'::regclass);
1783
1784
1785--
1786-- TOC entry 4600 (class 2604 OID 23337)
1787-- Name: people_partymemberships id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1788--
1789
1790ALTER TABLE ONLY people_partymemberships ALTER COLUMN id SET DEFAULT nextval('people_partymemberships_id_seq'::regclass);
1791
1792
1793--
1794-- TOC entry 4601 (class 2604 OID 23338)
1795-- Name: people_person id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1796--
1797
1798ALTER TABLE ONLY people_person ALTER COLUMN id SET DEFAULT nextval('people_person_id_seq'::regclass);
1799
1800
1801--
1802-- TOC entry 4602 (class 2604 OID 23339)
1803-- Name: people_person_elections id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1804--
1805
1806ALTER TABLE ONLY people_person_elections ALTER COLUMN id SET DEFAULT nextval('people_person_elections_id_seq'::regclass);
1807
1808
1809--
1810-- TOC entry 4603 (class 2604 OID 23340)
1811-- Name: people_personconstituencies id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1812--
1813
1814ALTER TABLE ONLY people_personconstituencies ALTER COLUMN id SET DEFAULT nextval('people_personconstituencies_id_seq'::regclass);
1815
1816
1817--
1818-- TOC entry 4604 (class 2604 OID 23341)
1819-- Name: socialaccount_socialaccount id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1820--
1821
1822ALTER TABLE ONLY socialaccount_socialaccount ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialaccount_id_seq'::regclass);
1823
1824
1825--
1826-- TOC entry 4605 (class 2604 OID 23342)
1827-- Name: socialaccount_socialapp id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1828--
1829
1830ALTER TABLE ONLY socialaccount_socialapp ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialapp_id_seq'::regclass);
1831
1832
1833--
1834-- TOC entry 4606 (class 2604 OID 23343)
1835-- Name: socialaccount_socialapp_sites id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1836--
1837
1838ALTER TABLE ONLY socialaccount_socialapp_sites ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialapp_sites_id_seq'::regclass);
1839
1840
1841--
1842-- TOC entry 4607 (class 2604 OID 23344)
1843-- Name: socialaccount_socialtoken id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1844--
1845
1846ALTER TABLE ONLY socialaccount_socialtoken ALTER COLUMN id SET DEFAULT nextval('socialaccount_socialtoken_id_seq'::regclass);
1847
1848
1849--
1850-- TOC entry 4608 (class 2604 OID 23345)
1851-- Name: tag id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1852--
1853
1854ALTER TABLE ONLY tag ALTER COLUMN id SET DEFAULT nextval('tag_id_seq'::regclass);
1855
1856
1857--
1858-- TOC entry 4609 (class 2604 OID 23346)
1859-- Name: uk_political_parties_partyemblem id; Type: DEFAULT; Schema: public; Owner: electionleaflets_production
1860--
1861
1862ALTER TABLE ONLY uk_political_parties_partyemblem ALTER COLUMN id SET DEFAULT nextval('uk_political_parties_partyemblem_id_seq'::regclass);
1863
1864
1865--
1866-- TOC entry 4611 (class 2606 OID 31712)
1867-- Name: account_emailaddress account_emailaddress_email_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1868--
1869
1870ALTER TABLE ONLY account_emailaddress
1871 ADD CONSTRAINT account_emailaddress_email_key UNIQUE (email);
1872
1873
1874--
1875-- TOC entry 4614 (class 2606 OID 23698)
1876-- Name: account_emailaddress account_emailaddress_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1877--
1878
1879ALTER TABLE ONLY account_emailaddress
1880 ADD CONSTRAINT account_emailaddress_pkey PRIMARY KEY (id);
1881
1882
1883--
1884-- TOC entry 4618 (class 2606 OID 23700)
1885-- Name: account_emailconfirmation account_emailconfirmation_key_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1886--
1887
1888ALTER TABLE ONLY account_emailconfirmation
1889 ADD CONSTRAINT account_emailconfirmation_key_key UNIQUE (key);
1890
1891
1892--
1893-- TOC entry 4621 (class 2606 OID 23702)
1894-- Name: account_emailconfirmation account_emailconfirmation_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1895--
1896
1897ALTER TABLE ONLY account_emailconfirmation
1898 ADD CONSTRAINT account_emailconfirmation_pkey PRIMARY KEY (id);
1899
1900
1901--
1902-- TOC entry 4628 (class 2606 OID 23704)
1903-- Name: analysis_leafletproperties analysis_leafletproperties_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1904--
1905
1906ALTER TABLE ONLY analysis_leafletproperties
1907 ADD CONSTRAINT analysis_leafletproperties_pkey PRIMARY KEY (id);
1908
1909
1910--
1911-- TOC entry 4631 (class 2606 OID 23706)
1912-- Name: auth_group auth_group_name_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1913--
1914
1915ALTER TABLE ONLY auth_group
1916 ADD CONSTRAINT auth_group_name_key UNIQUE (name);
1917
1918
1919--
1920-- TOC entry 4637 (class 2606 OID 23708)
1921-- Name: auth_group_permissions auth_group_permissions_group_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1922--
1923
1924ALTER TABLE ONLY auth_group_permissions
1925 ADD CONSTRAINT auth_group_permissions_group_id_permission_id_key UNIQUE (group_id, permission_id);
1926
1927
1928--
1929-- TOC entry 4639 (class 2606 OID 23710)
1930-- Name: auth_group_permissions auth_group_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1931--
1932
1933ALTER TABLE ONLY auth_group_permissions
1934 ADD CONSTRAINT auth_group_permissions_pkey PRIMARY KEY (id);
1935
1936
1937--
1938-- TOC entry 4633 (class 2606 OID 23712)
1939-- Name: auth_group auth_group_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1940--
1941
1942ALTER TABLE ONLY auth_group
1943 ADD CONSTRAINT auth_group_pkey PRIMARY KEY (id);
1944
1945
1946--
1947-- TOC entry 4642 (class 2606 OID 23714)
1948-- Name: auth_permission auth_permission_content_type_id_codename_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1949--
1950
1951ALTER TABLE ONLY auth_permission
1952 ADD CONSTRAINT auth_permission_content_type_id_codename_key UNIQUE (content_type_id, codename);
1953
1954
1955--
1956-- TOC entry 4644 (class 2606 OID 23716)
1957-- Name: auth_permission auth_permission_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1958--
1959
1960ALTER TABLE ONLY auth_permission
1961 ADD CONSTRAINT auth_permission_pkey PRIMARY KEY (id);
1962
1963
1964--
1965-- TOC entry 4652 (class 2606 OID 23718)
1966-- Name: auth_user_groups auth_user_groups_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1967--
1968
1969ALTER TABLE ONLY auth_user_groups
1970 ADD CONSTRAINT auth_user_groups_pkey PRIMARY KEY (id);
1971
1972
1973--
1974-- TOC entry 4654 (class 2606 OID 23720)
1975-- Name: auth_user_groups auth_user_groups_user_id_group_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1976--
1977
1978ALTER TABLE ONLY auth_user_groups
1979 ADD CONSTRAINT auth_user_groups_user_id_group_id_key UNIQUE (user_id, group_id);
1980
1981
1982--
1983-- TOC entry 4646 (class 2606 OID 23722)
1984-- Name: auth_user auth_user_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1985--
1986
1987ALTER TABLE ONLY auth_user
1988 ADD CONSTRAINT auth_user_pkey PRIMARY KEY (id);
1989
1990
1991--
1992-- TOC entry 4658 (class 2606 OID 23724)
1993-- Name: auth_user_user_permissions auth_user_user_permissions_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
1994--
1995
1996ALTER TABLE ONLY auth_user_user_permissions
1997 ADD CONSTRAINT auth_user_user_permissions_pkey PRIMARY KEY (id);
1998
1999
2000--
2001-- TOC entry 4660 (class 2606 OID 23726)
2002-- Name: auth_user_user_permissions auth_user_user_permissions_user_id_permission_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2003--
2004
2005ALTER TABLE ONLY auth_user_user_permissions
2006 ADD CONSTRAINT auth_user_user_permissions_user_id_permission_id_key UNIQUE (user_id, permission_id);
2007
2008
2009--
2010-- TOC entry 4648 (class 2606 OID 23728)
2011-- Name: auth_user auth_user_username_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2012--
2013
2014ALTER TABLE ONLY auth_user
2015 ADD CONSTRAINT auth_user_username_key UNIQUE (username);
2016
2017
2018--
2019-- TOC entry 4663 (class 2606 OID 23730)
2020-- Name: boundaries_boundary boundaries_boundary_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2021--
2022
2023ALTER TABLE ONLY boundaries_boundary
2024 ADD CONSTRAINT boundaries_boundary_pkey PRIMARY KEY (id);
2025
2026
2027--
2028-- TOC entry 4665 (class 2606 OID 23732)
2029-- Name: category category_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2030--
2031
2032ALTER TABLE ONLY category
2033 ADD CONSTRAINT category_pkey PRIMARY KEY (id);
2034
2035
2036--
2037-- TOC entry 4670 (class 2606 OID 23734)
2038-- Name: constituencies_constituency constituencies_constituency_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2039--
2040
2041ALTER TABLE ONLY constituencies_constituency
2042 ADD CONSTRAINT constituencies_constituency_pkey PRIMARY KEY (constituency_id);
2043
2044
2045--
2046-- TOC entry 4674 (class 2606 OID 23736)
2047-- Name: contentblock contentblock_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2048--
2049
2050ALTER TABLE ONLY contentblock
2051 ADD CONSTRAINT contentblock_pkey PRIMARY KEY (id);
2052
2053
2054--
2055-- TOC entry 4676 (class 2606 OID 23738)
2056-- Name: country country_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2057--
2058
2059ALTER TABLE ONLY country
2060 ADD CONSTRAINT country_pkey PRIMARY KEY (country_id);
2061
2062
2063--
2064-- TOC entry 4680 (class 2606 OID 23740)
2065-- Name: django_admin_log django_admin_log_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2066--
2067
2068ALTER TABLE ONLY django_admin_log
2069 ADD CONSTRAINT django_admin_log_pkey PRIMARY KEY (id);
2070
2071
2072--
2073-- TOC entry 4682 (class 2606 OID 23742)
2074-- Name: django_content_type django_content_type_app_label_45f3b1d93ec8c61c_uniq; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2075--
2076
2077ALTER TABLE ONLY django_content_type
2078 ADD CONSTRAINT django_content_type_app_label_45f3b1d93ec8c61c_uniq UNIQUE (app_label, model);
2079
2080
2081--
2082-- TOC entry 4684 (class 2606 OID 23744)
2083-- Name: django_content_type django_content_type_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2084--
2085
2086ALTER TABLE ONLY django_content_type
2087 ADD CONSTRAINT django_content_type_pkey PRIMARY KEY (id);
2088
2089
2090--
2091-- TOC entry 4686 (class 2606 OID 23746)
2092-- Name: django_migrations django_migrations_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2093--
2094
2095ALTER TABLE ONLY django_migrations
2096 ADD CONSTRAINT django_migrations_pkey PRIMARY KEY (id);
2097
2098
2099--
2100-- TOC entry 4689 (class 2606 OID 23748)
2101-- Name: django_session django_session_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2102--
2103
2104ALTER TABLE ONLY django_session
2105 ADD CONSTRAINT django_session_pkey PRIMARY KEY (session_key);
2106
2107
2108--
2109-- TOC entry 4692 (class 2606 OID 31726)
2110-- Name: django_site django_site_domain_a2e37b91_uniq; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2111--
2112
2113ALTER TABLE ONLY django_site
2114 ADD CONSTRAINT django_site_domain_a2e37b91_uniq UNIQUE (domain);
2115
2116
2117--
2118-- TOC entry 4694 (class 2606 OID 23750)
2119-- Name: django_site django_site_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2120--
2121
2122ALTER TABLE ONLY django_site
2123 ADD CONSTRAINT django_site_pkey PRIMARY KEY (id);
2124
2125
2126--
2127-- TOC entry 4696 (class 2606 OID 23752)
2128-- Name: djkombu_message djkombu_message_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2129--
2130
2131ALTER TABLE ONLY djkombu_message
2132 ADD CONSTRAINT djkombu_message_pkey PRIMARY KEY (id);
2133
2134
2135--
2136-- TOC entry 4701 (class 2606 OID 23754)
2137-- Name: djkombu_queue djkombu_queue_name_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2138--
2139
2140ALTER TABLE ONLY djkombu_queue
2141 ADD CONSTRAINT djkombu_queue_name_key UNIQUE (name);
2142
2143
2144--
2145-- TOC entry 4704 (class 2606 OID 23756)
2146-- Name: djkombu_queue djkombu_queue_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2147--
2148
2149ALTER TABLE ONLY djkombu_queue
2150 ADD CONSTRAINT djkombu_queue_pkey PRIMARY KEY (id);
2151
2152
2153--
2154-- TOC entry 4707 (class 2606 OID 23758)
2155-- Name: el_cache el_cache_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2156--
2157
2158ALTER TABLE ONLY el_cache
2159 ADD CONSTRAINT el_cache_pkey PRIMARY KEY (cache_key);
2160
2161
2162--
2163-- TOC entry 4710 (class 2606 OID 23760)
2164-- Name: elections_election elections_election_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2165--
2166
2167ALTER TABLE ONLY elections_election
2168 ADD CONSTRAINT elections_election_pkey PRIMARY KEY (id);
2169
2170
2171--
2172-- TOC entry 4712 (class 2606 OID 23762)
2173-- Name: email_alert email_alert_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2174--
2175
2176ALTER TABLE ONLY email_alert
2177 ADD CONSTRAINT email_alert_pkey PRIMARY KEY (email_alert_id);
2178
2179
2180--
2181-- TOC entry 4714 (class 2606 OID 23764)
2182-- Name: email_que email_que_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2183--
2184
2185ALTER TABLE ONLY email_que
2186 ADD CONSTRAINT email_que_pkey PRIMARY KEY (email_que_id);
2187
2188
2189--
2190-- TOC entry 4716 (class 2606 OID 23766)
2191-- Name: image_que image_que_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2192--
2193
2194ALTER TABLE ONLY image_que
2195 ADD CONSTRAINT image_que_pkey PRIMARY KEY (image_que_id);
2196
2197
2198--
2199-- TOC entry 4718 (class 2606 OID 23768)
2200-- Name: image_que_seq image_que_seq_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2201--
2202
2203ALTER TABLE ONLY image_que_seq
2204 ADD CONSTRAINT image_que_seq_pkey PRIMARY KEY (sequence);
2205
2206
2207--
2208-- TOC entry 4726 (class 2606 OID 23770)
2209-- Name: leaflets_leaflet leaflets_leaflet_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2210--
2211
2212ALTER TABLE ONLY leaflets_leaflet
2213 ADD CONSTRAINT leaflets_leaflet_pkey PRIMARY KEY (id);
2214
2215
2216--
2217-- TOC entry 4729 (class 2606 OID 23772)
2218-- Name: leaflets_leafletimage leaflets_leafletimage_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2219--
2220
2221ALTER TABLE ONLY leaflets_leafletimage
2222 ADD CONSTRAINT leaflets_leafletimage_pkey PRIMARY KEY (id);
2223
2224
2225--
2226-- TOC entry 4732 (class 2606 OID 23774)
2227-- Name: party party_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2228--
2229
2230ALTER TABLE ONLY party
2231 ADD CONSTRAINT party_pkey PRIMARY KEY (id);
2232
2233
2234--
2235-- TOC entry 4738 (class 2606 OID 23776)
2236-- Name: people_partymemberships people_partymemberships_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2237--
2238
2239ALTER TABLE ONLY people_partymemberships
2240 ADD CONSTRAINT people_partymemberships_pkey PRIMARY KEY (id);
2241
2242
2243--
2244-- TOC entry 4744 (class 2606 OID 23778)
2245-- Name: people_person_elections people_person_elections_person_id_election_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2246--
2247
2248ALTER TABLE ONLY people_person_elections
2249 ADD CONSTRAINT people_person_elections_person_id_election_id_key UNIQUE (person_id, election_id);
2250
2251
2252--
2253-- TOC entry 4746 (class 2606 OID 23780)
2254-- Name: people_person_elections people_person_elections_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2255--
2256
2257ALTER TABLE ONLY people_person_elections
2258 ADD CONSTRAINT people_person_elections_pkey PRIMARY KEY (id);
2259
2260
2261--
2262-- TOC entry 4740 (class 2606 OID 23782)
2263-- Name: people_person people_person_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2264--
2265
2266ALTER TABLE ONLY people_person
2267 ADD CONSTRAINT people_person_pkey PRIMARY KEY (id);
2268
2269
2270--
2271-- TOC entry 4751 (class 2606 OID 23784)
2272-- Name: people_personconstituencies people_personconstituencies_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2273--
2274
2275ALTER TABLE ONLY people_personconstituencies
2276 ADD CONSTRAINT people_personconstituencies_pkey PRIMARY KEY (id);
2277
2278
2279--
2280-- TOC entry 4753 (class 2606 OID 23786)
2281-- Name: promise promise_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2282--
2283
2284ALTER TABLE ONLY promise
2285 ADD CONSTRAINT promise_pkey PRIMARY KEY (promise_id);
2286
2287
2288--
2289-- TOC entry 4755 (class 2606 OID 23788)
2290-- Name: rate_interesting rate_interesting_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2291--
2292
2293ALTER TABLE ONLY rate_interesting
2294 ADD CONSTRAINT rate_interesting_pkey PRIMARY KEY (rate_interesting_id);
2295
2296
2297--
2298-- TOC entry 4757 (class 2606 OID 23790)
2299-- Name: rate_interesting_seq rate_interesting_seq_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2300--
2301
2302ALTER TABLE ONLY rate_interesting_seq
2303 ADD CONSTRAINT rate_interesting_seq_pkey PRIMARY KEY (sequence);
2304
2305
2306--
2307-- TOC entry 4759 (class 2606 OID 23792)
2308-- Name: rate_type rate_type_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2309--
2310
2311ALTER TABLE ONLY rate_type
2312 ADD CONSTRAINT rate_type_pkey PRIMARY KEY (rate_type_id);
2313
2314
2315--
2316-- TOC entry 4761 (class 2606 OID 23794)
2317-- Name: rate_value rate_value_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2318--
2319
2320ALTER TABLE ONLY rate_value
2321 ADD CONSTRAINT rate_value_pkey PRIMARY KEY (rate_value_id);
2322
2323
2324--
2325-- TOC entry 4763 (class 2606 OID 23796)
2326-- Name: rate_value_seq rate_value_seq_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2327--
2328
2329ALTER TABLE ONLY rate_value_seq
2330 ADD CONSTRAINT rate_value_seq_pkey PRIMARY KEY (sequence);
2331
2332
2333--
2334-- TOC entry 4765 (class 2606 OID 23798)
2335-- Name: socialaccount_socialaccount socialaccount_socialaccount_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2336--
2337
2338ALTER TABLE ONLY socialaccount_socialaccount
2339 ADD CONSTRAINT socialaccount_socialaccount_pkey PRIMARY KEY (id);
2340
2341
2342--
2343-- TOC entry 4767 (class 2606 OID 31729)
2344-- Name: socialaccount_socialaccount socialaccount_socialaccount_provider_uid_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2345--
2346
2347ALTER TABLE ONLY socialaccount_socialaccount
2348 ADD CONSTRAINT socialaccount_socialaccount_provider_uid_key UNIQUE (provider, uid);
2349
2350
2351--
2352-- TOC entry 4770 (class 2606 OID 23802)
2353-- Name: socialaccount_socialapp socialaccount_socialapp_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2354--
2355
2356ALTER TABLE ONLY socialaccount_socialapp
2357 ADD CONSTRAINT socialaccount_socialapp_pkey PRIMARY KEY (id);
2358
2359
2360--
2361-- TOC entry 4772 (class 2606 OID 23804)
2362-- Name: socialaccount_socialapp_sites socialaccount_socialapp_sites_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2363--
2364
2365ALTER TABLE ONLY socialaccount_socialapp_sites
2366 ADD CONSTRAINT socialaccount_socialapp_sites_pkey PRIMARY KEY (id);
2367
2368
2369--
2370-- TOC entry 4776 (class 2606 OID 23806)
2371-- Name: socialaccount_socialapp_sites socialaccount_socialapp_sites_socialapp_id_site_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2372--
2373
2374ALTER TABLE ONLY socialaccount_socialapp_sites
2375 ADD CONSTRAINT socialaccount_socialapp_sites_socialapp_id_site_id_key UNIQUE (socialapp_id, site_id);
2376
2377
2378--
2379-- TOC entry 4780 (class 2606 OID 23808)
2380-- Name: socialaccount_socialtoken socialaccount_socialtoken_app_id_account_id_key; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2381--
2382
2383ALTER TABLE ONLY socialaccount_socialtoken
2384 ADD CONSTRAINT socialaccount_socialtoken_app_id_account_id_key UNIQUE (app_id, account_id);
2385
2386
2387--
2388-- TOC entry 4782 (class 2606 OID 23810)
2389-- Name: socialaccount_socialtoken socialaccount_socialtoken_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2390--
2391
2392ALTER TABLE ONLY socialaccount_socialtoken
2393 ADD CONSTRAINT socialaccount_socialtoken_pkey PRIMARY KEY (id);
2394
2395
2396--
2397-- TOC entry 4784 (class 2606 OID 23812)
2398-- Name: tag tag_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2399--
2400
2401ALTER TABLE ONLY tag
2402 ADD CONSTRAINT tag_pkey PRIMARY KEY (id);
2403
2404
2405--
2406-- TOC entry 4789 (class 2606 OID 23814)
2407-- Name: thumbnail_kvstore thumbnail_kvstore_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2408--
2409
2410ALTER TABLE ONLY thumbnail_kvstore
2411 ADD CONSTRAINT thumbnail_kvstore_pkey PRIMARY KEY (key);
2412
2413
2414--
2415-- TOC entry 4792 (class 2606 OID 23816)
2416-- Name: uk_political_parties_party uk_political_parties_party_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2417--
2418
2419ALTER TABLE ONLY uk_political_parties_party
2420 ADD CONSTRAINT uk_political_parties_party_pkey PRIMARY KEY (party_id);
2421
2422
2423--
2424-- TOC entry 4795 (class 2606 OID 23818)
2425-- Name: uk_political_parties_partyemblem uk_political_parties_partyemblem_pkey; Type: CONSTRAINT; Schema: public; Owner: electionleaflets_production
2426--
2427
2428ALTER TABLE ONLY uk_political_parties_partyemblem
2429 ADD CONSTRAINT uk_political_parties_partyemblem_pkey PRIMARY KEY (id);
2430
2431
2432--
2433-- TOC entry 4612 (class 1259 OID 31713)
2434-- Name: account_emailaddress_email_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2435--
2436
2437CREATE INDEX account_emailaddress_email_like ON account_emailaddress USING btree (email varchar_pattern_ops);
2438
2439
2440--
2441-- TOC entry 4615 (class 1259 OID 23820)
2442-- Name: account_emailaddress_user_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2443--
2444
2445CREATE INDEX account_emailaddress_user_id ON account_emailaddress USING btree (user_id);
2446
2447
2448--
2449-- TOC entry 4616 (class 1259 OID 23821)
2450-- Name: account_emailconfirmation_email_address_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2451--
2452
2453CREATE INDEX account_emailconfirmation_email_address_id ON account_emailconfirmation USING btree (email_address_id);
2454
2455
2456--
2457-- TOC entry 4619 (class 1259 OID 23822)
2458-- Name: account_emailconfirmation_key_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2459--
2460
2461CREATE INDEX account_emailconfirmation_key_like ON account_emailconfirmation USING btree (key varchar_pattern_ops);
2462
2463
2464--
2465-- TOC entry 4622 (class 1259 OID 23823)
2466-- Name: analysis_leafletproperties_168f9da0; Type: INDEX; Schema: public; Owner: electionleaflets_production
2467--
2468
2469CREATE INDEX analysis_leafletproperties_168f9da0 ON analysis_leafletproperties USING btree (leaflet_id);
2470
2471
2472--
2473-- TOC entry 4623 (class 1259 OID 23824)
2474-- Name: analysis_leafletproperties_2063c160; Type: INDEX; Schema: public; Owner: electionleaflets_production
2475--
2476
2477CREATE INDEX analysis_leafletproperties_2063c160 ON analysis_leafletproperties USING btree (value);
2478
2479
2480--
2481-- TOC entry 4624 (class 1259 OID 23825)
2482-- Name: analysis_leafletproperties_3c6e0b8a; Type: INDEX; Schema: public; Owner: electionleaflets_production
2483--
2484
2485CREATE INDEX analysis_leafletproperties_3c6e0b8a ON analysis_leafletproperties USING btree (key);
2486
2487
2488--
2489-- TOC entry 4625 (class 1259 OID 23826)
2490-- Name: analysis_leafletproperties_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
2491--
2492
2493CREATE INDEX analysis_leafletproperties_e8701ad4 ON analysis_leafletproperties USING btree (user_id);
2494
2495
2496--
2497-- TOC entry 4626 (class 1259 OID 23827)
2498-- Name: analysis_leafletproperties_key_726062b929723bbc_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2499--
2500
2501CREATE INDEX analysis_leafletproperties_key_726062b929723bbc_like ON analysis_leafletproperties USING btree (key varchar_pattern_ops);
2502
2503
2504--
2505-- TOC entry 4629 (class 1259 OID 23828)
2506-- Name: analysis_leafletproperties_value_48979daf9e89ab4c_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2507--
2508
2509CREATE INDEX analysis_leafletproperties_value_48979daf9e89ab4c_like ON analysis_leafletproperties USING btree (value varchar_pattern_ops);
2510
2511
2512--
2513-- TOC entry 4634 (class 1259 OID 23829)
2514-- Name: auth_group_permissions_0e939a4f; Type: INDEX; Schema: public; Owner: electionleaflets_production
2515--
2516
2517CREATE INDEX auth_group_permissions_0e939a4f ON auth_group_permissions USING btree (group_id);
2518
2519
2520--
2521-- TOC entry 4635 (class 1259 OID 23830)
2522-- Name: auth_group_permissions_8373b171; Type: INDEX; Schema: public; Owner: electionleaflets_production
2523--
2524
2525CREATE INDEX auth_group_permissions_8373b171 ON auth_group_permissions USING btree (permission_id);
2526
2527
2528--
2529-- TOC entry 4640 (class 1259 OID 23831)
2530-- Name: auth_permission_417f1b1c; Type: INDEX; Schema: public; Owner: electionleaflets_production
2531--
2532
2533CREATE INDEX auth_permission_417f1b1c ON auth_permission USING btree (content_type_id);
2534
2535
2536--
2537-- TOC entry 4649 (class 1259 OID 23832)
2538-- Name: auth_user_groups_0e939a4f; Type: INDEX; Schema: public; Owner: electionleaflets_production
2539--
2540
2541CREATE INDEX auth_user_groups_0e939a4f ON auth_user_groups USING btree (group_id);
2542
2543
2544--
2545-- TOC entry 4650 (class 1259 OID 23833)
2546-- Name: auth_user_groups_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
2547--
2548
2549CREATE INDEX auth_user_groups_e8701ad4 ON auth_user_groups USING btree (user_id);
2550
2551
2552--
2553-- TOC entry 4655 (class 1259 OID 23834)
2554-- Name: auth_user_user_permissions_8373b171; Type: INDEX; Schema: public; Owner: electionleaflets_production
2555--
2556
2557CREATE INDEX auth_user_user_permissions_8373b171 ON auth_user_user_permissions USING btree (permission_id);
2558
2559
2560--
2561-- TOC entry 4656 (class 1259 OID 23835)
2562-- Name: auth_user_user_permissions_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
2563--
2564
2565CREATE INDEX auth_user_user_permissions_e8701ad4 ON auth_user_user_permissions USING btree (user_id);
2566
2567
2568--
2569-- TOC entry 4661 (class 1259 OID 23836)
2570-- Name: boundaries_boundary_constituency_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2571--
2572
2573CREATE INDEX boundaries_boundary_constituency_id ON boundaries_boundary USING btree (constituency_id);
2574
2575
2576--
2577-- TOC entry 4666 (class 1259 OID 23837)
2578-- Name: category_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
2579--
2580
2581CREATE INDEX category_slug ON category USING btree (slug);
2582
2583
2584--
2585-- TOC entry 4667 (class 1259 OID 23838)
2586-- Name: category_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2587--
2588
2589CREATE INDEX category_slug_like ON category USING btree (slug varchar_pattern_ops);
2590
2591
2592--
2593-- TOC entry 4668 (class 1259 OID 23839)
2594-- Name: constituencies_constituency_constituency_id_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2595--
2596
2597CREATE INDEX constituencies_constituency_constituency_id_like ON constituencies_constituency USING btree (constituency_id varchar_pattern_ops);
2598
2599
2600--
2601-- TOC entry 4671 (class 1259 OID 23840)
2602-- Name: constituencies_constituency_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
2603--
2604
2605CREATE INDEX constituencies_constituency_slug ON constituencies_constituency USING btree (slug);
2606
2607
2608--
2609-- TOC entry 4672 (class 1259 OID 23841)
2610-- Name: constituencies_constituency_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2611--
2612
2613CREATE INDEX constituencies_constituency_slug_like ON constituencies_constituency USING btree (slug varchar_pattern_ops);
2614
2615
2616--
2617-- TOC entry 4677 (class 1259 OID 23842)
2618-- Name: django_admin_log_417f1b1c; Type: INDEX; Schema: public; Owner: electionleaflets_production
2619--
2620
2621CREATE INDEX django_admin_log_417f1b1c ON django_admin_log USING btree (content_type_id);
2622
2623
2624--
2625-- TOC entry 4678 (class 1259 OID 23843)
2626-- Name: django_admin_log_e8701ad4; Type: INDEX; Schema: public; Owner: electionleaflets_production
2627--
2628
2629CREATE INDEX django_admin_log_e8701ad4 ON django_admin_log USING btree (user_id);
2630
2631
2632--
2633-- TOC entry 4687 (class 1259 OID 23844)
2634-- Name: django_session_de54fa62; Type: INDEX; Schema: public; Owner: electionleaflets_production
2635--
2636
2637CREATE INDEX django_session_de54fa62 ON django_session USING btree (expire_date);
2638
2639
2640--
2641-- TOC entry 4690 (class 1259 OID 31727)
2642-- Name: django_site_domain_a2e37b91_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2643--
2644
2645CREATE INDEX django_site_domain_a2e37b91_like ON django_site USING btree (domain varchar_pattern_ops);
2646
2647
2648--
2649-- TOC entry 4697 (class 1259 OID 23845)
2650-- Name: djkombu_message_queue_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2651--
2652
2653CREATE INDEX djkombu_message_queue_id ON djkombu_message USING btree (queue_id);
2654
2655
2656--
2657-- TOC entry 4698 (class 1259 OID 23846)
2658-- Name: djkombu_message_sent_at; Type: INDEX; Schema: public; Owner: electionleaflets_production
2659--
2660
2661CREATE INDEX djkombu_message_sent_at ON djkombu_message USING btree (sent_at);
2662
2663
2664--
2665-- TOC entry 4699 (class 1259 OID 23847)
2666-- Name: djkombu_message_visible; Type: INDEX; Schema: public; Owner: electionleaflets_production
2667--
2668
2669CREATE INDEX djkombu_message_visible ON djkombu_message USING btree (visible);
2670
2671
2672--
2673-- TOC entry 4702 (class 1259 OID 23848)
2674-- Name: djkombu_queue_name_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2675--
2676
2677CREATE INDEX djkombu_queue_name_like ON djkombu_queue USING btree (name varchar_pattern_ops);
2678
2679
2680--
2681-- TOC entry 4705 (class 1259 OID 23849)
2682-- Name: el_cache_expires; Type: INDEX; Schema: public; Owner: electionleaflets_production
2683--
2684
2685CREATE INDEX el_cache_expires ON el_cache USING btree (expires);
2686
2687
2688--
2689-- TOC entry 4708 (class 1259 OID 23850)
2690-- Name: elections_election_93bfec8a; Type: INDEX; Schema: public; Owner: electionleaflets_production
2691--
2692
2693CREATE INDEX elections_election_93bfec8a ON elections_election USING btree (country_id);
2694
2695
2696--
2697-- TOC entry 4719 (class 1259 OID 23851)
2698-- Name: leaflets_leaflet_225d2087; Type: INDEX; Schema: public; Owner: electionleaflets_production
2699--
2700
2701CREATE INDEX leaflets_leaflet_225d2087 ON leaflets_leaflet USING btree (publisher_person_id);
2702
2703
2704--
2705-- TOC entry 4720 (class 1259 OID 23852)
2706-- Name: leaflets_leaflet_2af093ee; Type: INDEX; Schema: public; Owner: electionleaflets_production
2707--
2708
2709CREATE INDEX leaflets_leaflet_2af093ee ON leaflets_leaflet USING btree (constituency_id);
2710
2711
2712--
2713-- TOC entry 4721 (class 1259 OID 23853)
2714-- Name: leaflets_leaflet_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
2715--
2716
2717CREATE INDEX leaflets_leaflet_a8452ca7 ON leaflets_leaflet USING btree (person_id);
2718
2719
2720--
2721-- TOC entry 4722 (class 1259 OID 23854)
2722-- Name: leaflets_leaflet_ece3e99c; Type: INDEX; Schema: public; Owner: electionleaflets_production
2723--
2724
2725CREATE INDEX leaflets_leaflet_ece3e99c ON leaflets_leaflet USING btree (publisher_party_id);
2726
2727
2728--
2729-- TOC entry 4723 (class 1259 OID 23855)
2730-- Name: leaflets_leaflet_f8f30b52; Type: INDEX; Schema: public; Owner: electionleaflets_production
2731--
2732
2733CREATE INDEX leaflets_leaflet_f8f30b52 ON leaflets_leaflet USING btree (election_id);
2734
2735
2736--
2737-- TOC entry 4724 (class 1259 OID 23856)
2738-- Name: leaflets_leaflet_location_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2739--
2740
2741CREATE INDEX leaflets_leaflet_location_id ON leaflets_leaflet USING gist (location);
2742
2743
2744--
2745-- TOC entry 4727 (class 1259 OID 23857)
2746-- Name: leaflets_leafletimage_168f9da0; Type: INDEX; Schema: public; Owner: electionleaflets_production
2747--
2748
2749CREATE INDEX leaflets_leafletimage_168f9da0 ON leaflets_leafletimage USING btree (leaflet_id);
2750
2751
2752--
2753-- TOC entry 4730 (class 1259 OID 23858)
2754-- Name: party_country_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2755--
2756
2757CREATE INDEX party_country_id ON party USING btree (country_id);
2758
2759
2760--
2761-- TOC entry 4733 (class 1259 OID 23859)
2762-- Name: party_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
2763--
2764
2765CREATE INDEX party_slug ON party USING btree (slug);
2766
2767
2768--
2769-- TOC entry 4734 (class 1259 OID 23860)
2770-- Name: party_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2771--
2772
2773CREATE INDEX party_slug_like ON party USING btree (slug varchar_pattern_ops);
2774
2775
2776--
2777-- TOC entry 4735 (class 1259 OID 23861)
2778-- Name: people_partymemberships_2c662395; Type: INDEX; Schema: public; Owner: electionleaflets_production
2779--
2780
2781CREATE INDEX people_partymemberships_2c662395 ON people_partymemberships USING btree (party_id);
2782
2783
2784--
2785-- TOC entry 4736 (class 1259 OID 23862)
2786-- Name: people_partymemberships_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
2787--
2788
2789CREATE INDEX people_partymemberships_a8452ca7 ON people_partymemberships USING btree (person_id);
2790
2791
2792--
2793-- TOC entry 4741 (class 1259 OID 23863)
2794-- Name: people_person_elections_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
2795--
2796
2797CREATE INDEX people_person_elections_a8452ca7 ON people_person_elections USING btree (person_id);
2798
2799
2800--
2801-- TOC entry 4742 (class 1259 OID 23864)
2802-- Name: people_person_elections_f8f30b52; Type: INDEX; Schema: public; Owner: electionleaflets_production
2803--
2804
2805CREATE INDEX people_person_elections_f8f30b52 ON people_person_elections USING btree (election_id);
2806
2807
2808--
2809-- TOC entry 4747 (class 1259 OID 23865)
2810-- Name: people_personconstituencies_721b30ed; Type: INDEX; Schema: public; Owner: electionleaflets_production
2811--
2812
2813CREATE INDEX people_personconstituencies_721b30ed ON people_personconstituencies USING btree (constituency_id);
2814
2815
2816--
2817-- TOC entry 4748 (class 1259 OID 23866)
2818-- Name: people_personconstituencies_a8452ca7; Type: INDEX; Schema: public; Owner: electionleaflets_production
2819--
2820
2821CREATE INDEX people_personconstituencies_a8452ca7 ON people_personconstituencies USING btree (person_id);
2822
2823
2824--
2825-- TOC entry 4749 (class 1259 OID 23867)
2826-- Name: people_personconstituencies_f8f30b52; Type: INDEX; Schema: public; Owner: electionleaflets_production
2827--
2828
2829CREATE INDEX people_personconstituencies_f8f30b52 ON people_personconstituencies USING btree (election_id);
2830
2831
2832--
2833-- TOC entry 4768 (class 1259 OID 23868)
2834-- Name: socialaccount_socialaccount_user_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2835--
2836
2837CREATE INDEX socialaccount_socialaccount_user_id ON socialaccount_socialaccount USING btree (user_id);
2838
2839
2840--
2841-- TOC entry 4773 (class 1259 OID 23869)
2842-- Name: socialaccount_socialapp_sites_site_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2843--
2844
2845CREATE INDEX socialaccount_socialapp_sites_site_id ON socialaccount_socialapp_sites USING btree (site_id);
2846
2847
2848--
2849-- TOC entry 4774 (class 1259 OID 23870)
2850-- Name: socialaccount_socialapp_sites_socialapp_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2851--
2852
2853CREATE INDEX socialaccount_socialapp_sites_socialapp_id ON socialaccount_socialapp_sites USING btree (socialapp_id);
2854
2855
2856--
2857-- TOC entry 4777 (class 1259 OID 23871)
2858-- Name: socialaccount_socialtoken_account_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2859--
2860
2861CREATE INDEX socialaccount_socialtoken_account_id ON socialaccount_socialtoken USING btree (account_id);
2862
2863
2864--
2865-- TOC entry 4778 (class 1259 OID 23872)
2866-- Name: socialaccount_socialtoken_app_id; Type: INDEX; Schema: public; Owner: electionleaflets_production
2867--
2868
2869CREATE INDEX socialaccount_socialtoken_app_id ON socialaccount_socialtoken USING btree (app_id);
2870
2871
2872--
2873-- TOC entry 4785 (class 1259 OID 23873)
2874-- Name: tag_slug; Type: INDEX; Schema: public; Owner: electionleaflets_production
2875--
2876
2877CREATE INDEX tag_slug ON tag USING btree (slug);
2878
2879
2880--
2881-- TOC entry 4786 (class 1259 OID 23874)
2882-- Name: tag_slug_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2883--
2884
2885CREATE INDEX tag_slug_like ON tag USING btree (slug varchar_pattern_ops);
2886
2887
2888--
2889-- TOC entry 4787 (class 1259 OID 23875)
2890-- Name: thumbnail_kvstore_key_like; Type: INDEX; Schema: public; Owner: electionleaflets_production
2891--
2892
2893CREATE INDEX thumbnail_kvstore_key_like ON thumbnail_kvstore USING btree (key varchar_pattern_ops);
2894
2895
2896--
2897-- TOC entry 4790 (class 1259 OID 23876)
2898-- Name: uk_political_parties_party_2dbcba41; Type: INDEX; Schema: public; Owner: electionleaflets_production
2899--
2900
2901CREATE INDEX uk_political_parties_party_2dbcba41 ON uk_political_parties_party USING btree (slug);
2902
2903
2904--
2905-- TOC entry 4793 (class 1259 OID 23877)
2906-- Name: uk_political_parties_partyemblem_2c662395; Type: INDEX; Schema: public; Owner: electionleaflets_production
2907--
2908
2909CREATE INDEX uk_political_parties_partyemblem_2c662395 ON uk_political_parties_partyemblem USING btree (party_id);
2910
2911
2912--
2913-- TOC entry 4796 (class 2606 OID 23878)
2914-- Name: account_emailaddress account_emailaddress_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2915--
2916
2917ALTER TABLE ONLY account_emailaddress
2918 ADD CONSTRAINT account_emailaddress_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
2919
2920
2921--
2922-- TOC entry 4797 (class 2606 OID 23883)
2923-- Name: account_emailconfirmation account_emailconfirmation_email_address_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2924--
2925
2926ALTER TABLE ONLY account_emailconfirmation
2927 ADD CONSTRAINT account_emailconfirmation_email_address_id_fkey FOREIGN KEY (email_address_id) REFERENCES account_emailaddress(id) DEFERRABLE INITIALLY DEFERRED;
2928
2929
2930--
2931-- TOC entry 4798 (class 2606 OID 23888)
2932-- Name: analysis_leafletproperties analysis_lea_leaflet_id_682ed73ca5f54e4d_fk_leaflets_leaflet_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2933--
2934
2935ALTER TABLE ONLY analysis_leafletproperties
2936 ADD CONSTRAINT analysis_lea_leaflet_id_682ed73ca5f54e4d_fk_leaflets_leaflet_id FOREIGN KEY (leaflet_id) REFERENCES leaflets_leaflet(id) DEFERRABLE INITIALLY DEFERRED;
2937
2938
2939--
2940-- TOC entry 4799 (class 2606 OID 23893)
2941-- Name: analysis_leafletproperties analysis_leafletproper_user_id_57a4384c3644c9c6_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2942--
2943
2944ALTER TABLE ONLY analysis_leafletproperties
2945 ADD CONSTRAINT analysis_leafletproper_user_id_57a4384c3644c9c6_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
2946
2947
2948--
2949-- TOC entry 4802 (class 2606 OID 23898)
2950-- Name: auth_permission auth_content_type_id_508cf46651277a81_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2951--
2952
2953ALTER TABLE ONLY auth_permission
2954 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;
2955
2956
2957--
2958-- TOC entry 4800 (class 2606 OID 23903)
2959-- Name: auth_group_permissions auth_group_permissio_group_id_689710a9a73b7457_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2960--
2961
2962ALTER TABLE ONLY auth_group_permissions
2963 ADD CONSTRAINT auth_group_permissio_group_id_689710a9a73b7457_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;
2964
2965
2966--
2967-- TOC entry 4801 (class 2606 OID 23908)
2968-- Name: auth_group_permissions auth_group_permission_id_1f49ccbbdc69d2fc_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2969--
2970
2971ALTER TABLE ONLY auth_group_permissions
2972 ADD CONSTRAINT auth_group_permission_id_1f49ccbbdc69d2fc_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;
2973
2974
2975--
2976-- TOC entry 4805 (class 2606 OID 23913)
2977-- Name: auth_user_user_permissions auth_user__permission_id_384b62483d7071f0_fk_auth_permission_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2978--
2979
2980ALTER TABLE ONLY auth_user_user_permissions
2981 ADD CONSTRAINT auth_user__permission_id_384b62483d7071f0_fk_auth_permission_id FOREIGN KEY (permission_id) REFERENCES auth_permission(id) DEFERRABLE INITIALLY DEFERRED;
2982
2983
2984--
2985-- TOC entry 4803 (class 2606 OID 23918)
2986-- Name: auth_user_groups auth_user_groups_group_id_33ac548dcf5f8e37_fk_auth_group_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2987--
2988
2989ALTER TABLE ONLY auth_user_groups
2990 ADD CONSTRAINT auth_user_groups_group_id_33ac548dcf5f8e37_fk_auth_group_id FOREIGN KEY (group_id) REFERENCES auth_group(id) DEFERRABLE INITIALLY DEFERRED;
2991
2992
2993--
2994-- TOC entry 4804 (class 2606 OID 23923)
2995-- Name: auth_user_groups auth_user_groups_user_id_4b5ed4ffdb8fd9b0_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
2996--
2997
2998ALTER TABLE ONLY auth_user_groups
2999 ADD CONSTRAINT auth_user_groups_user_id_4b5ed4ffdb8fd9b0_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
3000
3001
3002--
3003-- TOC entry 4806 (class 2606 OID 23928)
3004-- Name: auth_user_user_permissions auth_user_user_permiss_user_id_7f0938558328534a_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3005--
3006
3007ALTER TABLE ONLY auth_user_user_permissions
3008 ADD CONSTRAINT auth_user_user_permiss_user_id_7f0938558328534a_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
3009
3010
3011--
3012-- TOC entry 4816 (class 2606 OID 23933)
3013-- Name: people_partymemberships ccfae136d2190a04c8f973a195cf2dfe; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3014--
3015
3016ALTER TABLE ONLY people_partymemberships
3017 ADD CONSTRAINT ccfae136d2190a04c8f973a195cf2dfe FOREIGN KEY (party_id) REFERENCES uk_political_parties_party(party_id) DEFERRABLE INITIALLY DEFERRED;
3018
3019
3020--
3021-- TOC entry 4811 (class 2606 OID 23938)
3022-- Name: leaflets_leaflet d13fde9954a3037991cdbd91750d8bfd; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3023--
3024
3025ALTER TABLE ONLY leaflets_leaflet
3026 ADD CONSTRAINT d13fde9954a3037991cdbd91750d8bfd FOREIGN KEY (publisher_party_id) REFERENCES uk_political_parties_party(party_id) DEFERRABLE INITIALLY DEFERRED;
3027
3028
3029--
3030-- TOC entry 4828 (class 2606 OID 23943)
3031-- Name: uk_political_parties_partyemblem d5a7a036fa6be56b2d8c39e76c4ef949; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3032--
3033
3034ALTER TABLE ONLY uk_political_parties_partyemblem
3035 ADD CONSTRAINT d5a7a036fa6be56b2d8c39e76c4ef949 FOREIGN KEY (party_id) REFERENCES uk_political_parties_party(party_id) DEFERRABLE INITIALLY DEFERRED;
3036
3037
3038--
3039-- TOC entry 4820 (class 2606 OID 23948)
3040-- Name: people_personconstituencies d5be8e440f22f18ea44a9036b6a8be26; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3041--
3042
3043ALTER TABLE ONLY people_personconstituencies
3044 ADD CONSTRAINT d5be8e440f22f18ea44a9036b6a8be26 FOREIGN KEY (constituency_id) REFERENCES constituencies_constituency(constituency_id) DEFERRABLE INITIALLY DEFERRED;
3045
3046
3047--
3048-- TOC entry 4812 (class 2606 OID 23953)
3049-- Name: leaflets_leaflet d8b9c279fbe369ba0450343e34162a2d; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3050--
3051
3052ALTER TABLE ONLY leaflets_leaflet
3053 ADD CONSTRAINT d8b9c279fbe369ba0450343e34162a2d FOREIGN KEY (constituency_id) REFERENCES constituencies_constituency(constituency_id) DEFERRABLE INITIALLY DEFERRED;
3054
3055
3056--
3057-- TOC entry 4807 (class 2606 OID 23958)
3058-- Name: django_admin_log djan_content_type_id_697914295151027a_fk_django_content_type_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3059--
3060
3061ALTER TABLE ONLY django_admin_log
3062 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;
3063
3064
3065--
3066-- TOC entry 4808 (class 2606 OID 23963)
3067-- Name: django_admin_log django_admin_log_user_id_52fdd58701c5f563_fk_auth_user_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3068--
3069
3070ALTER TABLE ONLY django_admin_log
3071 ADD CONSTRAINT django_admin_log_user_id_52fdd58701c5f563_fk_auth_user_id FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
3072
3073
3074--
3075-- TOC entry 4809 (class 2606 OID 23968)
3076-- Name: djkombu_message djkombu_message_queue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3077--
3078
3079ALTER TABLE ONLY djkombu_message
3080 ADD CONSTRAINT djkombu_message_queue_id_fkey FOREIGN KEY (queue_id) REFERENCES djkombu_queue(id) DEFERRABLE INITIALLY DEFERRED;
3081
3082
3083--
3084-- TOC entry 4810 (class 2606 OID 23973)
3085-- Name: elections_election elections_ele_country_id_7f3abbba8ded3c57_fk_country_country_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3086--
3087
3088ALTER TABLE ONLY elections_election
3089 ADD CONSTRAINT elections_ele_country_id_7f3abbba8ded3c57_fk_country_country_id FOREIGN KEY (country_id) REFERENCES country(country_id) DEFERRABLE INITIALLY DEFERRED;
3090
3091
3092--
3093-- TOC entry 4813 (class 2606 OID 23978)
3094-- Name: leaflets_leaflet leaflets__election_id_2da416a6501bb73b_fk_elections_election_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3095--
3096
3097ALTER TABLE ONLY leaflets_leaflet
3098 ADD CONSTRAINT leaflets__election_id_2da416a6501bb73b_fk_elections_election_id FOREIGN KEY (election_id) REFERENCES elections_election(id) DEFERRABLE INITIALLY DEFERRED;
3099
3100
3101--
3102-- TOC entry 4814 (class 2606 OID 23983)
3103-- Name: leaflets_leafletimage leaflets_lea_leaflet_id_2fddb239d3a18790_fk_leaflets_leaflet_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3104--
3105
3106ALTER TABLE ONLY leaflets_leafletimage
3107 ADD CONSTRAINT leaflets_lea_leaflet_id_2fddb239d3a18790_fk_leaflets_leaflet_id FOREIGN KEY (leaflet_id) REFERENCES leaflets_leaflet(id) DEFERRABLE INITIALLY DEFERRED;
3108
3109
3110--
3111-- TOC entry 4815 (class 2606 OID 23988)
3112-- Name: party party_country_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3113--
3114
3115ALTER TABLE ONLY party
3116 ADD CONSTRAINT party_country_id_fkey FOREIGN KEY (country_id) REFERENCES country(country_id) DEFERRABLE INITIALLY DEFERRED;
3117
3118
3119--
3120-- TOC entry 4817 (class 2606 OID 23993)
3121-- Name: people_partymemberships people_partymemb_person_id_19ba6912a1bed719_fk_people_person_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3122--
3123
3124ALTER TABLE ONLY people_partymemberships
3125 ADD CONSTRAINT people_partymemb_person_id_19ba6912a1bed719_fk_people_person_id FOREIGN KEY (person_id) REFERENCES people_person(id) DEFERRABLE INITIALLY DEFERRED;
3126
3127
3128--
3129-- TOC entry 4821 (class 2606 OID 23998)
3130-- Name: people_personconstituencies people_pe_election_id_17f9e1eac4c27be3_fk_elections_election_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3131--
3132
3133ALTER TABLE ONLY people_personconstituencies
3134 ADD CONSTRAINT people_pe_election_id_17f9e1eac4c27be3_fk_elections_election_id FOREIGN KEY (election_id) REFERENCES elections_election(id) DEFERRABLE INITIALLY DEFERRED;
3135
3136
3137--
3138-- TOC entry 4818 (class 2606 OID 24003)
3139-- Name: people_person_elections people_pe_election_id_26f1fd33a410fd32_fk_elections_election_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3140--
3141
3142ALTER TABLE ONLY people_person_elections
3143 ADD CONSTRAINT people_pe_election_id_26f1fd33a410fd32_fk_elections_election_id FOREIGN KEY (election_id) REFERENCES elections_election(id) DEFERRABLE INITIALLY DEFERRED;
3144
3145
3146--
3147-- TOC entry 4819 (class 2606 OID 24008)
3148-- Name: people_person_elections people_person_ele_person_id_cc79e09b07e0eda_fk_people_person_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3149--
3150
3151ALTER TABLE ONLY people_person_elections
3152 ADD CONSTRAINT people_person_ele_person_id_cc79e09b07e0eda_fk_people_person_id FOREIGN KEY (person_id) REFERENCES people_person(id) DEFERRABLE INITIALLY DEFERRED;
3153
3154
3155--
3156-- TOC entry 4822 (class 2606 OID 24013)
3157-- Name: people_personconstituencies people_personcon_person_id_246ec89d33771511_fk_people_person_id; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3158--
3159
3160ALTER TABLE ONLY people_personconstituencies
3161 ADD CONSTRAINT people_personcon_person_id_246ec89d33771511_fk_people_person_id FOREIGN KEY (person_id) REFERENCES people_person(id) DEFERRABLE INITIALLY DEFERRED;
3162
3163
3164--
3165-- TOC entry 4823 (class 2606 OID 24018)
3166-- Name: socialaccount_socialaccount socialaccount_socialaccount_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3167--
3168
3169ALTER TABLE ONLY socialaccount_socialaccount
3170 ADD CONSTRAINT socialaccount_socialaccount_user_id_fkey FOREIGN KEY (user_id) REFERENCES auth_user(id) DEFERRABLE INITIALLY DEFERRED;
3171
3172
3173--
3174-- TOC entry 4824 (class 2606 OID 24023)
3175-- Name: socialaccount_socialapp_sites socialaccount_socialapp_sites_site_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3176--
3177
3178ALTER TABLE ONLY socialaccount_socialapp_sites
3179 ADD CONSTRAINT socialaccount_socialapp_sites_site_id_fkey FOREIGN KEY (site_id) REFERENCES django_site(id) DEFERRABLE INITIALLY DEFERRED;
3180
3181
3182--
3183-- TOC entry 4826 (class 2606 OID 24028)
3184-- Name: socialaccount_socialtoken socialaccount_socialtoken_account_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3185--
3186
3187ALTER TABLE ONLY socialaccount_socialtoken
3188 ADD CONSTRAINT socialaccount_socialtoken_account_id_fkey FOREIGN KEY (account_id) REFERENCES socialaccount_socialaccount(id) DEFERRABLE INITIALLY DEFERRED;
3189
3190
3191--
3192-- TOC entry 4827 (class 2606 OID 24033)
3193-- Name: socialaccount_socialtoken socialaccount_socialtoken_app_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3194--
3195
3196ALTER TABLE ONLY socialaccount_socialtoken
3197 ADD CONSTRAINT socialaccount_socialtoken_app_id_fkey FOREIGN KEY (app_id) REFERENCES socialaccount_socialapp(id) DEFERRABLE INITIALLY DEFERRED;
3198
3199
3200--
3201-- TOC entry 4825 (class 2606 OID 24038)
3202-- Name: socialaccount_socialapp_sites socialapp_id_refs_id_e7a43014; Type: FK CONSTRAINT; Schema: public; Owner: electionleaflets_production
3203--
3204
3205ALTER TABLE ONLY socialaccount_socialapp_sites
3206 ADD CONSTRAINT socialapp_id_refs_id_e7a43014 FOREIGN KEY (socialapp_id) REFERENCES socialaccount_socialapp(id) DEFERRABLE INITIALLY DEFERRED;
3207
3208
3209-- Completed on 2017-12-18 14:00:47 GMT
3210
3211--
3212-- PostgreSQL database dump complete
3213--