2 -- PostgreSQL database dump
5 -- Dumped from database version 9.5.3
6 -- Dumped by pg_dump version 9.5.3
8 SET statement_timeout = 0;
10 SET client_encoding = 'UTF8';
11 SET standard_conforming_strings = on;
12 SET check_function_bodies = false;
13 SET client_min_messages = warning;
14 SET row_security = off;
17 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
20 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
24 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
27 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
31 -- Name: btree_gist; Type: EXTENSION; Schema: -; Owner: -
34 CREATE EXTENSION IF NOT EXISTS btree_gist WITH SCHEMA public;
38 -- Name: EXTENSION btree_gist; Type: COMMENT; Schema: -; Owner: -
41 COMMENT ON EXTENSION btree_gist IS 'support for indexing common datatypes in GiST';
44 SET search_path = public, pg_catalog;
47 -- Name: format_enum; Type: TYPE; Schema: public; Owner: -
50 CREATE TYPE format_enum AS ENUM (
58 -- Name: gpx_visibility_enum; Type: TYPE; Schema: public; Owner: -
61 CREATE TYPE gpx_visibility_enum AS ENUM (
70 -- Name: note_event_enum; Type: TYPE; Schema: public; Owner: -
73 CREATE TYPE note_event_enum AS ENUM (
83 -- Name: note_status_enum; Type: TYPE; Schema: public; Owner: -
86 CREATE TYPE note_status_enum AS ENUM (
94 -- Name: nwr_enum; Type: TYPE; Schema: public; Owner: -
97 CREATE TYPE nwr_enum AS ENUM (
105 -- Name: user_role_enum; Type: TYPE; Schema: public; Owner: -
108 CREATE TYPE user_role_enum AS ENUM (
115 -- Name: user_status_enum; Type: TYPE; Schema: public; Owner: -
118 CREATE TYPE user_status_enum AS ENUM (
128 -- Name: maptile_for_point(bigint, bigint, integer); Type: FUNCTION; Schema: public; Owner: -
131 CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer
133 AS '$libdir/libpgosm', 'maptile_for_point';
137 -- Name: tile_for_point(integer, integer); Type: FUNCTION; Schema: public; Owner: -
140 CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint
142 AS '$libdir/libpgosm', 'tile_for_point';
146 -- Name: xid_to_int4(xid); Type: FUNCTION; Schema: public; Owner: -
149 CREATE FUNCTION xid_to_int4(xid) RETURNS integer
150 LANGUAGE c IMMUTABLE STRICT
151 AS '$libdir/libpgosm', 'xid_to_int4';
154 SET default_tablespace = '';
156 SET default_with_oids = false;
159 -- Name: acls; Type: TABLE; Schema: public; Owner: -
165 k character varying(255) NOT NULL,
166 v character varying(255),
167 domain character varying(255)
172 -- Name: acls_id_seq; Type: SEQUENCE; Schema: public; Owner: -
175 CREATE SEQUENCE acls_id_seq
184 -- Name: acls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
187 ALTER SEQUENCE acls_id_seq OWNED BY acls.id;
191 -- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -
194 CREATE TABLE changeset_comments (
196 changeset_id bigint NOT NULL,
197 author_id bigint NOT NULL,
199 created_at timestamp without time zone NOT NULL,
200 visible boolean NOT NULL
205 -- Name: changeset_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
208 CREATE SEQUENCE changeset_comments_id_seq
217 -- Name: changeset_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
220 ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
224 -- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -
227 CREATE TABLE changeset_tags (
228 changeset_id bigint NOT NULL,
229 k character varying(255) DEFAULT ''::character varying NOT NULL,
230 v character varying(255) DEFAULT ''::character varying NOT NULL
235 -- Name: changesets; Type: TABLE; Schema: public; Owner: -
238 CREATE TABLE changesets (
240 user_id bigint NOT NULL,
241 created_at timestamp without time zone NOT NULL,
246 closed_at timestamp without time zone NOT NULL,
247 num_changes integer DEFAULT 0 NOT NULL
252 -- Name: changesets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
255 CREATE SEQUENCE changesets_id_seq
264 -- Name: changesets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
267 ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id;
271 -- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -
274 CREATE TABLE changesets_subscribers (
275 subscriber_id bigint NOT NULL,
276 changeset_id bigint NOT NULL
281 -- Name: client_applications; Type: TABLE; Schema: public; Owner: -
284 CREATE TABLE client_applications (
286 name character varying(255),
287 url character varying(255),
288 support_url character varying(255),
289 callback_url character varying(255),
290 key character varying(50),
291 secret character varying(50),
293 created_at timestamp without time zone,
294 updated_at timestamp without time zone,
295 allow_read_prefs boolean DEFAULT false NOT NULL,
296 allow_write_prefs boolean DEFAULT false NOT NULL,
297 allow_write_diary boolean DEFAULT false NOT NULL,
298 allow_write_api boolean DEFAULT false NOT NULL,
299 allow_read_gpx boolean DEFAULT false NOT NULL,
300 allow_write_gpx boolean DEFAULT false NOT NULL,
301 allow_write_notes boolean DEFAULT false NOT NULL
306 -- Name: client_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
309 CREATE SEQUENCE client_applications_id_seq
318 -- Name: client_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
321 ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id;
325 -- Name: current_node_tags; Type: TABLE; Schema: public; Owner: -
328 CREATE TABLE current_node_tags (
329 node_id bigint NOT NULL,
330 k character varying(255) DEFAULT ''::character varying NOT NULL,
331 v character varying(255) DEFAULT ''::character varying NOT NULL
336 -- Name: current_nodes; Type: TABLE; Schema: public; Owner: -
339 CREATE TABLE current_nodes (
341 latitude integer NOT NULL,
342 longitude integer NOT NULL,
343 changeset_id bigint NOT NULL,
344 visible boolean NOT NULL,
345 "timestamp" timestamp without time zone NOT NULL,
346 tile bigint NOT NULL,
347 version bigint NOT NULL
352 -- Name: current_nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
355 CREATE SEQUENCE current_nodes_id_seq
364 -- Name: current_nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
367 ALTER SEQUENCE current_nodes_id_seq OWNED BY current_nodes.id;
371 -- Name: current_relation_members; Type: TABLE; Schema: public; Owner: -
374 CREATE TABLE current_relation_members (
375 relation_id bigint NOT NULL,
376 member_type nwr_enum NOT NULL,
377 member_id bigint NOT NULL,
378 member_role character varying(255) NOT NULL,
379 sequence_id integer DEFAULT 0 NOT NULL
384 -- Name: current_relation_tags; Type: TABLE; Schema: public; Owner: -
387 CREATE TABLE current_relation_tags (
388 relation_id bigint NOT NULL,
389 k character varying(255) DEFAULT ''::character varying NOT NULL,
390 v character varying(255) DEFAULT ''::character varying NOT NULL
395 -- Name: current_relations; Type: TABLE; Schema: public; Owner: -
398 CREATE TABLE current_relations (
400 changeset_id bigint NOT NULL,
401 "timestamp" timestamp without time zone NOT NULL,
402 visible boolean NOT NULL,
403 version bigint NOT NULL
408 -- Name: current_relations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
411 CREATE SEQUENCE current_relations_id_seq
420 -- Name: current_relations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
423 ALTER SEQUENCE current_relations_id_seq OWNED BY current_relations.id;
427 -- Name: current_way_nodes; Type: TABLE; Schema: public; Owner: -
430 CREATE TABLE current_way_nodes (
431 way_id bigint NOT NULL,
432 node_id bigint NOT NULL,
433 sequence_id bigint NOT NULL
438 -- Name: current_way_tags; Type: TABLE; Schema: public; Owner: -
441 CREATE TABLE current_way_tags (
442 way_id bigint NOT NULL,
443 k character varying(255) DEFAULT ''::character varying NOT NULL,
444 v character varying(255) DEFAULT ''::character varying NOT NULL
449 -- Name: current_ways; Type: TABLE; Schema: public; Owner: -
452 CREATE TABLE current_ways (
454 changeset_id bigint NOT NULL,
455 "timestamp" timestamp without time zone NOT NULL,
456 visible boolean NOT NULL,
457 version bigint NOT NULL
462 -- Name: current_ways_id_seq; Type: SEQUENCE; Schema: public; Owner: -
465 CREATE SEQUENCE current_ways_id_seq
474 -- Name: current_ways_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
477 ALTER SEQUENCE current_ways_id_seq OWNED BY current_ways.id;
481 -- Name: diary_comments; Type: TABLE; Schema: public; Owner: -
484 CREATE TABLE diary_comments (
486 diary_entry_id bigint NOT NULL,
487 user_id bigint NOT NULL,
489 created_at timestamp without time zone NOT NULL,
490 updated_at timestamp without time zone NOT NULL,
491 visible boolean DEFAULT true NOT NULL,
492 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
497 -- Name: diary_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
500 CREATE SEQUENCE diary_comments_id_seq
509 -- Name: diary_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
512 ALTER SEQUENCE diary_comments_id_seq OWNED BY diary_comments.id;
516 -- Name: diary_entries; Type: TABLE; Schema: public; Owner: -
519 CREATE TABLE diary_entries (
521 user_id bigint NOT NULL,
522 title character varying(255) NOT NULL,
524 created_at timestamp without time zone NOT NULL,
525 updated_at timestamp without time zone NOT NULL,
526 latitude double precision,
527 longitude double precision,
528 language_code character varying(255) DEFAULT 'en'::character varying NOT NULL,
529 visible boolean DEFAULT true NOT NULL,
530 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
535 -- Name: diary_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
538 CREATE SEQUENCE diary_entries_id_seq
547 -- Name: diary_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
550 ALTER SEQUENCE diary_entries_id_seq OWNED BY diary_entries.id;
554 -- Name: friends; Type: TABLE; Schema: public; Owner: -
557 CREATE TABLE friends (
559 user_id bigint NOT NULL,
560 friend_user_id bigint NOT NULL
565 -- Name: friends_id_seq; Type: SEQUENCE; Schema: public; Owner: -
568 CREATE SEQUENCE friends_id_seq
577 -- Name: friends_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
580 ALTER SEQUENCE friends_id_seq OWNED BY friends.id;
584 -- Name: gps_points; Type: TABLE; Schema: public; Owner: -
587 CREATE TABLE gps_points (
588 altitude double precision,
589 trackid integer NOT NULL,
590 latitude integer NOT NULL,
591 longitude integer NOT NULL,
592 gpx_id bigint NOT NULL,
593 "timestamp" timestamp without time zone,
599 -- Name: gpx_file_tags; Type: TABLE; Schema: public; Owner: -
602 CREATE TABLE gpx_file_tags (
603 gpx_id bigint DEFAULT 0 NOT NULL,
604 tag character varying(255) NOT NULL,
610 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
613 CREATE SEQUENCE gpx_file_tags_id_seq
622 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
625 ALTER SEQUENCE gpx_file_tags_id_seq OWNED BY gpx_file_tags.id;
629 -- Name: gpx_files; Type: TABLE; Schema: public; Owner: -
632 CREATE TABLE gpx_files (
634 user_id bigint NOT NULL,
635 visible boolean DEFAULT true NOT NULL,
636 name character varying(255) DEFAULT ''::character varying NOT NULL,
638 latitude double precision,
639 longitude double precision,
640 "timestamp" timestamp without time zone NOT NULL,
641 description character varying(255) DEFAULT ''::character varying NOT NULL,
642 inserted boolean NOT NULL,
643 visibility gpx_visibility_enum DEFAULT 'public'::gpx_visibility_enum NOT NULL
648 -- Name: gpx_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
651 CREATE SEQUENCE gpx_files_id_seq
660 -- Name: gpx_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
663 ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
667 -- Name: issue_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
670 CREATE TABLE issue_comments (
673 commenter_user_id integer,
675 created_at timestamp without time zone NOT NULL,
676 updated_at timestamp without time zone NOT NULL
681 -- Name: issue_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
684 CREATE SEQUENCE issue_comments_id_seq
693 -- Name: issue_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
696 ALTER SEQUENCE issue_comments_id_seq OWNED BY issue_comments.id;
700 -- Name: issues; Type: TABLE; Schema: public; Owner: -; Tablespace:
703 CREATE TABLE issues (
705 reportable_type character varying NOT NULL,
706 reportable_id integer NOT NULL,
707 reported_user_id integer NOT NULL,
709 resolved_at timestamp without time zone,
711 created_at timestamp without time zone NOT NULL,
712 updated_at timestamp without time zone NOT NULL
717 -- Name: issues_id_seq; Type: SEQUENCE; Schema: public; Owner: -
720 CREATE SEQUENCE issues_id_seq
729 -- Name: issues_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
732 ALTER SEQUENCE issues_id_seq OWNED BY issues.id;
736 -- Name: languages; Type: TABLE; Schema: public; Owner: -
739 CREATE TABLE languages (
740 code character varying(255) NOT NULL,
741 english_name character varying(255) NOT NULL,
742 native_name character varying(255)
747 -- Name: messages; Type: TABLE; Schema: public; Owner: -
750 CREATE TABLE messages (
752 from_user_id bigint NOT NULL,
753 title character varying(255) NOT NULL,
755 sent_on timestamp without time zone NOT NULL,
756 message_read boolean DEFAULT false NOT NULL,
757 to_user_id bigint NOT NULL,
758 to_user_visible boolean DEFAULT true NOT NULL,
759 from_user_visible boolean DEFAULT true NOT NULL,
760 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
765 -- Name: messages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
768 CREATE SEQUENCE messages_id_seq
777 -- Name: messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
780 ALTER SEQUENCE messages_id_seq OWNED BY messages.id;
784 -- Name: node_tags; Type: TABLE; Schema: public; Owner: -
787 CREATE TABLE node_tags (
788 node_id bigint NOT NULL,
789 version bigint NOT NULL,
790 k character varying(255) DEFAULT ''::character varying NOT NULL,
791 v character varying(255) DEFAULT ''::character varying NOT NULL
796 -- Name: nodes; Type: TABLE; Schema: public; Owner: -
800 node_id bigint NOT NULL,
801 latitude integer NOT NULL,
802 longitude integer NOT NULL,
803 changeset_id bigint NOT NULL,
804 visible boolean NOT NULL,
805 "timestamp" timestamp without time zone NOT NULL,
806 tile bigint NOT NULL,
807 version bigint NOT NULL,
813 -- Name: note_comments; Type: TABLE; Schema: public; Owner: -
816 CREATE TABLE note_comments (
818 note_id bigint NOT NULL,
819 visible boolean NOT NULL,
820 created_at timestamp without time zone NOT NULL,
824 event note_event_enum
829 -- Name: note_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
832 CREATE SEQUENCE note_comments_id_seq
841 -- Name: note_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
844 ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id;
848 -- Name: notes; Type: TABLE; Schema: public; Owner: -
853 latitude integer NOT NULL,
854 longitude integer NOT NULL,
855 tile bigint NOT NULL,
856 updated_at timestamp without time zone NOT NULL,
857 created_at timestamp without time zone NOT NULL,
858 status note_status_enum NOT NULL,
859 closed_at timestamp without time zone
864 -- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
867 CREATE SEQUENCE notes_id_seq
876 -- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
879 ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
883 -- Name: oauth_nonces; Type: TABLE; Schema: public; Owner: -
886 CREATE TABLE oauth_nonces (
888 nonce character varying(255),
890 created_at timestamp without time zone,
891 updated_at timestamp without time zone
896 -- Name: oauth_nonces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
899 CREATE SEQUENCE oauth_nonces_id_seq
908 -- Name: oauth_nonces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
911 ALTER SEQUENCE oauth_nonces_id_seq OWNED BY oauth_nonces.id;
915 -- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: -
918 CREATE TABLE oauth_tokens (
921 type character varying(20),
922 client_application_id integer,
923 token character varying(50),
924 secret character varying(50),
925 authorized_at timestamp without time zone,
926 invalidated_at timestamp without time zone,
927 created_at timestamp without time zone,
928 updated_at timestamp without time zone,
929 allow_read_prefs boolean DEFAULT false NOT NULL,
930 allow_write_prefs boolean DEFAULT false NOT NULL,
931 allow_write_diary boolean DEFAULT false NOT NULL,
932 allow_write_api boolean DEFAULT false NOT NULL,
933 allow_read_gpx boolean DEFAULT false NOT NULL,
934 allow_write_gpx boolean DEFAULT false NOT NULL,
935 callback_url character varying(255),
936 verifier character varying(20),
937 scope character varying(255),
938 valid_to timestamp without time zone,
939 allow_write_notes boolean DEFAULT false NOT NULL
944 -- Name: oauth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
947 CREATE SEQUENCE oauth_tokens_id_seq
956 -- Name: oauth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
959 ALTER SEQUENCE oauth_tokens_id_seq OWNED BY oauth_tokens.id;
963 -- Name: redactions; Type: TABLE; Schema: public; Owner: -
966 CREATE TABLE redactions (
968 title character varying(255),
970 created_at timestamp without time zone NOT NULL,
971 updated_at timestamp without time zone NOT NULL,
972 user_id bigint NOT NULL,
973 description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
978 -- Name: redactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
981 CREATE SEQUENCE redactions_id_seq
990 -- Name: redactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
993 ALTER SEQUENCE redactions_id_seq OWNED BY redactions.id;
997 -- Name: relation_members; Type: TABLE; Schema: public; Owner: -
1000 CREATE TABLE relation_members (
1001 relation_id bigint DEFAULT 0 NOT NULL,
1002 member_type nwr_enum NOT NULL,
1003 member_id bigint NOT NULL,
1004 member_role character varying(255) NOT NULL,
1005 version bigint DEFAULT 0 NOT NULL,
1006 sequence_id integer DEFAULT 0 NOT NULL
1011 -- Name: relation_tags; Type: TABLE; Schema: public; Owner: -
1014 CREATE TABLE relation_tags (
1015 relation_id bigint DEFAULT 0 NOT NULL,
1016 k character varying(255) DEFAULT ''::character varying NOT NULL,
1017 v character varying(255) DEFAULT ''::character varying NOT NULL,
1018 version bigint NOT NULL
1023 -- Name: relations; Type: TABLE; Schema: public; Owner: -
1026 CREATE TABLE relations (
1027 relation_id bigint DEFAULT 0 NOT NULL,
1028 changeset_id bigint NOT NULL,
1029 "timestamp" timestamp without time zone NOT NULL,
1030 version bigint NOT NULL,
1031 visible boolean DEFAULT true NOT NULL,
1032 redaction_id integer
1037 -- Name: reports; Type: TABLE; Schema: public; Owner: -; Tablespace:
1040 CREATE TABLE reports (
1041 id integer NOT NULL,
1043 reporter_user_id integer,
1045 created_at timestamp without time zone NOT NULL,
1046 updated_at timestamp without time zone NOT NULL
1051 -- Name: reports_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1054 CREATE SEQUENCE reports_id_seq
1063 -- Name: reports_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1066 ALTER SEQUENCE reports_id_seq OWNED BY reports.id;
1070 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -
1073 CREATE TABLE schema_migrations (
1074 version character varying(255) NOT NULL
1079 -- Name: user_blocks; Type: TABLE; Schema: public; Owner: -
1082 CREATE TABLE user_blocks (
1083 id integer NOT NULL,
1084 user_id bigint NOT NULL,
1085 creator_id bigint NOT NULL,
1086 reason text NOT NULL,
1087 ends_at timestamp without time zone NOT NULL,
1088 needs_view boolean DEFAULT false NOT NULL,
1090 created_at timestamp without time zone,
1091 updated_at timestamp without time zone,
1092 reason_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
1097 -- Name: user_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1100 CREATE SEQUENCE user_blocks_id_seq
1109 -- Name: user_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1112 ALTER SEQUENCE user_blocks_id_seq OWNED BY user_blocks.id;
1116 -- Name: user_preferences; Type: TABLE; Schema: public; Owner: -
1119 CREATE TABLE user_preferences (
1120 user_id bigint NOT NULL,
1121 k character varying(255) NOT NULL,
1122 v character varying(255) NOT NULL
1127 -- Name: user_roles; Type: TABLE; Schema: public; Owner: -
1130 CREATE TABLE user_roles (
1131 id integer NOT NULL,
1132 user_id bigint NOT NULL,
1133 created_at timestamp without time zone,
1134 updated_at timestamp without time zone,
1135 role user_role_enum NOT NULL,
1136 granter_id bigint NOT NULL
1141 -- Name: user_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1144 CREATE SEQUENCE user_roles_id_seq
1153 -- Name: user_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1156 ALTER SEQUENCE user_roles_id_seq OWNED BY user_roles.id;
1160 -- Name: user_tokens; Type: TABLE; Schema: public; Owner: -
1163 CREATE TABLE user_tokens (
1165 user_id bigint NOT NULL,
1166 token character varying(255) NOT NULL,
1167 expiry timestamp without time zone NOT NULL,
1173 -- Name: user_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1176 CREATE SEQUENCE user_tokens_id_seq
1185 -- Name: user_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1188 ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id;
1192 -- Name: users; Type: TABLE; Schema: public; Owner: -
1195 CREATE TABLE users (
1196 email character varying(255) NOT NULL,
1198 pass_crypt character varying(255) NOT NULL,
1199 creation_time timestamp without time zone NOT NULL,
1200 display_name character varying(255) DEFAULT ''::character varying NOT NULL,
1201 data_public boolean DEFAULT false NOT NULL,
1202 description text DEFAULT ''::text NOT NULL,
1203 home_lat double precision,
1204 home_lon double precision,
1205 home_zoom smallint DEFAULT 3,
1206 nearby integer DEFAULT 50,
1207 pass_salt character varying(255),
1208 image_file_name text,
1209 email_valid boolean DEFAULT false NOT NULL,
1210 new_email character varying(255),
1211 creation_ip character varying(255),
1212 languages character varying(255),
1213 status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
1214 terms_agreed timestamp without time zone,
1215 consider_pd boolean DEFAULT false NOT NULL,
1216 preferred_editor character varying(255),
1217 terms_seen boolean DEFAULT false NOT NULL,
1218 auth_uid character varying(255),
1219 description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL,
1220 image_fingerprint character varying(255),
1221 changesets_count integer DEFAULT 0 NOT NULL,
1222 traces_count integer DEFAULT 0 NOT NULL,
1223 diary_entries_count integer DEFAULT 0 NOT NULL,
1224 image_use_gravatar boolean DEFAULT false NOT NULL,
1225 image_content_type character varying(255),
1226 auth_provider character varying
1231 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1234 CREATE SEQUENCE users_id_seq
1243 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1246 ALTER SEQUENCE users_id_seq OWNED BY users.id;
1250 -- Name: way_nodes; Type: TABLE; Schema: public; Owner: -
1253 CREATE TABLE way_nodes (
1254 way_id bigint NOT NULL,
1255 node_id bigint NOT NULL,
1256 version bigint NOT NULL,
1257 sequence_id bigint NOT NULL
1262 -- Name: way_tags; Type: TABLE; Schema: public; Owner: -
1265 CREATE TABLE way_tags (
1266 way_id bigint DEFAULT 0 NOT NULL,
1267 k character varying(255) NOT NULL,
1268 v character varying(255) NOT NULL,
1269 version bigint NOT NULL
1274 -- Name: ways; Type: TABLE; Schema: public; Owner: -
1278 way_id bigint DEFAULT 0 NOT NULL,
1279 changeset_id bigint NOT NULL,
1280 "timestamp" timestamp without time zone NOT NULL,
1281 version bigint NOT NULL,
1282 visible boolean DEFAULT true NOT NULL,
1283 redaction_id integer
1288 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1291 ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass);
1295 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1298 ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass);
1302 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1305 ALTER TABLE ONLY changesets ALTER COLUMN id SET DEFAULT nextval('changesets_id_seq'::regclass);
1309 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1312 ALTER TABLE ONLY client_applications ALTER COLUMN id SET DEFAULT nextval('client_applications_id_seq'::regclass);
1316 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1319 ALTER TABLE ONLY current_nodes ALTER COLUMN id SET DEFAULT nextval('current_nodes_id_seq'::regclass);
1323 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1326 ALTER TABLE ONLY current_relations ALTER COLUMN id SET DEFAULT nextval('current_relations_id_seq'::regclass);
1330 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1333 ALTER TABLE ONLY current_ways ALTER COLUMN id SET DEFAULT nextval('current_ways_id_seq'::regclass);
1337 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1340 ALTER TABLE ONLY diary_comments ALTER COLUMN id SET DEFAULT nextval('diary_comments_id_seq'::regclass);
1344 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1347 ALTER TABLE ONLY diary_entries ALTER COLUMN id SET DEFAULT nextval('diary_entries_id_seq'::regclass);
1351 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1354 ALTER TABLE ONLY friends ALTER COLUMN id SET DEFAULT nextval('friends_id_seq'::regclass);
1358 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1361 ALTER TABLE ONLY gpx_file_tags ALTER COLUMN id SET DEFAULT nextval('gpx_file_tags_id_seq'::regclass);
1365 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1368 ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq'::regclass);
1372 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1375 ALTER TABLE ONLY issue_comments ALTER COLUMN id SET DEFAULT nextval('issue_comments_id_seq'::regclass);
1379 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1382 ALTER TABLE ONLY issues ALTER COLUMN id SET DEFAULT nextval('issues_id_seq'::regclass);
1386 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1389 ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass);
1393 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1396 ALTER TABLE ONLY note_comments ALTER COLUMN id SET DEFAULT nextval('note_comments_id_seq'::regclass);
1400 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1403 ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
1407 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1410 ALTER TABLE ONLY oauth_nonces ALTER COLUMN id SET DEFAULT nextval('oauth_nonces_id_seq'::regclass);
1414 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1417 ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_id_seq'::regclass);
1421 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1424 ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_seq'::regclass);
1428 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1431 ALTER TABLE ONLY reports ALTER COLUMN id SET DEFAULT nextval('reports_id_seq'::regclass);
1435 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1438 ALTER TABLE ONLY user_blocks ALTER COLUMN id SET DEFAULT nextval('user_blocks_id_seq'::regclass);
1442 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1445 ALTER TABLE ONLY user_roles ALTER COLUMN id SET DEFAULT nextval('user_roles_id_seq'::regclass);
1449 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1452 ALTER TABLE ONLY user_tokens ALTER COLUMN id SET DEFAULT nextval('user_tokens_id_seq'::regclass);
1456 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1459 ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1463 -- Name: acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1466 ALTER TABLE ONLY acls
1467 ADD CONSTRAINT acls_pkey PRIMARY KEY (id);
1471 -- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1474 ALTER TABLE ONLY changeset_comments
1475 ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id);
1479 -- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1482 ALTER TABLE ONLY changesets
1483 ADD CONSTRAINT changesets_pkey PRIMARY KEY (id);
1487 -- Name: client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1490 ALTER TABLE ONLY client_applications
1491 ADD CONSTRAINT client_applications_pkey PRIMARY KEY (id);
1495 -- Name: current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1498 ALTER TABLE ONLY current_node_tags
1499 ADD CONSTRAINT current_node_tags_pkey PRIMARY KEY (node_id, k);
1503 -- Name: current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -
1506 ALTER TABLE ONLY current_nodes
1507 ADD CONSTRAINT current_nodes_pkey1 PRIMARY KEY (id);
1511 -- Name: current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1514 ALTER TABLE ONLY current_relation_members
1515 ADD CONSTRAINT current_relation_members_pkey PRIMARY KEY (relation_id, member_type, member_id, member_role, sequence_id);
1519 -- Name: current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1522 ALTER TABLE ONLY current_relation_tags
1523 ADD CONSTRAINT current_relation_tags_pkey PRIMARY KEY (relation_id, k);
1527 -- Name: current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1530 ALTER TABLE ONLY current_relations
1531 ADD CONSTRAINT current_relations_pkey PRIMARY KEY (id);
1535 -- Name: current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1538 ALTER TABLE ONLY current_way_nodes
1539 ADD CONSTRAINT current_way_nodes_pkey PRIMARY KEY (way_id, sequence_id);
1543 -- Name: current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1546 ALTER TABLE ONLY current_way_tags
1547 ADD CONSTRAINT current_way_tags_pkey PRIMARY KEY (way_id, k);
1551 -- Name: current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1554 ALTER TABLE ONLY current_ways
1555 ADD CONSTRAINT current_ways_pkey PRIMARY KEY (id);
1559 -- Name: diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1562 ALTER TABLE ONLY diary_comments
1563 ADD CONSTRAINT diary_comments_pkey PRIMARY KEY (id);
1567 -- Name: diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1570 ALTER TABLE ONLY diary_entries
1571 ADD CONSTRAINT diary_entries_pkey PRIMARY KEY (id);
1575 -- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1578 ALTER TABLE ONLY friends
1579 ADD CONSTRAINT friends_pkey PRIMARY KEY (id);
1583 -- Name: gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1586 ALTER TABLE ONLY gpx_file_tags
1587 ADD CONSTRAINT gpx_file_tags_pkey PRIMARY KEY (id);
1591 -- Name: gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1594 ALTER TABLE ONLY gpx_files
1595 ADD CONSTRAINT gpx_files_pkey PRIMARY KEY (id);
1599 -- Name: issue_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1602 ALTER TABLE ONLY issue_comments
1603 ADD CONSTRAINT issue_comments_pkey PRIMARY KEY (id);
1607 -- Name: issues_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1610 ALTER TABLE ONLY issues
1611 ADD CONSTRAINT issues_pkey PRIMARY KEY (id);
1615 -- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1618 ALTER TABLE ONLY languages
1619 ADD CONSTRAINT languages_pkey PRIMARY KEY (code);
1623 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1626 ALTER TABLE ONLY messages
1627 ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
1631 -- Name: node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1634 ALTER TABLE ONLY node_tags
1635 ADD CONSTRAINT node_tags_pkey PRIMARY KEY (node_id, version, k);
1639 -- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1642 ALTER TABLE ONLY nodes
1643 ADD CONSTRAINT nodes_pkey PRIMARY KEY (node_id, version);
1647 -- Name: note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1650 ALTER TABLE ONLY note_comments
1651 ADD CONSTRAINT note_comments_pkey PRIMARY KEY (id);
1655 -- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1658 ALTER TABLE ONLY notes
1659 ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
1663 -- Name: oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1666 ALTER TABLE ONLY oauth_nonces
1667 ADD CONSTRAINT oauth_nonces_pkey PRIMARY KEY (id);
1671 -- Name: oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1674 ALTER TABLE ONLY oauth_tokens
1675 ADD CONSTRAINT oauth_tokens_pkey PRIMARY KEY (id);
1679 -- Name: redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1682 ALTER TABLE ONLY redactions
1683 ADD CONSTRAINT redactions_pkey PRIMARY KEY (id);
1687 -- Name: relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1690 ALTER TABLE ONLY relation_members
1691 ADD CONSTRAINT relation_members_pkey PRIMARY KEY (relation_id, version, member_type, member_id, member_role, sequence_id);
1695 -- Name: relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1698 ALTER TABLE ONLY relation_tags
1699 ADD CONSTRAINT relation_tags_pkey PRIMARY KEY (relation_id, version, k);
1703 -- Name: relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1706 ALTER TABLE ONLY relations
1707 ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
1711 -- Name: reports_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1714 ALTER TABLE ONLY reports
1715 ADD CONSTRAINT reports_pkey PRIMARY KEY (id);
1719 -- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1722 ALTER TABLE ONLY user_blocks
1723 ADD CONSTRAINT user_blocks_pkey PRIMARY KEY (id);
1727 -- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1730 ALTER TABLE ONLY user_preferences
1731 ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (user_id, k);
1735 -- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1738 ALTER TABLE ONLY user_roles
1739 ADD CONSTRAINT user_roles_pkey PRIMARY KEY (id);
1743 -- Name: user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1746 ALTER TABLE ONLY user_tokens
1747 ADD CONSTRAINT user_tokens_pkey PRIMARY KEY (id);
1751 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1754 ALTER TABLE ONLY users
1755 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1759 -- Name: way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1762 ALTER TABLE ONLY way_nodes
1763 ADD CONSTRAINT way_nodes_pkey PRIMARY KEY (way_id, version, sequence_id);
1767 -- Name: way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1770 ALTER TABLE ONLY way_tags
1771 ADD CONSTRAINT way_tags_pkey PRIMARY KEY (way_id, version, k);
1775 -- Name: ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -
1778 ALTER TABLE ONLY ways
1779 ADD CONSTRAINT ways_pkey PRIMARY KEY (way_id, version);
1783 -- Name: acls_k_idx; Type: INDEX; Schema: public; Owner: -
1786 CREATE INDEX acls_k_idx ON acls USING btree (k);
1790 -- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: -
1793 CREATE INDEX changeset_tags_id_idx ON changeset_tags USING btree (changeset_id);
1797 -- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: -
1800 CREATE INDEX changesets_bbox_idx ON changesets USING gist (min_lat, max_lat, min_lon, max_lon);
1804 -- Name: changesets_closed_at_idx; Type: INDEX; Schema: public; Owner: -
1807 CREATE INDEX changesets_closed_at_idx ON changesets USING btree (closed_at);
1811 -- Name: changesets_created_at_idx; Type: INDEX; Schema: public; Owner: -
1814 CREATE INDEX changesets_created_at_idx ON changesets USING btree (created_at);
1818 -- Name: changesets_user_id_created_at_idx; Type: INDEX; Schema: public; Owner: -
1821 CREATE INDEX changesets_user_id_created_at_idx ON changesets USING btree (user_id, created_at);
1825 -- Name: changesets_user_id_id_idx; Type: INDEX; Schema: public; Owner: -
1828 CREATE INDEX changesets_user_id_id_idx ON changesets USING btree (user_id, id);
1832 -- Name: current_nodes_tile_idx; Type: INDEX; Schema: public; Owner: -
1835 CREATE INDEX current_nodes_tile_idx ON current_nodes USING btree (tile);
1839 -- Name: current_nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1842 CREATE INDEX current_nodes_timestamp_idx ON current_nodes USING btree ("timestamp");
1846 -- Name: current_relation_members_member_idx; Type: INDEX; Schema: public; Owner: -
1849 CREATE INDEX current_relation_members_member_idx ON current_relation_members USING btree (member_type, member_id);
1853 -- Name: current_relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1856 CREATE INDEX current_relations_timestamp_idx ON current_relations USING btree ("timestamp");
1860 -- Name: current_way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -
1863 CREATE INDEX current_way_nodes_node_idx ON current_way_nodes USING btree (node_id);
1867 -- Name: current_ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1870 CREATE INDEX current_ways_timestamp_idx ON current_ways USING btree ("timestamp");
1874 -- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -
1877 CREATE INDEX diary_comment_user_id_created_at_index ON diary_comments USING btree (user_id, created_at);
1881 -- Name: diary_comments_entry_id_idx; Type: INDEX; Schema: public; Owner: -
1884 CREATE UNIQUE INDEX diary_comments_entry_id_idx ON diary_comments USING btree (diary_entry_id, id);
1888 -- Name: diary_entry_created_at_index; Type: INDEX; Schema: public; Owner: -
1891 CREATE INDEX diary_entry_created_at_index ON diary_entries USING btree (created_at);
1895 -- Name: diary_entry_language_code_created_at_index; Type: INDEX; Schema: public; Owner: -
1898 CREATE INDEX diary_entry_language_code_created_at_index ON diary_entries USING btree (language_code, created_at);
1902 -- Name: diary_entry_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -
1905 CREATE INDEX diary_entry_user_id_created_at_index ON diary_entries USING btree (user_id, created_at);
1909 -- Name: friends_user_id_idx; Type: INDEX; Schema: public; Owner: -
1912 CREATE INDEX friends_user_id_idx ON friends USING btree (user_id);
1916 -- Name: gpx_file_tags_gpxid_idx; Type: INDEX; Schema: public; Owner: -
1919 CREATE INDEX gpx_file_tags_gpxid_idx ON gpx_file_tags USING btree (gpx_id);
1923 -- Name: gpx_file_tags_tag_idx; Type: INDEX; Schema: public; Owner: -
1926 CREATE INDEX gpx_file_tags_tag_idx ON gpx_file_tags USING btree (tag);
1930 -- Name: gpx_files_timestamp_idx; Type: INDEX; Schema: public; Owner: -
1933 CREATE INDEX gpx_files_timestamp_idx ON gpx_files USING btree ("timestamp");
1937 -- Name: gpx_files_user_id_idx; Type: INDEX; Schema: public; Owner: -
1940 CREATE INDEX gpx_files_user_id_idx ON gpx_files USING btree (user_id);
1944 -- Name: gpx_files_visible_visibility_idx; Type: INDEX; Schema: public; Owner: -
1947 CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility);
1951 -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -
1954 CREATE INDEX index_changeset_comments_on_created_at ON changeset_comments USING btree (created_at);
1958 -- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: -
1961 CREATE INDEX index_changesets_subscribers_on_changeset_id ON changesets_subscribers USING btree (changeset_id);
1965 -- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: -
1968 CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_id ON changesets_subscribers USING btree (subscriber_id, changeset_id);
1972 -- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: -
1975 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
1979 -- Name: index_issue_comments_on_commenter_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1982 CREATE INDEX index_issue_comments_on_commenter_user_id ON issue_comments USING btree (commenter_user_id);
1986 -- Name: index_issue_comments_on_issue_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1989 CREATE INDEX index_issue_comments_on_issue_id ON issue_comments USING btree (issue_id);
1993 -- Name: index_issues_on_reportable_id_and_reportable_type; Type: INDEX; Schema: public; Owner: -; Tablespace:
1996 CREATE INDEX index_issues_on_reportable_id_and_reportable_type ON issues USING btree (reportable_id, reportable_type);
2000 -- Name: index_issues_on_reported_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2003 CREATE INDEX index_issues_on_reported_user_id ON issues USING btree (reported_user_id);
2007 -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -
2010 CREATE INDEX index_note_comments_on_body ON note_comments USING gin (to_tsvector('english'::regconfig, body));
2014 -- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: -
2017 CREATE INDEX index_note_comments_on_created_at ON note_comments USING btree (created_at);
2021 -- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: -
2024 CREATE UNIQUE INDEX index_oauth_nonces_on_nonce_and_timestamp ON oauth_nonces USING btree (nonce, "timestamp");
2028 -- Name: index_oauth_tokens_on_token; Type: INDEX; Schema: public; Owner: -
2031 CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token);
2035 -- Name: index_reports_on_issue_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2038 CREATE INDEX index_reports_on_issue_id ON reports USING btree (issue_id);
2042 -- Name: index_reports_on_reporter_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
2045 CREATE INDEX index_reports_on_reporter_user_id ON reports USING btree (reporter_user_id);
2049 -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -
2052 CREATE INDEX index_user_blocks_on_user_id ON user_blocks USING btree (user_id);
2056 -- Name: messages_from_user_id_idx; Type: INDEX; Schema: public; Owner: -
2059 CREATE INDEX messages_from_user_id_idx ON messages USING btree (from_user_id);
2063 -- Name: messages_to_user_id_idx; Type: INDEX; Schema: public; Owner: -
2066 CREATE INDEX messages_to_user_id_idx ON messages USING btree (to_user_id);
2070 -- Name: nodes_changeset_id_idx; Type: INDEX; Schema: public; Owner: -
2073 CREATE INDEX nodes_changeset_id_idx ON nodes USING btree (changeset_id);
2077 -- Name: nodes_tile_idx; Type: INDEX; Schema: public; Owner: -
2080 CREATE INDEX nodes_tile_idx ON nodes USING btree (tile);
2084 -- Name: nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -
2087 CREATE INDEX nodes_timestamp_idx ON nodes USING btree ("timestamp");
2091 -- Name: note_comments_note_id_idx; Type: INDEX; Schema: public; Owner: -
2094 CREATE INDEX note_comments_note_id_idx ON note_comments USING btree (note_id);
2098 -- Name: notes_created_at_idx; Type: INDEX; Schema: public; Owner: -
2101 CREATE INDEX notes_created_at_idx ON notes USING btree (created_at);
2105 -- Name: notes_tile_status_idx; Type: INDEX; Schema: public; Owner: -
2108 CREATE INDEX notes_tile_status_idx ON notes USING btree (tile, status);
2112 -- Name: notes_updated_at_idx; Type: INDEX; Schema: public; Owner: -
2115 CREATE INDEX notes_updated_at_idx ON notes USING btree (updated_at);
2119 -- Name: points_gpxid_idx; Type: INDEX; Schema: public; Owner: -
2122 CREATE INDEX points_gpxid_idx ON gps_points USING btree (gpx_id);
2126 -- Name: points_tile_idx; Type: INDEX; Schema: public; Owner: -
2129 CREATE INDEX points_tile_idx ON gps_points USING btree (tile);
2133 -- Name: relation_members_member_idx; Type: INDEX; Schema: public; Owner: -
2136 CREATE INDEX relation_members_member_idx ON relation_members USING btree (member_type, member_id);
2140 -- Name: relations_changeset_id_idx; Type: INDEX; Schema: public; Owner: -
2143 CREATE INDEX relations_changeset_id_idx ON relations USING btree (changeset_id);
2147 -- Name: relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -
2150 CREATE INDEX relations_timestamp_idx ON relations USING btree ("timestamp");
2154 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -
2157 CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
2161 -- Name: user_id_idx; Type: INDEX; Schema: public; Owner: -
2164 CREATE INDEX user_id_idx ON friends USING btree (friend_user_id);
2168 -- Name: user_roles_id_role_unique; Type: INDEX; Schema: public; Owner: -
2171 CREATE UNIQUE INDEX user_roles_id_role_unique ON user_roles USING btree (user_id, role);
2175 -- Name: user_tokens_token_idx; Type: INDEX; Schema: public; Owner: -
2178 CREATE UNIQUE INDEX user_tokens_token_idx ON user_tokens USING btree (token);
2182 -- Name: user_tokens_user_id_idx; Type: INDEX; Schema: public; Owner: -
2185 CREATE INDEX user_tokens_user_id_idx ON user_tokens USING btree (user_id);
2189 -- Name: users_auth_idx; Type: INDEX; Schema: public; Owner: -
2192 CREATE UNIQUE INDEX users_auth_idx ON users USING btree (auth_provider, auth_uid);
2196 -- Name: users_display_name_idx; Type: INDEX; Schema: public; Owner: -
2199 CREATE UNIQUE INDEX users_display_name_idx ON users USING btree (display_name);
2203 -- Name: users_display_name_lower_idx; Type: INDEX; Schema: public; Owner: -
2206 CREATE INDEX users_display_name_lower_idx ON users USING btree (lower((display_name)::text));
2210 -- Name: users_email_idx; Type: INDEX; Schema: public; Owner: -
2213 CREATE UNIQUE INDEX users_email_idx ON users USING btree (email);
2217 -- Name: users_email_lower_idx; Type: INDEX; Schema: public; Owner: -
2220 CREATE INDEX users_email_lower_idx ON users USING btree (lower((email)::text));
2224 -- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -
2227 CREATE INDEX way_nodes_node_idx ON way_nodes USING btree (node_id);
2231 -- Name: ways_changeset_id_idx; Type: INDEX; Schema: public; Owner: -
2234 CREATE INDEX ways_changeset_id_idx ON ways USING btree (changeset_id);
2238 -- Name: ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -
2241 CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp");
2245 -- Name: changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2248 ALTER TABLE ONLY changeset_comments
2249 ADD CONSTRAINT changeset_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2253 -- Name: changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2256 ALTER TABLE ONLY changeset_comments
2257 ADD CONSTRAINT changeset_comments_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2261 -- Name: changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2264 ALTER TABLE ONLY changeset_tags
2265 ADD CONSTRAINT changeset_tags_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2269 -- Name: changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2272 ALTER TABLE ONLY changesets_subscribers
2273 ADD CONSTRAINT changesets_subscribers_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2277 -- Name: changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2280 ALTER TABLE ONLY changesets_subscribers
2281 ADD CONSTRAINT changesets_subscribers_subscriber_id_fkey FOREIGN KEY (subscriber_id) REFERENCES users(id);
2285 -- Name: changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2288 ALTER TABLE ONLY changesets
2289 ADD CONSTRAINT changesets_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2293 -- Name: client_applications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2296 ALTER TABLE ONLY client_applications
2297 ADD CONSTRAINT client_applications_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2301 -- Name: current_node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2304 ALTER TABLE ONLY current_node_tags
2305 ADD CONSTRAINT current_node_tags_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2309 -- Name: current_nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2312 ALTER TABLE ONLY current_nodes
2313 ADD CONSTRAINT current_nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2317 -- Name: current_relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2320 ALTER TABLE ONLY current_relation_members
2321 ADD CONSTRAINT current_relation_members_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2325 -- Name: current_relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2328 ALTER TABLE ONLY current_relation_tags
2329 ADD CONSTRAINT current_relation_tags_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2333 -- Name: current_relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2336 ALTER TABLE ONLY current_relations
2337 ADD CONSTRAINT current_relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2341 -- Name: current_way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2344 ALTER TABLE ONLY current_way_nodes
2345 ADD CONSTRAINT current_way_nodes_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2349 -- Name: current_way_nodes_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2352 ALTER TABLE ONLY current_way_nodes
2353 ADD CONSTRAINT current_way_nodes_node_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2357 -- Name: current_way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2360 ALTER TABLE ONLY current_way_tags
2361 ADD CONSTRAINT current_way_tags_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2365 -- Name: current_ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2368 ALTER TABLE ONLY current_ways
2369 ADD CONSTRAINT current_ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2373 -- Name: diary_comments_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2376 ALTER TABLE ONLY diary_comments
2377 ADD CONSTRAINT diary_comments_diary_entry_id_fkey FOREIGN KEY (diary_entry_id) REFERENCES diary_entries(id);
2381 -- Name: diary_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2384 ALTER TABLE ONLY diary_comments
2385 ADD CONSTRAINT diary_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2389 -- Name: diary_entries_language_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2392 ALTER TABLE ONLY diary_entries
2393 ADD CONSTRAINT diary_entries_language_code_fkey FOREIGN KEY (language_code) REFERENCES languages(code);
2397 -- Name: diary_entries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2400 ALTER TABLE ONLY diary_entries
2401 ADD CONSTRAINT diary_entries_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2405 -- Name: friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2408 ALTER TABLE ONLY friends
2409 ADD CONSTRAINT friends_friend_user_id_fkey FOREIGN KEY (friend_user_id) REFERENCES users(id);
2413 -- Name: friends_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2416 ALTER TABLE ONLY friends
2417 ADD CONSTRAINT friends_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2421 -- Name: gps_points_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2424 ALTER TABLE ONLY gps_points
2425 ADD CONSTRAINT gps_points_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2429 -- Name: gpx_file_tags_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2432 ALTER TABLE ONLY gpx_file_tags
2433 ADD CONSTRAINT gpx_file_tags_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2437 -- Name: gpx_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2440 ALTER TABLE ONLY gpx_files
2441 ADD CONSTRAINT gpx_files_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2445 -- Name: issue_comments_commenter_user_id; Type: FK CONSTRAINT; Schema: public; Owner: -
2448 ALTER TABLE ONLY issue_comments
2449 ADD CONSTRAINT issue_comments_commenter_user_id FOREIGN KEY (commenter_user_id) REFERENCES users(id);
2453 -- Name: issue_comments_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2456 ALTER TABLE ONLY issue_comments
2457 ADD CONSTRAINT issue_comments_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id);
2461 -- Name: issues_reported_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2464 ALTER TABLE ONLY issues
2465 ADD CONSTRAINT issues_reported_user_id_fkey FOREIGN KEY (reported_user_id) REFERENCES users(id);
2469 -- Name: messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2472 ALTER TABLE ONLY messages
2473 ADD CONSTRAINT messages_from_user_id_fkey FOREIGN KEY (from_user_id) REFERENCES users(id);
2477 -- Name: messages_to_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2480 ALTER TABLE ONLY messages
2481 ADD CONSTRAINT messages_to_user_id_fkey FOREIGN KEY (to_user_id) REFERENCES users(id);
2485 -- Name: node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2488 ALTER TABLE ONLY node_tags
2489 ADD CONSTRAINT node_tags_id_fkey FOREIGN KEY (node_id, version) REFERENCES nodes(node_id, version);
2493 -- Name: nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2496 ALTER TABLE ONLY nodes
2497 ADD CONSTRAINT nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2501 -- Name: nodes_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2504 ALTER TABLE ONLY nodes
2505 ADD CONSTRAINT nodes_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2509 -- Name: note_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2512 ALTER TABLE ONLY note_comments
2513 ADD CONSTRAINT note_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2517 -- Name: note_comments_note_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2520 ALTER TABLE ONLY note_comments
2521 ADD CONSTRAINT note_comments_note_id_fkey FOREIGN KEY (note_id) REFERENCES notes(id);
2525 -- Name: oauth_tokens_client_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2528 ALTER TABLE ONLY oauth_tokens
2529 ADD CONSTRAINT oauth_tokens_client_application_id_fkey FOREIGN KEY (client_application_id) REFERENCES client_applications(id);
2533 -- Name: oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2536 ALTER TABLE ONLY oauth_tokens
2537 ADD CONSTRAINT oauth_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2541 -- Name: redactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2544 ALTER TABLE ONLY redactions
2545 ADD CONSTRAINT redactions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2549 -- Name: relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2552 ALTER TABLE ONLY relation_members
2553 ADD CONSTRAINT relation_members_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2557 -- Name: relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2560 ALTER TABLE ONLY relation_tags
2561 ADD CONSTRAINT relation_tags_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2565 -- Name: relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2568 ALTER TABLE ONLY relations
2569 ADD CONSTRAINT relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2573 -- Name: relations_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2576 ALTER TABLE ONLY relations
2577 ADD CONSTRAINT relations_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2581 -- Name: reports_issue_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2584 ALTER TABLE ONLY reports
2585 ADD CONSTRAINT reports_issue_id_fkey FOREIGN KEY (issue_id) REFERENCES issues(id);
2589 -- Name: reports_reporter_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2592 ALTER TABLE ONLY reports
2593 ADD CONSTRAINT reports_reporter_user_id_fkey FOREIGN KEY (reporter_user_id) REFERENCES users(id);
2597 -- Name: user_blocks_moderator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2600 ALTER TABLE ONLY user_blocks
2601 ADD CONSTRAINT user_blocks_moderator_id_fkey FOREIGN KEY (creator_id) REFERENCES users(id);
2605 -- Name: user_blocks_revoker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2608 ALTER TABLE ONLY user_blocks
2609 ADD CONSTRAINT user_blocks_revoker_id_fkey FOREIGN KEY (revoker_id) REFERENCES users(id);
2613 -- Name: user_blocks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2616 ALTER TABLE ONLY user_blocks
2617 ADD CONSTRAINT user_blocks_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2621 -- Name: user_preferences_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2624 ALTER TABLE ONLY user_preferences
2625 ADD CONSTRAINT user_preferences_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2629 -- Name: user_roles_granter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2632 ALTER TABLE ONLY user_roles
2633 ADD CONSTRAINT user_roles_granter_id_fkey FOREIGN KEY (granter_id) REFERENCES users(id);
2637 -- Name: user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2640 ALTER TABLE ONLY user_roles
2641 ADD CONSTRAINT user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2645 -- Name: user_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2648 ALTER TABLE ONLY user_tokens
2649 ADD CONSTRAINT user_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2653 -- Name: way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2656 ALTER TABLE ONLY way_nodes
2657 ADD CONSTRAINT way_nodes_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2661 -- Name: way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2664 ALTER TABLE ONLY way_tags
2665 ADD CONSTRAINT way_tags_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2669 -- Name: ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2672 ALTER TABLE ONLY ways
2673 ADD CONSTRAINT ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2677 -- Name: ways_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2680 ALTER TABLE ONLY ways
2681 ADD CONSTRAINT ways_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2685 -- PostgreSQL database dump complete
2688 SET search_path TO "$user", public;
2690 INSERT INTO schema_migrations (version) VALUES ('1');
2692 INSERT INTO schema_migrations (version) VALUES ('10');
2694 INSERT INTO schema_migrations (version) VALUES ('11');
2696 INSERT INTO schema_migrations (version) VALUES ('12');
2698 INSERT INTO schema_migrations (version) VALUES ('13');
2700 INSERT INTO schema_migrations (version) VALUES ('14');
2702 INSERT INTO schema_migrations (version) VALUES ('15');
2704 INSERT INTO schema_migrations (version) VALUES ('16');
2706 INSERT INTO schema_migrations (version) VALUES ('17');
2708 INSERT INTO schema_migrations (version) VALUES ('18');
2710 INSERT INTO schema_migrations (version) VALUES ('19');
2712 INSERT INTO schema_migrations (version) VALUES ('2');
2714 INSERT INTO schema_migrations (version) VALUES ('20');
2716 INSERT INTO schema_migrations (version) VALUES ('20100513171259');
2718 INSERT INTO schema_migrations (version) VALUES ('20100516124737');
2720 INSERT INTO schema_migrations (version) VALUES ('20100910084426');
2722 INSERT INTO schema_migrations (version) VALUES ('20101114011429');
2724 INSERT INTO schema_migrations (version) VALUES ('20110322001319');
2726 INSERT INTO schema_migrations (version) VALUES ('20110508145337');
2728 INSERT INTO schema_migrations (version) VALUES ('20110521142405');
2730 INSERT INTO schema_migrations (version) VALUES ('20110925112722');
2732 INSERT INTO schema_migrations (version) VALUES ('20111116184519');
2734 INSERT INTO schema_migrations (version) VALUES ('20111212183945');
2736 INSERT INTO schema_migrations (version) VALUES ('20120123184321');
2738 INSERT INTO schema_migrations (version) VALUES ('20120208122334');
2740 INSERT INTO schema_migrations (version) VALUES ('20120208194454');
2742 INSERT INTO schema_migrations (version) VALUES ('20120214210114');
2744 INSERT INTO schema_migrations (version) VALUES ('20120219161649');
2746 INSERT INTO schema_migrations (version) VALUES ('20120318201948');
2748 INSERT INTO schema_migrations (version) VALUES ('20120328090602');
2750 INSERT INTO schema_migrations (version) VALUES ('20120404205604');
2752 INSERT INTO schema_migrations (version) VALUES ('20120808231205');
2754 INSERT INTO schema_migrations (version) VALUES ('20121005195010');
2756 INSERT INTO schema_migrations (version) VALUES ('20121012044047');
2758 INSERT INTO schema_migrations (version) VALUES ('20121119165817');
2760 INSERT INTO schema_migrations (version) VALUES ('20121202155309');
2762 INSERT INTO schema_migrations (version) VALUES ('20121203124841');
2764 INSERT INTO schema_migrations (version) VALUES ('20130328184137');
2766 INSERT INTO schema_migrations (version) VALUES ('20131029121300');
2768 INSERT INTO schema_migrations (version) VALUES ('20131212124700');
2770 INSERT INTO schema_migrations (version) VALUES ('20140115192822');
2772 INSERT INTO schema_migrations (version) VALUES ('20140117185510');
2774 INSERT INTO schema_migrations (version) VALUES ('20140210003018');
2776 INSERT INTO schema_migrations (version) VALUES ('20140507110937');
2778 INSERT INTO schema_migrations (version) VALUES ('20140519141742');
2780 INSERT INTO schema_migrations (version) VALUES ('20150110152606');
2782 INSERT INTO schema_migrations (version) VALUES ('20150111192335');
2784 INSERT INTO schema_migrations (version) VALUES ('20150222101847');
2786 INSERT INTO schema_migrations (version) VALUES ('20150516073616');
2788 INSERT INTO schema_migrations (version) VALUES ('20150526130032');
2790 INSERT INTO schema_migrations (version) VALUES ('21');
2792 INSERT INTO schema_migrations (version) VALUES ('22');
2794 INSERT INTO schema_migrations (version) VALUES ('23');
2796 INSERT INTO schema_migrations (version) VALUES ('24');
2798 INSERT INTO schema_migrations (version) VALUES ('25');
2800 INSERT INTO schema_migrations (version) VALUES ('26');
2802 INSERT INTO schema_migrations (version) VALUES ('27');
2804 INSERT INTO schema_migrations (version) VALUES ('28');
2806 INSERT INTO schema_migrations (version) VALUES ('29');
2808 INSERT INTO schema_migrations (version) VALUES ('3');
2810 INSERT INTO schema_migrations (version) VALUES ('30');
2812 INSERT INTO schema_migrations (version) VALUES ('31');
2814 INSERT INTO schema_migrations (version) VALUES ('32');
2816 INSERT INTO schema_migrations (version) VALUES ('33');
2818 INSERT INTO schema_migrations (version) VALUES ('34');
2820 INSERT INTO schema_migrations (version) VALUES ('35');
2822 INSERT INTO schema_migrations (version) VALUES ('36');
2824 INSERT INTO schema_migrations (version) VALUES ('37');
2826 INSERT INTO schema_migrations (version) VALUES ('38');
2828 INSERT INTO schema_migrations (version) VALUES ('39');
2830 INSERT INTO schema_migrations (version) VALUES ('4');
2832 INSERT INTO schema_migrations (version) VALUES ('40');
2834 INSERT INTO schema_migrations (version) VALUES ('41');
2836 INSERT INTO schema_migrations (version) VALUES ('42');
2838 INSERT INTO schema_migrations (version) VALUES ('43');
2840 INSERT INTO schema_migrations (version) VALUES ('44');
2842 INSERT INTO schema_migrations (version) VALUES ('45');
2844 INSERT INTO schema_migrations (version) VALUES ('46');
2846 INSERT INTO schema_migrations (version) VALUES ('47');
2848 INSERT INTO schema_migrations (version) VALUES ('48');
2850 INSERT INTO schema_migrations (version) VALUES ('49');
2852 INSERT INTO schema_migrations (version) VALUES ('5');
2854 INSERT INTO schema_migrations (version) VALUES ('50');
2856 INSERT INTO schema_migrations (version) VALUES ('51');
2858 INSERT INTO schema_migrations (version) VALUES ('52');
2860 INSERT INTO schema_migrations (version) VALUES ('53');
2862 INSERT INTO schema_migrations (version) VALUES ('54');
2864 INSERT INTO schema_migrations (version) VALUES ('55');
2866 INSERT INTO schema_migrations (version) VALUES ('56');
2868 INSERT INTO schema_migrations (version) VALUES ('57');
2870 INSERT INTO schema_migrations (version) VALUES ('6');
2872 INSERT INTO schema_migrations (version) VALUES ('7');
2874 INSERT INTO schema_migrations (version) VALUES ('8');
2876 INSERT INTO schema_migrations (version) VALUES ('9');