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