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