]> git.openstreetmap.org Git - rails.git/blob - db/structure.sql
Alter the Makefile to be robust against bundler warnings
[rails.git] / db / structure.sql
1 SET statement_timeout = 0;
2 SET lock_timeout = 0;
3 SET idle_in_transaction_session_timeout = 0;
4 SET client_encoding = 'UTF8';
5 SET standard_conforming_strings = on;
6 SET check_function_bodies = false;
7 SET client_min_messages = warning;
8 SET row_security = off;
9
10 --
11 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
12 --
13
14 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
15
16
17 --
18 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
19 --
20
21 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
22
23
24 --
25 -- Name: btree_gist; Type: EXTENSION; Schema: -; Owner: -
26 --
27
28 CREATE EXTENSION IF NOT EXISTS btree_gist WITH SCHEMA public;
29
30
31 --
32 -- Name: EXTENSION btree_gist; Type: COMMENT; Schema: -; Owner: -
33 --
34
35 COMMENT ON EXTENSION btree_gist IS 'support for indexing common datatypes in GiST';
36
37
38 SET search_path = public, pg_catalog;
39
40 --
41 -- Name: format_enum; Type: TYPE; Schema: public; Owner: -
42 --
43
44 CREATE TYPE format_enum AS ENUM (
45     'html',
46     'markdown',
47     'text'
48 );
49
50
51 --
52 -- Name: gpx_visibility_enum; Type: TYPE; Schema: public; Owner: -
53 --
54
55 CREATE TYPE gpx_visibility_enum AS ENUM (
56     'private',
57     'public',
58     'trackable',
59     'identifiable'
60 );
61
62
63 --
64 -- Name: issue_status_enum; Type: TYPE; Schema: public; Owner: -
65 --
66
67 CREATE TYPE issue_status_enum AS ENUM (
68     'open',
69     'ignored',
70     'resolved'
71 );
72
73
74 --
75 -- Name: note_event_enum; Type: TYPE; Schema: public; Owner: -
76 --
77
78 CREATE TYPE note_event_enum AS ENUM (
79     'opened',
80     'closed',
81     'reopened',
82     'commented',
83     'hidden'
84 );
85
86
87 --
88 -- Name: note_status_enum; Type: TYPE; Schema: public; Owner: -
89 --
90
91 CREATE TYPE note_status_enum AS ENUM (
92     'open',
93     'closed',
94     'hidden'
95 );
96
97
98 --
99 -- Name: nwr_enum; Type: TYPE; Schema: public; Owner: -
100 --
101
102 CREATE TYPE nwr_enum AS ENUM (
103     'Node',
104     'Way',
105     'Relation'
106 );
107
108
109 --
110 -- Name: user_role_enum; Type: TYPE; Schema: public; Owner: -
111 --
112
113 CREATE TYPE user_role_enum AS ENUM (
114     'administrator',
115     'moderator'
116 );
117
118
119 --
120 -- Name: user_status_enum; Type: TYPE; Schema: public; Owner: -
121 --
122
123 CREATE TYPE user_status_enum AS ENUM (
124     'pending',
125     'active',
126     'confirmed',
127     'suspended',
128     'deleted'
129 );
130
131
132 --
133 -- Name: maptile_for_point(bigint, bigint, integer); Type: FUNCTION; Schema: public; Owner: -
134 --
135
136 CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer
137     LANGUAGE c STRICT
138     AS '$libdir/libpgosm', 'maptile_for_point';
139
140
141 --
142 -- Name: tile_for_point(integer, integer); Type: FUNCTION; Schema: public; Owner: -
143 --
144
145 CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint
146     LANGUAGE c STRICT
147     AS '$libdir/libpgosm', 'tile_for_point';
148
149
150 --
151 -- Name: xid_to_int4(xid); Type: FUNCTION; Schema: public; Owner: -
152 --
153
154 CREATE FUNCTION xid_to_int4(xid) RETURNS integer
155     LANGUAGE c IMMUTABLE STRICT
156     AS '$libdir/libpgosm', 'xid_to_int4';
157
158
159 SET default_tablespace = '';
160
161 SET default_with_oids = false;
162
163 --
164 -- Name: acls; Type: TABLE; Schema: public; Owner: -
165 --
166
167 CREATE TABLE acls (
168     id integer NOT NULL,
169     address inet,
170     k character varying(255) NOT NULL,
171     v character varying(255),
172     domain character varying(255)
173 );
174
175
176 --
177 -- Name: acls_id_seq; Type: SEQUENCE; Schema: public; Owner: -
178 --
179
180 CREATE SEQUENCE acls_id_seq
181     START WITH 1
182     INCREMENT BY 1
183     NO MINVALUE
184     NO MAXVALUE
185     CACHE 1;
186
187
188 --
189 -- Name: acls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
190 --
191
192 ALTER SEQUENCE acls_id_seq OWNED BY acls.id;
193
194
195 --
196 -- Name: ar_internal_metadata; Type: TABLE; Schema: public; Owner: -
197 --
198
199 CREATE TABLE ar_internal_metadata (
200     key character varying NOT NULL,
201     value character varying,
202     created_at timestamp without time zone NOT NULL,
203     updated_at timestamp without time zone NOT NULL
204 );
205
206
207 --
208 -- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -
209 --
210
211 CREATE TABLE changeset_comments (
212     id integer NOT NULL,
213     changeset_id bigint NOT NULL,
214     author_id bigint NOT NULL,
215     body text NOT NULL,
216     created_at timestamp without time zone NOT NULL,
217     visible boolean NOT NULL
218 );
219
220
221 --
222 -- Name: changeset_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
223 --
224
225 CREATE SEQUENCE changeset_comments_id_seq
226     START WITH 1
227     INCREMENT BY 1
228     NO MINVALUE
229     NO MAXVALUE
230     CACHE 1;
231
232
233 --
234 -- Name: changeset_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
235 --
236
237 ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
238
239
240 --
241 -- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -
242 --
243
244 CREATE TABLE changeset_tags (
245     changeset_id bigint NOT NULL,
246     k character varying(255) DEFAULT ''::character varying NOT NULL,
247     v character varying(255) DEFAULT ''::character varying NOT NULL
248 );
249
250
251 --
252 -- Name: changesets; Type: TABLE; Schema: public; Owner: -
253 --
254
255 CREATE TABLE changesets (
256     id bigint NOT NULL,
257     user_id bigint NOT NULL,
258     created_at timestamp without time zone NOT NULL,
259     min_lat integer,
260     max_lat integer,
261     min_lon integer,
262     max_lon integer,
263     closed_at timestamp without time zone NOT NULL,
264     num_changes integer DEFAULT 0 NOT NULL
265 );
266
267
268 --
269 -- Name: changesets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
270 --
271
272 CREATE SEQUENCE changesets_id_seq
273     START WITH 1
274     INCREMENT BY 1
275     NO MINVALUE
276     NO MAXVALUE
277     CACHE 1;
278
279
280 --
281 -- Name: changesets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
282 --
283
284 ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id;
285
286
287 --
288 -- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -
289 --
290
291 CREATE TABLE changesets_subscribers (
292     subscriber_id bigint NOT NULL,
293     changeset_id bigint NOT NULL
294 );
295
296
297 --
298 -- Name: client_applications; Type: TABLE; Schema: public; Owner: -
299 --
300
301 CREATE TABLE client_applications (
302     id integer NOT NULL,
303     name character varying(255),
304     url character varying(255),
305     support_url character varying(255),
306     callback_url character varying(255),
307     key character varying(50),
308     secret character varying(50),
309     user_id integer,
310     created_at timestamp without time zone,
311     updated_at timestamp without time zone,
312     allow_read_prefs boolean DEFAULT false NOT NULL,
313     allow_write_prefs boolean DEFAULT false NOT NULL,
314     allow_write_diary boolean DEFAULT false NOT NULL,
315     allow_write_api boolean DEFAULT false NOT NULL,
316     allow_read_gpx boolean DEFAULT false NOT NULL,
317     allow_write_gpx boolean DEFAULT false NOT NULL,
318     allow_write_notes boolean DEFAULT false NOT NULL
319 );
320
321
322 --
323 -- Name: client_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
324 --
325
326 CREATE SEQUENCE client_applications_id_seq
327     START WITH 1
328     INCREMENT BY 1
329     NO MINVALUE
330     NO MAXVALUE
331     CACHE 1;
332
333
334 --
335 -- Name: client_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
336 --
337
338 ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id;
339
340
341 --
342 -- Name: current_node_tags; Type: TABLE; Schema: public; Owner: -
343 --
344
345 CREATE TABLE current_node_tags (
346     node_id bigint NOT NULL,
347     k character varying(255) DEFAULT ''::character varying NOT NULL,
348     v character varying(255) DEFAULT ''::character varying NOT NULL
349 );
350
351
352 --
353 -- Name: current_nodes; Type: TABLE; Schema: public; Owner: -
354 --
355
356 CREATE TABLE current_nodes (
357     id bigint NOT NULL,
358     latitude integer NOT NULL,
359     longitude integer NOT NULL,
360     changeset_id bigint NOT NULL,
361     visible boolean NOT NULL,
362     "timestamp" timestamp without time zone NOT NULL,
363     tile bigint NOT NULL,
364     version bigint NOT NULL
365 );
366
367
368 --
369 -- Name: current_nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
370 --
371
372 CREATE SEQUENCE current_nodes_id_seq
373     START WITH 1
374     INCREMENT BY 1
375     NO MINVALUE
376     NO MAXVALUE
377     CACHE 1;
378
379
380 --
381 -- Name: current_nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
382 --
383
384 ALTER SEQUENCE current_nodes_id_seq OWNED BY current_nodes.id;
385
386
387 --
388 -- Name: current_relation_members; Type: TABLE; Schema: public; Owner: -
389 --
390
391 CREATE TABLE current_relation_members (
392     relation_id bigint NOT NULL,
393     member_type nwr_enum NOT NULL,
394     member_id bigint NOT NULL,
395     member_role character varying(255) NOT NULL,
396     sequence_id integer DEFAULT 0 NOT NULL
397 );
398
399
400 --
401 -- Name: current_relation_tags; Type: TABLE; Schema: public; Owner: -
402 --
403
404 CREATE TABLE current_relation_tags (
405     relation_id bigint NOT NULL,
406     k character varying(255) DEFAULT ''::character varying NOT NULL,
407     v character varying(255) DEFAULT ''::character varying NOT NULL
408 );
409
410
411 --
412 -- Name: current_relations; Type: TABLE; Schema: public; Owner: -
413 --
414
415 CREATE TABLE current_relations (
416     id bigint NOT NULL,
417     changeset_id bigint NOT NULL,
418     "timestamp" timestamp without time zone NOT NULL,
419     visible boolean NOT NULL,
420     version bigint NOT NULL
421 );
422
423
424 --
425 -- Name: current_relations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
426 --
427
428 CREATE SEQUENCE current_relations_id_seq
429     START WITH 1
430     INCREMENT BY 1
431     NO MINVALUE
432     NO MAXVALUE
433     CACHE 1;
434
435
436 --
437 -- Name: current_relations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
438 --
439
440 ALTER SEQUENCE current_relations_id_seq OWNED BY current_relations.id;
441
442
443 --
444 -- Name: current_way_nodes; Type: TABLE; Schema: public; Owner: -
445 --
446
447 CREATE TABLE current_way_nodes (
448     way_id bigint NOT NULL,
449     node_id bigint NOT NULL,
450     sequence_id bigint NOT NULL
451 );
452
453
454 --
455 -- Name: current_way_tags; Type: TABLE; Schema: public; Owner: -
456 --
457
458 CREATE TABLE current_way_tags (
459     way_id bigint NOT NULL,
460     k character varying(255) DEFAULT ''::character varying NOT NULL,
461     v character varying(255) DEFAULT ''::character varying NOT NULL
462 );
463
464
465 --
466 -- Name: current_ways; Type: TABLE; Schema: public; Owner: -
467 --
468
469 CREATE TABLE current_ways (
470     id bigint NOT NULL,
471     changeset_id bigint NOT NULL,
472     "timestamp" timestamp without time zone NOT NULL,
473     visible boolean NOT NULL,
474     version bigint NOT NULL
475 );
476
477
478 --
479 -- Name: current_ways_id_seq; Type: SEQUENCE; Schema: public; Owner: -
480 --
481
482 CREATE SEQUENCE current_ways_id_seq
483     START WITH 1
484     INCREMENT BY 1
485     NO MINVALUE
486     NO MAXVALUE
487     CACHE 1;
488
489
490 --
491 -- Name: current_ways_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
492 --
493
494 ALTER SEQUENCE current_ways_id_seq OWNED BY current_ways.id;
495
496
497 --
498 -- Name: diary_comments; Type: TABLE; Schema: public; Owner: -
499 --
500
501 CREATE TABLE diary_comments (
502     id bigint NOT NULL,
503     diary_entry_id bigint NOT NULL,
504     user_id bigint NOT NULL,
505     body text NOT NULL,
506     created_at timestamp without time zone NOT NULL,
507     updated_at timestamp without time zone NOT NULL,
508     visible boolean DEFAULT true NOT NULL,
509     body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
510 );
511
512
513 --
514 -- Name: diary_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
515 --
516
517 CREATE SEQUENCE diary_comments_id_seq
518     START WITH 1
519     INCREMENT BY 1
520     NO MINVALUE
521     NO MAXVALUE
522     CACHE 1;
523
524
525 --
526 -- Name: diary_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
527 --
528
529 ALTER SEQUENCE diary_comments_id_seq OWNED BY diary_comments.id;
530
531
532 --
533 -- Name: diary_entries; Type: TABLE; Schema: public; Owner: -
534 --
535
536 CREATE TABLE diary_entries (
537     id bigint NOT NULL,
538     user_id bigint NOT NULL,
539     title character varying(255) NOT NULL,
540     body text NOT NULL,
541     created_at timestamp without time zone NOT NULL,
542     updated_at timestamp without time zone NOT NULL,
543     latitude double precision,
544     longitude double precision,
545     language_code character varying(255) DEFAULT 'en'::character varying NOT NULL,
546     visible boolean DEFAULT true NOT NULL,
547     body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
548 );
549
550
551 --
552 -- Name: diary_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
553 --
554
555 CREATE SEQUENCE diary_entries_id_seq
556     START WITH 1
557     INCREMENT BY 1
558     NO MINVALUE
559     NO MAXVALUE
560     CACHE 1;
561
562
563 --
564 -- Name: diary_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
565 --
566
567 ALTER SEQUENCE diary_entries_id_seq OWNED BY diary_entries.id;
568
569
570 --
571 -- Name: diary_entry_subscriptions; Type: TABLE; Schema: public; Owner: -
572 --
573
574 CREATE TABLE diary_entry_subscriptions (
575     user_id bigint NOT NULL,
576     diary_entry_id bigint NOT NULL
577 );
578
579
580 --
581 -- Name: friends; Type: TABLE; Schema: public; Owner: -
582 --
583
584 CREATE TABLE friends (
585     id bigint NOT NULL,
586     user_id bigint NOT NULL,
587     friend_user_id bigint NOT NULL
588 );
589
590
591 --
592 -- Name: friends_id_seq; Type: SEQUENCE; Schema: public; Owner: -
593 --
594
595 CREATE SEQUENCE friends_id_seq
596     START WITH 1
597     INCREMENT BY 1
598     NO MINVALUE
599     NO MAXVALUE
600     CACHE 1;
601
602
603 --
604 -- Name: friends_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
605 --
606
607 ALTER SEQUENCE friends_id_seq OWNED BY friends.id;
608
609
610 --
611 -- Name: gps_points; Type: TABLE; Schema: public; Owner: -
612 --
613
614 CREATE TABLE gps_points (
615     altitude double precision,
616     trackid integer NOT NULL,
617     latitude integer NOT NULL,
618     longitude integer NOT NULL,
619     gpx_id bigint NOT NULL,
620     "timestamp" timestamp without time zone,
621     tile bigint
622 );
623
624
625 --
626 -- Name: gpx_file_tags; Type: TABLE; Schema: public; Owner: -
627 --
628
629 CREATE TABLE gpx_file_tags (
630     gpx_id bigint DEFAULT 0 NOT NULL,
631     tag character varying(255) NOT NULL,
632     id bigint NOT NULL
633 );
634
635
636 --
637 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
638 --
639
640 CREATE SEQUENCE gpx_file_tags_id_seq
641     START WITH 1
642     INCREMENT BY 1
643     NO MINVALUE
644     NO MAXVALUE
645     CACHE 1;
646
647
648 --
649 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
650 --
651
652 ALTER SEQUENCE gpx_file_tags_id_seq OWNED BY gpx_file_tags.id;
653
654
655 --
656 -- Name: gpx_files; Type: TABLE; Schema: public; Owner: -
657 --
658
659 CREATE TABLE gpx_files (
660     id bigint NOT NULL,
661     user_id bigint NOT NULL,
662     visible boolean DEFAULT true NOT NULL,
663     name character varying(255) DEFAULT ''::character varying NOT NULL,
664     size bigint,
665     latitude double precision,
666     longitude double precision,
667     "timestamp" timestamp without time zone NOT NULL,
668     description character varying(255) DEFAULT ''::character varying NOT NULL,
669     inserted boolean NOT NULL,
670     visibility gpx_visibility_enum DEFAULT 'public'::gpx_visibility_enum NOT NULL
671 );
672
673
674 --
675 -- Name: gpx_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
676 --
677
678 CREATE SEQUENCE gpx_files_id_seq
679     START WITH 1
680     INCREMENT BY 1
681     NO MINVALUE
682     NO MAXVALUE
683     CACHE 1;
684
685
686 --
687 -- Name: gpx_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
688 --
689
690 ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
691
692
693 --
694 -- Name: issue_comments; Type: TABLE; Schema: public; Owner: -
695 --
696
697 CREATE TABLE issue_comments (
698     id integer NOT NULL,
699     issue_id integer NOT NULL,
700     user_id integer NOT NULL,
701     body text NOT NULL,
702     created_at timestamp without time zone NOT NULL,
703     updated_at timestamp without time zone NOT NULL
704 );
705
706
707 --
708 -- Name: issue_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
709 --
710
711 CREATE SEQUENCE issue_comments_id_seq
712     START WITH 1
713     INCREMENT BY 1
714     NO MINVALUE
715     NO MAXVALUE
716     CACHE 1;
717
718
719 --
720 -- Name: issue_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
721 --
722
723 ALTER SEQUENCE issue_comments_id_seq OWNED BY issue_comments.id;
724
725
726 --
727 -- Name: issues; Type: TABLE; Schema: public; Owner: -
728 --
729
730 CREATE TABLE issues (
731     id integer NOT NULL,
732     reportable_type character varying NOT NULL,
733     reportable_id integer NOT NULL,
734     reported_user_id integer,
735     status issue_status_enum DEFAULT 'open'::public.issue_status_enum NOT NULL,
736     assigned_role user_role_enum NOT NULL,
737     resolved_at timestamp without time zone,
738     resolved_by integer,
739     updated_by integer,
740     reports_count integer DEFAULT 0,
741     created_at timestamp without time zone NOT NULL,
742     updated_at timestamp without time zone NOT NULL
743 );
744
745
746 --
747 -- Name: issues_id_seq; Type: SEQUENCE; Schema: public; Owner: -
748 --
749
750 CREATE SEQUENCE issues_id_seq
751     START WITH 1
752     INCREMENT BY 1
753     NO MINVALUE
754     NO MAXVALUE
755     CACHE 1;
756
757
758 --
759 -- Name: issues_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
760 --
761
762 ALTER SEQUENCE issues_id_seq OWNED BY issues.id;
763
764
765 --
766 -- Name: languages; Type: TABLE; Schema: public; Owner: -
767 --
768
769 CREATE TABLE languages (
770     code character varying(255) NOT NULL,
771     english_name character varying(255) NOT NULL,
772     native_name character varying(255)
773 );
774
775
776 --
777 -- Name: messages; Type: TABLE; Schema: public; Owner: -
778 --
779
780 CREATE TABLE messages (
781     id bigint NOT NULL,
782     from_user_id bigint NOT NULL,
783     title character varying(255) NOT NULL,
784     body text NOT NULL,
785     sent_on timestamp without time zone NOT NULL,
786     message_read boolean DEFAULT false NOT NULL,
787     to_user_id bigint NOT NULL,
788     to_user_visible boolean DEFAULT true NOT NULL,
789     from_user_visible boolean DEFAULT true NOT NULL,
790     body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
791 );
792
793
794 --
795 -- Name: messages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
796 --
797
798 CREATE SEQUENCE messages_id_seq
799     START WITH 1
800     INCREMENT BY 1
801     NO MINVALUE
802     NO MAXVALUE
803     CACHE 1;
804
805
806 --
807 -- Name: messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
808 --
809
810 ALTER SEQUENCE messages_id_seq OWNED BY messages.id;
811
812
813 --
814 -- Name: node_tags; Type: TABLE; Schema: public; Owner: -
815 --
816
817 CREATE TABLE node_tags (
818     node_id bigint NOT NULL,
819     version bigint NOT NULL,
820     k character varying(255) DEFAULT ''::character varying NOT NULL,
821     v character varying(255) DEFAULT ''::character varying NOT NULL
822 );
823
824
825 --
826 -- Name: nodes; Type: TABLE; Schema: public; Owner: -
827 --
828
829 CREATE TABLE nodes (
830     node_id bigint NOT NULL,
831     latitude integer NOT NULL,
832     longitude integer NOT NULL,
833     changeset_id bigint NOT NULL,
834     visible boolean NOT NULL,
835     "timestamp" timestamp without time zone NOT NULL,
836     tile bigint NOT NULL,
837     version bigint NOT NULL,
838     redaction_id integer
839 );
840
841
842 --
843 -- Name: note_comments; Type: TABLE; Schema: public; Owner: -
844 --
845
846 CREATE TABLE note_comments (
847     id integer NOT NULL,
848     note_id bigint NOT NULL,
849     visible boolean NOT NULL,
850     created_at timestamp without time zone NOT NULL,
851     author_ip inet,
852     author_id bigint,
853     body text,
854     event note_event_enum
855 );
856
857
858 --
859 -- Name: note_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
860 --
861
862 CREATE SEQUENCE note_comments_id_seq
863     START WITH 1
864     INCREMENT BY 1
865     NO MINVALUE
866     NO MAXVALUE
867     CACHE 1;
868
869
870 --
871 -- Name: note_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
872 --
873
874 ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id;
875
876
877 --
878 -- Name: notes; Type: TABLE; Schema: public; Owner: -
879 --
880
881 CREATE TABLE notes (
882     id integer NOT NULL,
883     latitude integer NOT NULL,
884     longitude integer NOT NULL,
885     tile bigint NOT NULL,
886     updated_at timestamp without time zone NOT NULL,
887     created_at timestamp without time zone NOT NULL,
888     status note_status_enum NOT NULL,
889     closed_at timestamp without time zone
890 );
891
892
893 --
894 -- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
895 --
896
897 CREATE SEQUENCE notes_id_seq
898     START WITH 1
899     INCREMENT BY 1
900     NO MINVALUE
901     NO MAXVALUE
902     CACHE 1;
903
904
905 --
906 -- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
907 --
908
909 ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
910
911
912 --
913 -- Name: oauth_nonces; Type: TABLE; Schema: public; Owner: -
914 --
915
916 CREATE TABLE oauth_nonces (
917     id integer NOT NULL,
918     nonce character varying(255),
919     "timestamp" integer,
920     created_at timestamp without time zone,
921     updated_at timestamp without time zone
922 );
923
924
925 --
926 -- Name: oauth_nonces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
927 --
928
929 CREATE SEQUENCE oauth_nonces_id_seq
930     START WITH 1
931     INCREMENT BY 1
932     NO MINVALUE
933     NO MAXVALUE
934     CACHE 1;
935
936
937 --
938 -- Name: oauth_nonces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
939 --
940
941 ALTER SEQUENCE oauth_nonces_id_seq OWNED BY oauth_nonces.id;
942
943
944 --
945 -- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: -
946 --
947
948 CREATE TABLE oauth_tokens (
949     id integer NOT NULL,
950     user_id integer,
951     type character varying(20),
952     client_application_id integer,
953     token character varying(50),
954     secret character varying(50),
955     authorized_at timestamp without time zone,
956     invalidated_at timestamp without time zone,
957     created_at timestamp without time zone,
958     updated_at timestamp without time zone,
959     allow_read_prefs boolean DEFAULT false NOT NULL,
960     allow_write_prefs boolean DEFAULT false NOT NULL,
961     allow_write_diary boolean DEFAULT false NOT NULL,
962     allow_write_api boolean DEFAULT false NOT NULL,
963     allow_read_gpx boolean DEFAULT false NOT NULL,
964     allow_write_gpx boolean DEFAULT false NOT NULL,
965     callback_url character varying(255),
966     verifier character varying(20),
967     scope character varying(255),
968     valid_to timestamp without time zone,
969     allow_write_notes boolean DEFAULT false NOT NULL
970 );
971
972
973 --
974 -- Name: oauth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
975 --
976
977 CREATE SEQUENCE oauth_tokens_id_seq
978     START WITH 1
979     INCREMENT BY 1
980     NO MINVALUE
981     NO MAXVALUE
982     CACHE 1;
983
984
985 --
986 -- Name: oauth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
987 --
988
989 ALTER SEQUENCE oauth_tokens_id_seq OWNED BY oauth_tokens.id;
990
991
992 --
993 -- Name: redactions; Type: TABLE; Schema: public; Owner: -
994 --
995
996 CREATE TABLE redactions (
997     id integer NOT NULL,
998     title character varying(255),
999     description text,
1000     created_at timestamp without time zone NOT NULL,
1001     updated_at timestamp without time zone NOT NULL,
1002     user_id bigint NOT NULL,
1003     description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
1004 );
1005
1006
1007 --
1008 -- Name: redactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1009 --
1010
1011 CREATE SEQUENCE redactions_id_seq
1012     START WITH 1
1013     INCREMENT BY 1
1014     NO MINVALUE
1015     NO MAXVALUE
1016     CACHE 1;
1017
1018
1019 --
1020 -- Name: redactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1021 --
1022
1023 ALTER SEQUENCE redactions_id_seq OWNED BY redactions.id;
1024
1025
1026 --
1027 -- Name: relation_members; Type: TABLE; Schema: public; Owner: -
1028 --
1029
1030 CREATE TABLE relation_members (
1031     relation_id bigint DEFAULT 0 NOT NULL,
1032     member_type nwr_enum NOT NULL,
1033     member_id bigint NOT NULL,
1034     member_role character varying(255) NOT NULL,
1035     version bigint DEFAULT 0 NOT NULL,
1036     sequence_id integer DEFAULT 0 NOT NULL
1037 );
1038
1039
1040 --
1041 -- Name: relation_tags; Type: TABLE; Schema: public; Owner: -
1042 --
1043
1044 CREATE TABLE relation_tags (
1045     relation_id bigint DEFAULT 0 NOT NULL,
1046     k character varying(255) DEFAULT ''::character varying NOT NULL,
1047     v character varying(255) DEFAULT ''::character varying NOT NULL,
1048     version bigint NOT NULL
1049 );
1050
1051
1052 --
1053 -- Name: relations; Type: TABLE; Schema: public; Owner: -
1054 --
1055
1056 CREATE TABLE relations (
1057     relation_id bigint DEFAULT 0 NOT NULL,
1058     changeset_id bigint NOT NULL,
1059     "timestamp" timestamp without time zone NOT NULL,
1060     version bigint NOT NULL,
1061     visible boolean DEFAULT true NOT NULL,
1062     redaction_id integer
1063 );
1064
1065
1066 --
1067 -- Name: reports; Type: TABLE; Schema: public; Owner: -
1068 --
1069
1070 CREATE TABLE reports (
1071     id integer NOT NULL,
1072     issue_id integer NOT NULL,
1073     user_id integer NOT NULL,
1074     details text NOT NULL,
1075     category character varying NOT NULL,
1076     created_at timestamp without time zone NOT NULL,
1077     updated_at timestamp without time zone NOT NULL
1078 );
1079
1080
1081 --
1082 -- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1083 --
1084
1085 CREATE SEQUENCE reports_id_seq
1086     START WITH 1
1087     INCREMENT BY 1
1088     NO MINVALUE
1089     NO MAXVALUE
1090     CACHE 1;
1091
1092
1093 --
1094 -- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1095 --
1096
1097 ALTER SEQUENCE reports_id_seq OWNED BY reports.id;
1098
1099
1100 --
1101 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
1102 --
1103
1104 CREATE TABLE schema_migrations (
1105     version character varying(255) NOT NULL
1106 );
1107
1108
1109 --
1110 -- Name: user_blocks; Type: TABLE; Schema: public; Owner: -
1111 --
1112
1113 CREATE TABLE user_blocks (
1114     id integer NOT NULL,
1115     user_id bigint NOT NULL,
1116     creator_id bigint NOT NULL,
1117     reason text NOT NULL,
1118     ends_at timestamp without time zone NOT NULL,
1119     needs_view boolean DEFAULT false NOT NULL,
1120     revoker_id bigint,
1121     created_at timestamp without time zone,
1122     updated_at timestamp without time zone,
1123     reason_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
1124 );
1125
1126
1127 --
1128 -- Name: user_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1129 --
1130
1131 CREATE SEQUENCE user_blocks_id_seq
1132     START WITH 1
1133     INCREMENT BY 1
1134     NO MINVALUE
1135     NO MAXVALUE
1136     CACHE 1;
1137
1138
1139 --
1140 -- Name: user_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1141 --
1142
1143 ALTER SEQUENCE user_blocks_id_seq OWNED BY user_blocks.id;
1144
1145
1146 --
1147 -- Name: user_preferences; Type: TABLE; Schema: public; Owner: -
1148 --
1149
1150 CREATE TABLE user_preferences (
1151     user_id bigint NOT NULL,
1152     k character varying(255) NOT NULL,
1153     v character varying(255) NOT NULL
1154 );
1155
1156
1157 --
1158 -- Name: user_roles; Type: TABLE; Schema: public; Owner: -
1159 --
1160
1161 CREATE TABLE user_roles (
1162     id integer NOT NULL,
1163     user_id bigint NOT NULL,
1164     created_at timestamp without time zone,
1165     updated_at timestamp without time zone,
1166     role user_role_enum NOT NULL,
1167     granter_id bigint NOT NULL
1168 );
1169
1170
1171 --
1172 -- Name: user_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1173 --
1174
1175 CREATE SEQUENCE user_roles_id_seq
1176     START WITH 1
1177     INCREMENT BY 1
1178     NO MINVALUE
1179     NO MAXVALUE
1180     CACHE 1;
1181
1182
1183 --
1184 -- Name: user_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1185 --
1186
1187 ALTER SEQUENCE user_roles_id_seq OWNED BY user_roles.id;
1188
1189
1190 --
1191 -- Name: user_tokens; Type: TABLE; Schema: public; Owner: -
1192 --
1193
1194 CREATE TABLE user_tokens (
1195     id bigint NOT NULL,
1196     user_id bigint NOT NULL,
1197     token character varying(255) NOT NULL,
1198     expiry timestamp without time zone NOT NULL,
1199     referer text
1200 );
1201
1202
1203 --
1204 -- Name: user_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1205 --
1206
1207 CREATE SEQUENCE user_tokens_id_seq
1208     START WITH 1
1209     INCREMENT BY 1
1210     NO MINVALUE
1211     NO MAXVALUE
1212     CACHE 1;
1213
1214
1215 --
1216 -- Name: user_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1217 --
1218
1219 ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id;
1220
1221
1222 --
1223 -- Name: users; Type: TABLE; Schema: public; Owner: -
1224 --
1225
1226 CREATE TABLE users (
1227     email character varying(255) NOT NULL,
1228     id bigint NOT NULL,
1229     pass_crypt character varying(255) NOT NULL,
1230     creation_time timestamp without time zone NOT NULL,
1231     display_name character varying(255) DEFAULT ''::character varying NOT NULL,
1232     data_public boolean DEFAULT false NOT NULL,
1233     description text DEFAULT ''::text NOT NULL,
1234     home_lat double precision,
1235     home_lon double precision,
1236     home_zoom smallint DEFAULT 3,
1237     nearby integer DEFAULT 50,
1238     pass_salt character varying(255),
1239     image_file_name text,
1240     email_valid boolean DEFAULT false NOT NULL,
1241     new_email character varying(255),
1242     creation_ip character varying(255),
1243     languages character varying(255),
1244     status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
1245     terms_agreed timestamp without time zone,
1246     consider_pd boolean DEFAULT false NOT NULL,
1247     preferred_editor character varying(255),
1248     terms_seen boolean DEFAULT false NOT NULL,
1249     auth_uid character varying(255),
1250     description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL,
1251     image_fingerprint character varying(255),
1252     changesets_count integer DEFAULT 0 NOT NULL,
1253     traces_count integer DEFAULT 0 NOT NULL,
1254     diary_entries_count integer DEFAULT 0 NOT NULL,
1255     image_use_gravatar boolean DEFAULT false NOT NULL,
1256     image_content_type character varying(255),
1257     auth_provider character varying(255),
1258     home_tile bigint
1259 );
1260
1261
1262 --
1263 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1264 --
1265
1266 CREATE SEQUENCE users_id_seq
1267     START WITH 1
1268     INCREMENT BY 1
1269     NO MINVALUE
1270     NO MAXVALUE
1271     CACHE 1;
1272
1273
1274 --
1275 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1276 --
1277
1278 ALTER SEQUENCE users_id_seq OWNED BY users.id;
1279
1280
1281 --
1282 -- Name: way_nodes; Type: TABLE; Schema: public; Owner: -
1283 --
1284
1285 CREATE TABLE way_nodes (
1286     way_id bigint NOT NULL,
1287     node_id bigint NOT NULL,
1288     version bigint NOT NULL,
1289     sequence_id bigint NOT NULL
1290 );
1291
1292
1293 --
1294 -- Name: way_tags; Type: TABLE; Schema: public; Owner: -
1295 --
1296
1297 CREATE TABLE way_tags (
1298     way_id bigint DEFAULT 0 NOT NULL,
1299     k character varying(255) NOT NULL,
1300     v character varying(255) NOT NULL,
1301     version bigint NOT NULL
1302 );
1303
1304
1305 --
1306 -- Name: ways; Type: TABLE; Schema: public; Owner: -
1307 --
1308
1309 CREATE TABLE ways (
1310     way_id bigint DEFAULT 0 NOT NULL,
1311     changeset_id bigint NOT NULL,
1312     "timestamp" timestamp without time zone NOT NULL,
1313     version bigint NOT NULL,
1314     visible boolean DEFAULT true NOT NULL,
1315     redaction_id integer
1316 );
1317
1318
1319 --
1320 -- Name: acls id; Type: DEFAULT; Schema: public; Owner: -
1321 --
1322
1323 ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass);
1324
1325
1326 --
1327 -- Name: changeset_comments id; Type: DEFAULT; Schema: public; Owner: -
1328 --
1329
1330 ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass);
1331
1332
1333 --
1334 -- Name: changesets id; Type: DEFAULT; Schema: public; Owner: -
1335 --
1336
1337 ALTER TABLE ONLY changesets ALTER COLUMN id SET DEFAULT nextval('changesets_id_seq'::regclass);
1338
1339
1340 --
1341 -- Name: client_applications id; Type: DEFAULT; Schema: public; Owner: -
1342 --
1343
1344 ALTER TABLE ONLY client_applications ALTER COLUMN id SET DEFAULT nextval('client_applications_id_seq'::regclass);
1345
1346
1347 --
1348 -- Name: current_nodes id; Type: DEFAULT; Schema: public; Owner: -
1349 --
1350
1351 ALTER TABLE ONLY current_nodes ALTER COLUMN id SET DEFAULT nextval('current_nodes_id_seq'::regclass);
1352
1353
1354 --
1355 -- Name: current_relations id; Type: DEFAULT; Schema: public; Owner: -
1356 --
1357
1358 ALTER TABLE ONLY current_relations ALTER COLUMN id SET DEFAULT nextval('current_relations_id_seq'::regclass);
1359
1360
1361 --
1362 -- Name: current_ways id; Type: DEFAULT; Schema: public; Owner: -
1363 --
1364
1365 ALTER TABLE ONLY current_ways ALTER COLUMN id SET DEFAULT nextval('current_ways_id_seq'::regclass);
1366
1367
1368 --
1369 -- Name: diary_comments id; Type: DEFAULT; Schema: public; Owner: -
1370 --
1371
1372 ALTER TABLE ONLY diary_comments ALTER COLUMN id SET DEFAULT nextval('diary_comments_id_seq'::regclass);
1373
1374
1375 --
1376 -- Name: diary_entries id; Type: DEFAULT; Schema: public; Owner: -
1377 --
1378
1379 ALTER TABLE ONLY diary_entries ALTER COLUMN id SET DEFAULT nextval('diary_entries_id_seq'::regclass);
1380
1381
1382 --
1383 -- Name: friends id; Type: DEFAULT; Schema: public; Owner: -
1384 --
1385
1386 ALTER TABLE ONLY friends ALTER COLUMN id SET DEFAULT nextval('friends_id_seq'::regclass);
1387
1388
1389 --
1390 -- Name: gpx_file_tags id; Type: DEFAULT; Schema: public; Owner: -
1391 --
1392
1393 ALTER TABLE ONLY gpx_file_tags ALTER COLUMN id SET DEFAULT nextval('gpx_file_tags_id_seq'::regclass);
1394
1395
1396 --
1397 -- Name: gpx_files id; Type: DEFAULT; Schema: public; Owner: -
1398 --
1399
1400 ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq'::regclass);
1401
1402
1403 --
1404 -- Name: issue_comments id; Type: DEFAULT; Schema: public; Owner: -
1405 --
1406
1407 ALTER TABLE ONLY issue_comments ALTER COLUMN id SET DEFAULT nextval('issue_comments_id_seq'::regclass);
1408
1409
1410 --
1411 -- Name: issues id; Type: DEFAULT; Schema: public; Owner: -
1412 --
1413
1414 ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass);
1415
1416
1417 --
1418 -- Name: messages id; Type: DEFAULT; Schema: public; Owner: -
1419 --
1420
1421 ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass);
1422
1423
1424 --
1425 -- Name: note_comments id; Type: DEFAULT; Schema: public; Owner: -
1426 --
1427
1428 ALTER TABLE ONLY note_comments ALTER COLUMN id SET DEFAULT nextval('note_comments_id_seq'::regclass);
1429
1430
1431 --
1432 -- Name: notes id; Type: DEFAULT; Schema: public; Owner: -
1433 --
1434
1435 ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
1436
1437
1438 --
1439 -- Name: oauth_nonces id; Type: DEFAULT; Schema: public; Owner: -
1440 --
1441
1442 ALTER TABLE ONLY oauth_nonces ALTER COLUMN id SET DEFAULT nextval('oauth_nonces_id_seq'::regclass);
1443
1444
1445 --
1446 -- Name: oauth_tokens id; Type: DEFAULT; Schema: public; Owner: -
1447 --
1448
1449 ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_id_seq'::regclass);
1450
1451
1452 --
1453 -- Name: redactions id; Type: DEFAULT; Schema: public; Owner: -
1454 --
1455
1456 ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_seq'::regclass);
1457
1458
1459 --
1460 -- Name: reports id; Type: DEFAULT; Schema: public; Owner: -
1461 --
1462
1463 ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass);
1464
1465
1466 --
1467 -- Name: user_blocks id; Type: DEFAULT; Schema: public; Owner: -
1468 --
1469
1470 ALTER TABLE ONLY user_blocks ALTER COLUMN id SET DEFAULT nextval('user_blocks_id_seq'::regclass);
1471
1472
1473 --
1474 -- Name: user_roles id; Type: DEFAULT; Schema: public; Owner: -
1475 --
1476
1477 ALTER TABLE ONLY user_roles ALTER COLUMN id SET DEFAULT nextval('user_roles_id_seq'::regclass);
1478
1479
1480 --
1481 -- Name: user_tokens id; Type: DEFAULT; Schema: public; Owner: -
1482 --
1483
1484 ALTER TABLE ONLY user_tokens ALTER COLUMN id SET DEFAULT nextval('user_tokens_id_seq'::regclass);
1485
1486
1487 --
1488 -- Name: users id; Type: DEFAULT; Schema: public; Owner: -
1489 --
1490
1491 ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1492
1493
1494 --
1495 -- Name: acls acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1496 --
1497
1498 ALTER TABLE ONLY acls
1499     ADD CONSTRAINT acls_pkey PRIMARY KEY (id);
1500
1501
1502 --
1503 -- Name: ar_internal_metadata ar_internal_metadata_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1504 --
1505
1506 ALTER TABLE ONLY ar_internal_metadata
1507     ADD CONSTRAINT ar_internal_metadata_pkey PRIMARY KEY (key);
1508
1509
1510 --
1511 -- Name: changeset_comments changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1512 --
1513
1514 ALTER TABLE ONLY changeset_comments
1515     ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id);
1516
1517
1518 --
1519 -- Name: changesets changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1520 --
1521
1522 ALTER TABLE ONLY changesets
1523     ADD CONSTRAINT changesets_pkey PRIMARY KEY (id);
1524
1525
1526 --
1527 -- Name: client_applications client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1528 --
1529
1530 ALTER TABLE ONLY client_applications
1531     ADD CONSTRAINT client_applications_pkey PRIMARY KEY (id);
1532
1533
1534 --
1535 -- Name: current_node_tags current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1536 --
1537
1538 ALTER TABLE ONLY current_node_tags
1539     ADD CONSTRAINT current_node_tags_pkey PRIMARY KEY (node_id, k);
1540
1541
1542 --
1543 -- Name: current_nodes current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -
1544 --
1545
1546 ALTER TABLE ONLY current_nodes
1547     ADD CONSTRAINT current_nodes_pkey1 PRIMARY KEY (id);
1548
1549
1550 --
1551 -- Name: current_relation_members current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1552 --
1553
1554 ALTER TABLE ONLY current_relation_members
1555     ADD CONSTRAINT current_relation_members_pkey PRIMARY KEY (relation_id, member_type, member_id, member_role, sequence_id);
1556
1557
1558 --
1559 -- Name: current_relation_tags current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1560 --
1561
1562 ALTER TABLE ONLY current_relation_tags
1563     ADD CONSTRAINT current_relation_tags_pkey PRIMARY KEY (relation_id, k);
1564
1565
1566 --
1567 -- Name: current_relations current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1568 --
1569
1570 ALTER TABLE ONLY current_relations
1571     ADD CONSTRAINT current_relations_pkey PRIMARY KEY (id);
1572
1573
1574 --
1575 -- Name: current_way_nodes current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1576 --
1577
1578 ALTER TABLE ONLY current_way_nodes
1579     ADD CONSTRAINT current_way_nodes_pkey PRIMARY KEY (way_id, sequence_id);
1580
1581
1582 --
1583 -- Name: current_way_tags current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1584 --
1585
1586 ALTER TABLE ONLY current_way_tags
1587     ADD CONSTRAINT current_way_tags_pkey PRIMARY KEY (way_id, k);
1588
1589
1590 --
1591 -- Name: current_ways current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1592 --
1593
1594 ALTER TABLE ONLY current_ways
1595     ADD CONSTRAINT current_ways_pkey PRIMARY KEY (id);
1596
1597
1598 --
1599 -- Name: diary_comments diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1600 --
1601
1602 ALTER TABLE ONLY diary_comments
1603     ADD CONSTRAINT diary_comments_pkey PRIMARY KEY (id);
1604
1605
1606 --
1607 -- Name: diary_entries diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1608 --
1609
1610 ALTER TABLE ONLY diary_entries
1611     ADD CONSTRAINT diary_entries_pkey PRIMARY KEY (id);
1612
1613
1614 --
1615 -- Name: diary_entry_subscriptions diary_entry_subscriptions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1616 --
1617
1618 ALTER TABLE ONLY diary_entry_subscriptions
1619     ADD CONSTRAINT diary_entry_subscriptions_pkey PRIMARY KEY (user_id, diary_entry_id);
1620
1621
1622 --
1623 -- Name: friends friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1624 --
1625
1626 ALTER TABLE ONLY friends
1627     ADD CONSTRAINT friends_pkey PRIMARY KEY (id);
1628
1629
1630 --
1631 -- Name: gpx_file_tags gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1632 --
1633
1634 ALTER TABLE ONLY gpx_file_tags
1635     ADD CONSTRAINT gpx_file_tags_pkey PRIMARY KEY (id);
1636
1637
1638 --
1639 -- Name: gpx_files gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1640 --
1641
1642 ALTER TABLE ONLY gpx_files
1643     ADD CONSTRAINT gpx_files_pkey PRIMARY KEY (id);
1644
1645
1646 --
1647 -- Name: issue_comments issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1648 --
1649
1650 ALTER TABLE ONLY issue_comments
1651     ADD CONSTRAINT issue_comments_pkey PRIMARY KEY (id);
1652
1653
1654 --
1655 -- Name: issues issues_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1656 --
1657
1658 ALTER TABLE ONLY issues
1659     ADD CONSTRAINT issues_pkey PRIMARY KEY (id);
1660
1661
1662 --
1663 -- Name: languages languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1664 --
1665
1666 ALTER TABLE ONLY languages
1667     ADD CONSTRAINT languages_pkey PRIMARY KEY (code);
1668
1669
1670 --
1671 -- Name: messages messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1672 --
1673
1674 ALTER TABLE ONLY messages
1675     ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
1676
1677
1678 --
1679 -- Name: node_tags node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1680 --
1681
1682 ALTER TABLE ONLY node_tags
1683     ADD CONSTRAINT node_tags_pkey PRIMARY KEY (node_id, version, k);
1684
1685
1686 --
1687 -- Name: nodes nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1688 --
1689
1690 ALTER TABLE ONLY nodes
1691     ADD CONSTRAINT nodes_pkey PRIMARY KEY (node_id, version);
1692
1693
1694 --
1695 -- Name: note_comments note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1696 --
1697
1698 ALTER TABLE ONLY note_comments
1699     ADD CONSTRAINT note_comments_pkey PRIMARY KEY (id);
1700
1701
1702 --
1703 -- Name: notes notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1704 --
1705
1706 ALTER TABLE ONLY notes
1707     ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
1708
1709
1710 --
1711 -- Name: oauth_nonces oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1712 --
1713
1714 ALTER TABLE ONLY oauth_nonces
1715     ADD CONSTRAINT oauth_nonces_pkey PRIMARY KEY (id);
1716
1717
1718 --
1719 -- Name: oauth_tokens oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1720 --
1721
1722 ALTER TABLE ONLY oauth_tokens
1723     ADD CONSTRAINT oauth_tokens_pkey PRIMARY KEY (id);
1724
1725
1726 --
1727 -- Name: redactions redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1728 --
1729
1730 ALTER TABLE ONLY redactions
1731     ADD CONSTRAINT redactions_pkey PRIMARY KEY (id);
1732
1733
1734 --
1735 -- Name: relation_members relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1736 --
1737
1738 ALTER TABLE ONLY relation_members
1739     ADD CONSTRAINT relation_members_pkey PRIMARY KEY (relation_id, version, member_type, member_id, member_role, sequence_id);
1740
1741
1742 --
1743 -- Name: relation_tags relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1744 --
1745
1746 ALTER TABLE ONLY relation_tags
1747     ADD CONSTRAINT relation_tags_pkey PRIMARY KEY (relation_id, version, k);
1748
1749
1750 --
1751 -- Name: relations relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1752 --
1753
1754 ALTER TABLE ONLY relations
1755     ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
1756
1757
1758 --
1759 -- Name: reports reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1760 --
1761
1762 ALTER TABLE ONLY reports
1763     ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
1764
1765
1766 --
1767 -- Name: user_blocks user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1768 --
1769
1770 ALTER TABLE ONLY user_blocks
1771     ADD CONSTRAINT user_blocks_pkey PRIMARY KEY (id);
1772
1773
1774 --
1775 -- Name: user_preferences user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1776 --
1777
1778 ALTER TABLE ONLY user_preferences
1779     ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (user_id, k);
1780
1781
1782 --
1783 -- Name: user_roles user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1784 --
1785
1786 ALTER TABLE ONLY user_roles
1787     ADD CONSTRAINT user_roles_pkey PRIMARY KEY (id);
1788
1789
1790 --
1791 -- Name: user_tokens user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1792 --
1793
1794 ALTER TABLE ONLY user_tokens
1795     ADD CONSTRAINT user_tokens_pkey PRIMARY KEY (id);
1796
1797
1798 --
1799 -- Name: users users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1800 --
1801
1802 ALTER TABLE ONLY users
1803     ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1804
1805
1806 --
1807 -- Name: way_nodes way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1808 --
1809
1810 ALTER TABLE ONLY way_nodes
1811     ADD CONSTRAINT way_nodes_pkey PRIMARY KEY (way_id, version, sequence_id);
1812
1813
1814 --
1815 -- Name: way_tags way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1816 --
1817
1818 ALTER TABLE ONLY way_tags
1819     ADD CONSTRAINT way_tags_pkey PRIMARY KEY (way_id, version, k);
1820
1821
1822 --
1823 -- Name: ways ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1824 --
1825
1826 ALTER TABLE ONLY ways
1827     ADD CONSTRAINT ways_pkey PRIMARY KEY (way_id, version);
1828
1829
1830 --
1831 -- Name: acls_k_idx; Type: INDEX; Schema: public; Owner: -
1832 --
1833
1834 CREATE INDEX acls_k_idx ON acls USING btree (k);
1835
1836
1837 --
1838 -- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: -
1839 --
1840
1841 CREATE INDEX changeset_tags_id_idx ON changeset_tags USING btree (changeset_id);
1842
1843
1844 --
1845 -- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: -
1846 --
1847
1848 CREATE INDEX changesets_bbox_idx ON changesets USING gist (min_lat, max_lat, min_lon, max_lon);
1849
1850
1851 --
1852 -- Name: changesets_closed_at_idx; Type: INDEX; Schema: public; Owner: -
1853 --
1854
1855 CREATE INDEX changesets_closed_at_idx ON changesets USING btree (closed_at);
1856
1857
1858 --
1859 -- Name: changesets_created_at_idx; Type: INDEX; Schema: public; Owner: -
1860 --
1861
1862 CREATE INDEX changesets_created_at_idx ON changesets USING btree (created_at);
1863
1864
1865 --
1866 -- Name: changesets_user_id_created_at_idx; Type: INDEX; Schema: public; Owner: -
1867 --
1868
1869 CREATE INDEX changesets_user_id_created_at_idx ON changesets USING btree (user_id, created_at);
1870
1871
1872 --
1873 -- Name: changesets_user_id_id_idx; Type: INDEX; Schema: public; Owner: -
1874 --
1875
1876 CREATE INDEX changesets_user_id_id_idx ON changesets USING btree (user_id, id);
1877
1878
1879 --
1880 -- Name: current_nodes_tile_idx; Type: INDEX; Schema: public; Owner: -
1881 --
1882
1883 CREATE INDEX current_nodes_tile_idx ON current_nodes USING btree (tile);
1884
1885
1886 --
1887 -- Name: current_nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1888 --
1889
1890 CREATE INDEX current_nodes_timestamp_idx ON current_nodes USING btree ("timestamp");
1891
1892
1893 --
1894 -- Name: current_relation_members_member_idx; Type: INDEX; Schema: public; Owner: -
1895 --
1896
1897 CREATE INDEX current_relation_members_member_idx ON current_relation_members USING btree (member_type, member_id);
1898
1899
1900 --
1901 -- Name: current_relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1902 --
1903
1904 CREATE INDEX current_relations_timestamp_idx ON current_relations USING btree ("timestamp");
1905
1906
1907 --
1908 -- Name: current_way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -
1909 --
1910
1911 CREATE INDEX current_way_nodes_node_idx ON current_way_nodes USING btree (node_id);
1912
1913
1914 --
1915 -- Name: current_ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1916 --
1917
1918 CREATE INDEX current_ways_timestamp_idx ON current_ways USING btree ("timestamp");
1919
1920
1921 --
1922 -- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -
1923 --
1924
1925 CREATE INDEX diary_comment_user_id_created_at_index ON diary_comments USING btree (user_id, created_at);
1926
1927
1928 --
1929 -- Name: diary_comments_entry_id_idx; Type: INDEX; Schema: public; Owner: -
1930 --
1931
1932 CREATE UNIQUE INDEX diary_comments_entry_id_idx ON diary_comments USING btree (diary_entry_id, id);
1933
1934
1935 --
1936 -- Name: diary_entry_created_at_index; Type: INDEX; Schema: public; Owner: -
1937 --
1938
1939 CREATE INDEX diary_entry_created_at_index ON diary_entries USING btree (created_at);
1940
1941
1942 --
1943 -- Name: diary_entry_language_code_created_at_index; Type: INDEX; Schema: public; Owner: -
1944 --
1945
1946 CREATE INDEX diary_entry_language_code_created_at_index ON diary_entries USING btree (language_code, created_at);
1947
1948
1949 --
1950 -- Name: diary_entry_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -
1951 --
1952
1953 CREATE INDEX diary_entry_user_id_created_at_index ON diary_entries USING btree (user_id, created_at);
1954
1955
1956 --
1957 -- Name: friends_user_id_idx; Type: INDEX; Schema: public; Owner: -
1958 --
1959
1960 CREATE INDEX friends_user_id_idx ON friends USING btree (user_id);
1961
1962
1963 --
1964 -- Name: gpx_file_tags_gpxid_idx; Type: INDEX; Schema: public; Owner: -
1965 --
1966
1967 CREATE INDEX gpx_file_tags_gpxid_idx ON gpx_file_tags USING btree (gpx_id);
1968
1969
1970 --
1971 -- Name: gpx_file_tags_tag_idx; Type: INDEX; Schema: public; Owner: -
1972 --
1973
1974 CREATE INDEX gpx_file_tags_tag_idx ON gpx_file_tags USING btree (tag);
1975
1976
1977 --
1978 -- Name: gpx_files_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1979 --
1980
1981 CREATE INDEX gpx_files_timestamp_idx ON gpx_files USING btree ("timestamp");
1982
1983
1984 --
1985 -- Name: gpx_files_user_id_idx; Type: INDEX; Schema: public; Owner: -
1986 --
1987
1988 CREATE INDEX gpx_files_user_id_idx ON gpx_files USING btree (user_id);
1989
1990
1991 --
1992 -- Name: gpx_files_visible_visibility_idx; Type: INDEX; Schema: public; Owner: -
1993 --
1994
1995 CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility);
1996
1997
1998 --
1999 -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -
2000 --
2001
2002 CREATE INDEX index_changeset_comments_on_created_at ON changeset_comments USING btree (created_at);
2003
2004
2005 --
2006 -- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: -
2007 --
2008
2009 CREATE INDEX index_changesets_subscribers_on_changeset_id ON changesets_subscribers USING btree (changeset_id);
2010
2011
2012 --
2013 -- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: -
2014 --
2015
2016 CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_id ON changesets_subscribers USING btree (subscriber_id, changeset_id);
2017
2018
2019 --
2020 -- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: -
2021 --
2022
2023 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
2024
2025
2026 --
2027 -- Name: index_client_applications_on_user_id; Type: INDEX; Schema: public; Owner: -
2028 --
2029
2030 CREATE INDEX index_client_applications_on_user_id ON client_applications USING btree (user_id);
2031
2032
2033 --
2034 -- Name: index_diary_entry_subscriptions_on_diary_entry_id; Type: INDEX; Schema: public; Owner: -
2035 --
2036
2037 CREATE INDEX index_diary_entry_subscriptions_on_diary_entry_id ON diary_entry_subscriptions USING btree (diary_entry_id);
2038
2039
2040 --
2041 -- Name: index_issue_comments_on_issue_id; Type: INDEX; Schema: public; Owner: -
2042 --
2043
2044 CREATE INDEX index_issue_comments_on_issue_id ON issue_comments USING btree (issue_id);
2045
2046
2047 --
2048 -- Name: index_issue_comments_on_user_id; Type: INDEX; Schema: public; Owner: -
2049 --
2050
2051 CREATE INDEX index_issue_comments_on_user_id ON issue_comments USING btree (user_id);
2052
2053
2054 --
2055 -- Name: index_issues_on_assigned_role; Type: INDEX; Schema: public; Owner: -
2056 --
2057
2058 CREATE INDEX index_issues_on_assigned_role ON issues USING btree (assigned_role);
2059
2060
2061 --
2062 -- Name: index_issues_on_reportable_type_and_reportable_id; Type: INDEX; Schema: public; Owner: -
2063 --
2064
2065 CREATE INDEX index_issues_on_reportable_type_and_reportable_id ON issues USING btree (reportable_type, reportable_id);
2066
2067
2068 --
2069 -- Name: index_issues_on_reported_user_id; Type: INDEX; Schema: public; Owner: -
2070 --
2071
2072 CREATE INDEX index_issues_on_reported_user_id ON issues USING btree (reported_user_id);
2073
2074
2075 --
2076 -- Name: index_issues_on_status; Type: INDEX; Schema: public; Owner: -
2077 --
2078
2079 CREATE INDEX index_issues_on_status ON issues USING btree (status);
2080
2081
2082 --
2083 -- Name: index_issues_on_updated_by; Type: INDEX; Schema: public; Owner: -
2084 --
2085
2086 CREATE INDEX index_issues_on_updated_by ON issues USING btree (updated_by);
2087
2088
2089 --
2090 -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -
2091 --
2092
2093 CREATE INDEX index_note_comments_on_body ON note_comments USING gin (to_tsvector('english'::regconfig, body));
2094
2095
2096 --
2097 -- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: -
2098 --
2099
2100 CREATE INDEX index_note_comments_on_created_at ON note_comments USING btree (created_at);
2101
2102
2103 --
2104 -- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: -
2105 --
2106
2107 CREATE UNIQUE INDEX index_oauth_nonces_on_nonce_and_timestamp ON oauth_nonces USING btree (nonce, "timestamp");
2108
2109
2110 --
2111 -- Name: index_oauth_tokens_on_token; Type: INDEX; Schema: public; Owner: -
2112 --
2113
2114 CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token);
2115
2116
2117 --
2118 -- Name: index_oauth_tokens_on_user_id; Type: INDEX; Schema: public; Owner: -
2119 --
2120
2121 CREATE INDEX index_oauth_tokens_on_user_id ON oauth_tokens USING btree (user_id);
2122
2123
2124 --
2125 -- Name: index_reports_on_issue_id; Type: INDEX; Schema: public; Owner: -
2126 --
2127
2128 CREATE INDEX index_reports_on_issue_id ON reports USING btree (issue_id);
2129
2130
2131 --
2132 -- Name: index_reports_on_user_id; Type: INDEX; Schema: public; Owner: -
2133 --
2134
2135 CREATE INDEX index_reports_on_user_id ON reports USING btree (user_id);
2136
2137
2138 --
2139 -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -
2140 --
2141
2142 CREATE INDEX index_user_blocks_on_user_id ON user_blocks USING btree (user_id);
2143
2144
2145 --
2146 -- Name: messages_from_user_id_idx; Type: INDEX; Schema: public; Owner: -
2147 --
2148
2149 CREATE INDEX messages_from_user_id_idx ON messages USING btree (from_user_id);
2150
2151
2152 --
2153 -- Name: messages_to_user_id_idx; Type: INDEX; Schema: public; Owner: -
2154 --
2155
2156 CREATE INDEX messages_to_user_id_idx ON messages USING btree (to_user_id);
2157
2158
2159 --
2160 -- Name: nodes_changeset_id_idx; Type: INDEX; Schema: public; Owner: -
2161 --
2162
2163 CREATE INDEX nodes_changeset_id_idx ON nodes USING btree (changeset_id);
2164
2165
2166 --
2167 -- Name: nodes_tile_idx; Type: INDEX; Schema: public; Owner: -
2168 --
2169
2170 CREATE INDEX nodes_tile_idx ON nodes USING btree (tile);
2171
2172
2173 --
2174 -- Name: nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -
2175 --
2176
2177 CREATE INDEX nodes_timestamp_idx ON nodes USING btree ("timestamp");
2178
2179
2180 --
2181 -- Name: note_comments_note_id_idx; Type: INDEX; Schema: public; Owner: -
2182 --
2183
2184 CREATE INDEX note_comments_note_id_idx ON note_comments USING btree (note_id);
2185
2186
2187 --
2188 -- Name: notes_created_at_idx; Type: INDEX; Schema: public; Owner: -
2189 --
2190
2191 CREATE INDEX notes_created_at_idx ON notes USING btree (created_at);
2192
2193
2194 --
2195 -- Name: notes_tile_status_idx; Type: INDEX; Schema: public; Owner: -
2196 --
2197
2198 CREATE INDEX notes_tile_status_idx ON notes USING btree (tile, status);
2199
2200
2201 --
2202 -- Name: notes_updated_at_idx; Type: INDEX; Schema: public; Owner: -
2203 --
2204
2205 CREATE INDEX notes_updated_at_idx ON notes USING btree (updated_at);
2206
2207
2208 --
2209 -- Name: points_gpxid_idx; Type: INDEX; Schema: public; Owner: -
2210 --
2211
2212 CREATE INDEX points_gpxid_idx ON gps_points USING btree (gpx_id);
2213
2214
2215 --
2216 -- Name: points_tile_idx; Type: INDEX; Schema: public; Owner: -
2217 --
2218
2219 CREATE INDEX points_tile_idx ON gps_points USING btree (tile);
2220
2221
2222 --
2223 -- Name: relation_members_member_idx; Type: INDEX; Schema: public; Owner: -
2224 --
2225
2226 CREATE INDEX relation_members_member_idx ON relation_members USING btree (member_type, member_id);
2227
2228
2229 --
2230 -- Name: relations_changeset_id_idx; Type: INDEX; Schema: public; Owner: -
2231 --
2232
2233 CREATE INDEX relations_changeset_id_idx ON relations USING btree (changeset_id);
2234
2235
2236 --
2237 -- Name: relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -
2238 --
2239
2240 CREATE INDEX relations_timestamp_idx ON relations USING btree ("timestamp");
2241
2242
2243 --
2244 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
2245 --
2246
2247 CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
2248
2249
2250 --
2251 -- Name: user_id_idx; Type: INDEX; Schema: public; Owner: -
2252 --
2253
2254 CREATE INDEX user_id_idx ON friends USING btree (friend_user_id);
2255
2256
2257 --
2258 -- Name: user_roles_id_role_unique; Type: INDEX; Schema: public; Owner: -
2259 --
2260
2261 CREATE UNIQUE INDEX user_roles_id_role_unique ON user_roles USING btree (user_id, role);
2262
2263
2264 --
2265 -- Name: user_tokens_token_idx; Type: INDEX; Schema: public; Owner: -
2266 --
2267
2268 CREATE UNIQUE INDEX user_tokens_token_idx ON user_tokens USING btree (token);
2269
2270
2271 --
2272 -- Name: user_tokens_user_id_idx; Type: INDEX; Schema: public; Owner: -
2273 --
2274
2275 CREATE INDEX user_tokens_user_id_idx ON user_tokens USING btree (user_id);
2276
2277
2278 --
2279 -- Name: users_auth_idx; Type: INDEX; Schema: public; Owner: -
2280 --
2281
2282 CREATE UNIQUE INDEX users_auth_idx ON users USING btree (auth_provider, auth_uid);
2283
2284
2285 --
2286 -- Name: users_display_name_idx; Type: INDEX; Schema: public; Owner: -
2287 --
2288
2289 CREATE UNIQUE INDEX users_display_name_idx ON users USING btree (display_name);
2290
2291
2292 --
2293 -- Name: users_display_name_lower_idx; Type: INDEX; Schema: public; Owner: -
2294 --
2295
2296 CREATE INDEX users_display_name_lower_idx ON users USING btree (lower((display_name)::text));
2297
2298
2299 --
2300 -- Name: users_email_idx; Type: INDEX; Schema: public; Owner: -
2301 --
2302
2303 CREATE UNIQUE INDEX users_email_idx ON users USING btree (email);
2304
2305
2306 --
2307 -- Name: users_email_lower_idx; Type: INDEX; Schema: public; Owner: -
2308 --
2309
2310 CREATE INDEX users_email_lower_idx ON users USING btree (lower((email)::text));
2311
2312
2313 --
2314 -- Name: users_home_idx; Type: INDEX; Schema: public; Owner: -
2315 --
2316
2317 CREATE INDEX users_home_idx ON users USING btree (home_tile);
2318
2319
2320 --
2321 -- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -
2322 --
2323
2324 CREATE INDEX way_nodes_node_idx ON way_nodes USING btree (node_id);
2325
2326
2327 --
2328 -- Name: ways_changeset_id_idx; Type: INDEX; Schema: public; Owner: -
2329 --
2330
2331 CREATE INDEX ways_changeset_id_idx ON ways USING btree (changeset_id);
2332
2333
2334 --
2335 -- Name: ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -
2336 --
2337
2338 CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp");
2339
2340
2341 --
2342 -- Name: changeset_comments changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2343 --
2344
2345 ALTER TABLE ONLY changeset_comments
2346     ADD CONSTRAINT changeset_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2347
2348
2349 --
2350 -- Name: changeset_comments changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2351 --
2352
2353 ALTER TABLE ONLY changeset_comments
2354     ADD CONSTRAINT changeset_comments_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2355
2356
2357 --
2358 -- Name: changeset_tags changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2359 --
2360
2361 ALTER TABLE ONLY changeset_tags
2362     ADD CONSTRAINT changeset_tags_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2363
2364
2365 --
2366 -- Name: changesets_subscribers changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2367 --
2368
2369 ALTER TABLE ONLY changesets_subscribers
2370     ADD CONSTRAINT changesets_subscribers_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2371
2372
2373 --
2374 -- Name: changesets_subscribers changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2375 --
2376
2377 ALTER TABLE ONLY changesets_subscribers
2378     ADD CONSTRAINT changesets_subscribers_subscriber_id_fkey FOREIGN KEY (subscriber_id) REFERENCES users(id);
2379
2380
2381 --
2382 -- Name: changesets changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2383 --
2384
2385 ALTER TABLE ONLY changesets
2386     ADD CONSTRAINT changesets_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2387
2388
2389 --
2390 -- Name: client_applications client_applications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2391 --
2392
2393 ALTER TABLE ONLY client_applications
2394     ADD CONSTRAINT client_applications_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2395
2396
2397 --
2398 -- Name: current_node_tags current_node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2399 --
2400
2401 ALTER TABLE ONLY current_node_tags
2402     ADD CONSTRAINT current_node_tags_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2403
2404
2405 --
2406 -- Name: current_nodes current_nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2407 --
2408
2409 ALTER TABLE ONLY current_nodes
2410     ADD CONSTRAINT current_nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2411
2412
2413 --
2414 -- Name: current_relation_members current_relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2415 --
2416
2417 ALTER TABLE ONLY current_relation_members
2418     ADD CONSTRAINT current_relation_members_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2419
2420
2421 --
2422 -- Name: current_relation_tags current_relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2423 --
2424
2425 ALTER TABLE ONLY current_relation_tags
2426     ADD CONSTRAINT current_relation_tags_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2427
2428
2429 --
2430 -- Name: current_relations current_relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2431 --
2432
2433 ALTER TABLE ONLY current_relations
2434     ADD CONSTRAINT current_relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2435
2436
2437 --
2438 -- Name: current_way_nodes current_way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2439 --
2440
2441 ALTER TABLE ONLY current_way_nodes
2442     ADD CONSTRAINT current_way_nodes_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2443
2444
2445 --
2446 -- Name: current_way_nodes current_way_nodes_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2447 --
2448
2449 ALTER TABLE ONLY current_way_nodes
2450     ADD CONSTRAINT current_way_nodes_node_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2451
2452
2453 --
2454 -- Name: current_way_tags current_way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2455 --
2456
2457 ALTER TABLE ONLY current_way_tags
2458     ADD CONSTRAINT current_way_tags_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2459
2460
2461 --
2462 -- Name: current_ways current_ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2463 --
2464
2465 ALTER TABLE ONLY current_ways
2466     ADD CONSTRAINT current_ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2467
2468
2469 --
2470 -- Name: diary_comments diary_comments_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2471 --
2472
2473 ALTER TABLE ONLY diary_comments
2474     ADD CONSTRAINT diary_comments_diary_entry_id_fkey FOREIGN KEY (diary_entry_id) REFERENCES diary_entries(id);
2475
2476
2477 --
2478 -- Name: diary_comments diary_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2479 --
2480
2481 ALTER TABLE ONLY diary_comments
2482     ADD CONSTRAINT diary_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2483
2484
2485 --
2486 -- Name: diary_entries diary_entries_language_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2487 --
2488
2489 ALTER TABLE ONLY diary_entries
2490     ADD CONSTRAINT diary_entries_language_code_fkey FOREIGN KEY (language_code) REFERENCES languages(code);
2491
2492
2493 --
2494 -- Name: diary_entries diary_entries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2495 --
2496
2497 ALTER TABLE ONLY diary_entries
2498     ADD CONSTRAINT diary_entries_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2499
2500
2501 --
2502 -- Name: diary_entry_subscriptions diary_entry_subscriptions_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2503 --
2504
2505 ALTER TABLE ONLY diary_entry_subscriptions
2506     ADD CONSTRAINT diary_entry_subscriptions_diary_entry_id_fkey FOREIGN KEY (diary_entry_id) REFERENCES diary_entries(id);
2507
2508
2509 --
2510 -- Name: diary_entry_subscriptions diary_entry_subscriptions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2511 --
2512
2513 ALTER TABLE ONLY diary_entry_subscriptions
2514     ADD CONSTRAINT diary_entry_subscriptions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2515
2516
2517 --
2518 -- Name: friends friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2519 --
2520
2521 ALTER TABLE ONLY friends
2522     ADD CONSTRAINT friends_friend_user_id_fkey FOREIGN KEY (friend_user_id) REFERENCES users(id);
2523
2524
2525 --
2526 -- Name: friends friends_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2527 --
2528
2529 ALTER TABLE ONLY friends
2530     ADD CONSTRAINT friends_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2531
2532
2533 --
2534 -- Name: gps_points gps_points_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2535 --
2536
2537 ALTER TABLE ONLY gps_points
2538     ADD CONSTRAINT gps_points_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2539
2540
2541 --
2542 -- Name: gpx_file_tags gpx_file_tags_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2543 --
2544
2545 ALTER TABLE ONLY gpx_file_tags
2546     ADD CONSTRAINT gpx_file_tags_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2547
2548
2549 --
2550 -- Name: gpx_files gpx_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2551 --
2552
2553 ALTER TABLE ONLY gpx_files
2554     ADD CONSTRAINT gpx_files_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2555
2556
2557 --
2558 -- Name: issue_comments issue_comments_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2559 --
2560
2561 ALTER TABLE ONLY issue_comments
2562     ADD CONSTRAINT issue_comments_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id);
2563
2564
2565 --
2566 -- Name: issue_comments issue_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2567 --
2568
2569 ALTER TABLE ONLY issue_comments
2570     ADD CONSTRAINT issue_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2571
2572
2573 --
2574 -- Name: issues issues_reported_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2575 --
2576
2577 ALTER TABLE ONLY issues
2578     ADD CONSTRAINT issues_reported_user_id_fkey FOREIGN KEY (reported_user_id) REFERENCES users(id);
2579
2580
2581 --
2582 -- Name: issues issues_resolved_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2583 --
2584
2585 ALTER TABLE ONLY issues
2586     ADD CONSTRAINT issues_resolved_by_fkey FOREIGN KEY (resolved_by) REFERENCES users(id);
2587
2588
2589 --
2590 -- Name: issues issues_updated_by_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2591 --
2592
2593 ALTER TABLE ONLY issues
2594     ADD CONSTRAINT issues_updated_by_fkey FOREIGN KEY (updated_by) REFERENCES users(id);
2595
2596
2597 --
2598 -- Name: messages messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2599 --
2600
2601 ALTER TABLE ONLY messages
2602     ADD CONSTRAINT messages_from_user_id_fkey FOREIGN KEY (from_user_id) REFERENCES users(id);
2603
2604
2605 --
2606 -- Name: messages messages_to_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2607 --
2608
2609 ALTER TABLE ONLY messages
2610     ADD CONSTRAINT messages_to_user_id_fkey FOREIGN KEY (to_user_id) REFERENCES users(id);
2611
2612
2613 --
2614 -- Name: node_tags node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2615 --
2616
2617 ALTER TABLE ONLY node_tags
2618     ADD CONSTRAINT node_tags_id_fkey FOREIGN KEY (node_id, version) REFERENCES nodes(node_id, version);
2619
2620
2621 --
2622 -- Name: nodes nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2623 --
2624
2625 ALTER TABLE ONLY nodes
2626     ADD CONSTRAINT nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2627
2628
2629 --
2630 -- Name: nodes nodes_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2631 --
2632
2633 ALTER TABLE ONLY nodes
2634     ADD CONSTRAINT nodes_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2635
2636
2637 --
2638 -- Name: note_comments note_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2639 --
2640
2641 ALTER TABLE ONLY note_comments
2642     ADD CONSTRAINT note_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2643
2644
2645 --
2646 -- Name: note_comments note_comments_note_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2647 --
2648
2649 ALTER TABLE ONLY note_comments
2650     ADD CONSTRAINT note_comments_note_id_fkey FOREIGN KEY (note_id) REFERENCES notes(id);
2651
2652
2653 --
2654 -- Name: oauth_tokens oauth_tokens_client_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2655 --
2656
2657 ALTER TABLE ONLY oauth_tokens
2658     ADD CONSTRAINT oauth_tokens_client_application_id_fkey FOREIGN KEY (client_application_id) REFERENCES client_applications(id);
2659
2660
2661 --
2662 -- Name: oauth_tokens oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2663 --
2664
2665 ALTER TABLE ONLY oauth_tokens
2666     ADD CONSTRAINT oauth_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2667
2668
2669 --
2670 -- Name: redactions redactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2671 --
2672
2673 ALTER TABLE ONLY redactions
2674     ADD CONSTRAINT redactions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2675
2676
2677 --
2678 -- Name: relation_members relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2679 --
2680
2681 ALTER TABLE ONLY relation_members
2682     ADD CONSTRAINT relation_members_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2683
2684
2685 --
2686 -- Name: relation_tags relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2687 --
2688
2689 ALTER TABLE ONLY relation_tags
2690     ADD CONSTRAINT relation_tags_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2691
2692
2693 --
2694 -- Name: relations relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2695 --
2696
2697 ALTER TABLE ONLY relations
2698     ADD CONSTRAINT relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2699
2700
2701 --
2702 -- Name: relations relations_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2703 --
2704
2705 ALTER TABLE ONLY relations
2706     ADD CONSTRAINT relations_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2707
2708
2709 --
2710 -- Name: reports reports_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2711 --
2712
2713 ALTER TABLE ONLY reports
2714     ADD CONSTRAINT reports_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id);
2715
2716
2717 --
2718 -- Name: reports reports_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2719 --
2720
2721 ALTER TABLE ONLY reports
2722     ADD CONSTRAINT reports_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2723
2724
2725 --
2726 -- Name: user_blocks user_blocks_moderator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2727 --
2728
2729 ALTER TABLE ONLY user_blocks
2730     ADD CONSTRAINT user_blocks_moderator_id_fkey FOREIGN KEY (creator_id) REFERENCES users(id);
2731
2732
2733 --
2734 -- Name: user_blocks user_blocks_revoker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2735 --
2736
2737 ALTER TABLE ONLY user_blocks
2738     ADD CONSTRAINT user_blocks_revoker_id_fkey FOREIGN KEY (revoker_id) REFERENCES users(id);
2739
2740
2741 --
2742 -- Name: user_blocks user_blocks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2743 --
2744
2745 ALTER TABLE ONLY user_blocks
2746     ADD CONSTRAINT user_blocks_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2747
2748
2749 --
2750 -- Name: user_preferences user_preferences_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2751 --
2752
2753 ALTER TABLE ONLY user_preferences
2754     ADD CONSTRAINT user_preferences_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2755
2756
2757 --
2758 -- Name: user_roles user_roles_granter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2759 --
2760
2761 ALTER TABLE ONLY user_roles
2762     ADD CONSTRAINT user_roles_granter_id_fkey FOREIGN KEY (granter_id) REFERENCES users(id);
2763
2764
2765 --
2766 -- Name: user_roles user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2767 --
2768
2769 ALTER TABLE ONLY user_roles
2770     ADD CONSTRAINT user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2771
2772
2773 --
2774 -- Name: user_tokens user_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2775 --
2776
2777 ALTER TABLE ONLY user_tokens
2778     ADD CONSTRAINT user_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2779
2780
2781 --
2782 -- Name: way_nodes way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2783 --
2784
2785 ALTER TABLE ONLY way_nodes
2786     ADD CONSTRAINT way_nodes_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2787
2788
2789 --
2790 -- Name: way_tags way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2791 --
2792
2793 ALTER TABLE ONLY way_tags
2794     ADD CONSTRAINT way_tags_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2795
2796
2797 --
2798 -- Name: ways ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2799 --
2800
2801 ALTER TABLE ONLY ways
2802     ADD CONSTRAINT ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2803
2804
2805 --
2806 -- Name: ways ways_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2807 --
2808
2809 ALTER TABLE ONLY ways
2810     ADD CONSTRAINT ways_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2811
2812
2813 --
2814 -- PostgreSQL database dump complete
2815 --
2816
2817 SET search_path TO "$user", public;
2818
2819 INSERT INTO "schema_migrations" (version) VALUES
2820 ('1'),
2821 ('10'),
2822 ('11'),
2823 ('12'),
2824 ('13'),
2825 ('14'),
2826 ('15'),
2827 ('16'),
2828 ('17'),
2829 ('18'),
2830 ('19'),
2831 ('2'),
2832 ('20'),
2833 ('20100513171259'),
2834 ('20100516124737'),
2835 ('20100910084426'),
2836 ('20101114011429'),
2837 ('20110322001319'),
2838 ('20110508145337'),
2839 ('20110521142405'),
2840 ('20110925112722'),
2841 ('20111116184519'),
2842 ('20111212183945'),
2843 ('20120123184321'),
2844 ('20120208122334'),
2845 ('20120208194454'),
2846 ('20120214210114'),
2847 ('20120219161649'),
2848 ('20120318201948'),
2849 ('20120328090602'),
2850 ('20120404205604'),
2851 ('20120808231205'),
2852 ('20121005195010'),
2853 ('20121012044047'),
2854 ('20121119165817'),
2855 ('20121202155309'),
2856 ('20121203124841'),
2857 ('20130328184137'),
2858 ('20131212124700'),
2859 ('20140115192822'),
2860 ('20140117185510'),
2861 ('20140210003018'),
2862 ('20140507110937'),
2863 ('20140519141742'),
2864 ('20150110152606'),
2865 ('20150111192335'),
2866 ('20150222101847'),
2867 ('20150818224516'),
2868 ('20160822153055'),
2869 ('20161002153425'),
2870 ('20161011010929'),
2871 ('20170222134109'),
2872 ('20180204153242'),
2873 ('21'),
2874 ('22'),
2875 ('23'),
2876 ('24'),
2877 ('25'),
2878 ('26'),
2879 ('27'),
2880 ('28'),
2881 ('29'),
2882 ('3'),
2883 ('30'),
2884 ('31'),
2885 ('32'),
2886 ('33'),
2887 ('34'),
2888 ('35'),
2889 ('36'),
2890 ('37'),
2891 ('38'),
2892 ('39'),
2893 ('4'),
2894 ('40'),
2895 ('41'),
2896 ('42'),
2897 ('43'),
2898 ('44'),
2899 ('45'),
2900 ('46'),
2901 ('47'),
2902 ('48'),
2903 ('49'),
2904 ('5'),
2905 ('50'),
2906 ('51'),
2907 ('52'),
2908 ('53'),
2909 ('54'),
2910 ('55'),
2911 ('56'),
2912 ('57'),
2913 ('6'),
2914 ('7'),
2915 ('8'),
2916 ('9');