2 -- PostgreSQL database dump
5 SET statement_timeout = 0;
7 SET client_encoding = 'UTF8';
8 SET standard_conforming_strings = on;
9 SET check_function_bodies = false;
10 SET client_min_messages = warning;
13 -- Name: plpgsql; Type: EXTENSION; Schema: -; Owner: -
16 CREATE EXTENSION IF NOT EXISTS plpgsql WITH SCHEMA pg_catalog;
20 -- Name: EXTENSION plpgsql; Type: COMMENT; Schema: -; Owner: -
23 COMMENT ON EXTENSION plpgsql IS 'PL/pgSQL procedural language';
27 -- Name: btree_gist; Type: EXTENSION; Schema: -; Owner: -
30 CREATE EXTENSION IF NOT EXISTS btree_gist WITH SCHEMA public;
34 -- Name: EXTENSION btree_gist; Type: COMMENT; Schema: -; Owner: -
37 COMMENT ON EXTENSION btree_gist IS 'support for indexing common datatypes in GiST';
40 SET search_path = public, pg_catalog;
43 -- Name: format_enum; Type: TYPE; Schema: public; Owner: -
46 CREATE TYPE format_enum AS ENUM (
54 -- Name: gpx_visibility_enum; Type: TYPE; Schema: public; Owner: -
57 CREATE TYPE gpx_visibility_enum AS ENUM (
66 -- Name: note_event_enum; Type: TYPE; Schema: public; Owner: -
69 CREATE TYPE note_event_enum AS ENUM (
79 -- Name: note_status_enum; Type: TYPE; Schema: public; Owner: -
82 CREATE TYPE note_status_enum AS ENUM (
90 -- Name: nwr_enum; Type: TYPE; Schema: public; Owner: -
93 CREATE TYPE nwr_enum AS ENUM (
101 -- Name: user_role_enum; Type: TYPE; Schema: public; Owner: -
104 CREATE TYPE user_role_enum AS ENUM (
111 -- Name: user_status_enum; Type: TYPE; Schema: public; Owner: -
114 CREATE TYPE user_status_enum AS ENUM (
124 -- Name: maptile_for_point(bigint, bigint, integer); Type: FUNCTION; Schema: public; Owner: -
127 CREATE FUNCTION maptile_for_point(bigint, bigint, integer) RETURNS integer
129 AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'maptile_for_point';
133 -- Name: tile_for_point(integer, integer); Type: FUNCTION; Schema: public; Owner: -
136 CREATE FUNCTION tile_for_point(integer, integer) RETURNS bigint
138 AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'tile_for_point';
142 -- Name: xid_to_int4(xid); Type: FUNCTION; Schema: public; Owner: -
145 CREATE FUNCTION xid_to_int4(xid) RETURNS integer
146 LANGUAGE c IMMUTABLE STRICT
147 AS '/srv/www/master.osm.compton.nu/db/functions/libpgosm.so', 'xid_to_int4';
150 SET default_tablespace = '';
152 SET default_with_oids = false;
155 -- Name: acls; Type: TABLE; Schema: public; Owner: -; Tablespace:
161 k character varying NOT NULL,
163 domain character varying
168 -- Name: acls_id_seq; Type: SEQUENCE; Schema: public; Owner: -
171 CREATE SEQUENCE acls_id_seq
180 -- Name: acls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
183 ALTER SEQUENCE acls_id_seq OWNED BY acls.id;
187 -- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
190 CREATE TABLE changeset_comments (
192 changeset_id bigint NOT NULL,
193 author_id bigint NOT NULL,
195 created_at timestamp without time zone NOT NULL,
196 visible boolean NOT NULL
201 -- Name: changeset_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
204 CREATE SEQUENCE changeset_comments_id_seq
213 -- Name: changeset_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
216 ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
220 -- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
223 CREATE TABLE changeset_tags (
224 changeset_id bigint NOT NULL,
225 k character varying DEFAULT ''::character varying NOT NULL,
226 v character varying DEFAULT ''::character varying NOT NULL
231 -- Name: changesets; Type: TABLE; Schema: public; Owner: -; Tablespace:
234 CREATE TABLE changesets (
236 user_id bigint NOT NULL,
237 created_at timestamp without time zone NOT NULL,
242 closed_at timestamp without time zone NOT NULL,
243 num_changes integer DEFAULT 0 NOT NULL
248 -- Name: changesets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
251 CREATE SEQUENCE changesets_id_seq
260 -- Name: changesets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
263 ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id;
267 -- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -; Tablespace:
270 CREATE TABLE changesets_subscribers (
271 subscriber_id bigint NOT NULL,
272 changeset_id bigint NOT NULL
277 -- Name: client_applications; Type: TABLE; Schema: public; Owner: -; Tablespace:
280 CREATE TABLE client_applications (
282 name character varying,
283 url character varying,
284 support_url character varying,
285 callback_url character varying,
286 key character varying(50),
287 secret character varying(50),
289 created_at timestamp without time zone,
290 updated_at timestamp without time zone,
291 allow_read_prefs boolean DEFAULT false NOT NULL,
292 allow_write_prefs boolean DEFAULT false NOT NULL,
293 allow_write_diary boolean DEFAULT false NOT NULL,
294 allow_write_api boolean DEFAULT false NOT NULL,
295 allow_read_gpx boolean DEFAULT false NOT NULL,
296 allow_write_gpx boolean DEFAULT false NOT NULL,
297 allow_write_notes boolean DEFAULT false NOT NULL
302 -- Name: client_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
305 CREATE SEQUENCE client_applications_id_seq
314 -- Name: client_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
317 ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id;
321 -- Name: current_node_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
324 CREATE TABLE current_node_tags (
325 node_id bigint NOT NULL,
326 k character varying DEFAULT ''::character varying NOT NULL,
327 v character varying DEFAULT ''::character varying NOT NULL
332 -- Name: current_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
335 CREATE TABLE current_nodes (
337 latitude integer NOT NULL,
338 longitude integer NOT NULL,
339 changeset_id bigint NOT NULL,
340 visible boolean NOT NULL,
341 "timestamp" timestamp without time zone NOT NULL,
342 tile bigint NOT NULL,
343 version bigint NOT NULL
348 -- Name: current_nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
351 CREATE SEQUENCE current_nodes_id_seq
360 -- Name: current_nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
363 ALTER SEQUENCE current_nodes_id_seq OWNED BY current_nodes.id;
367 -- Name: current_relation_members; Type: TABLE; Schema: public; Owner: -; Tablespace:
370 CREATE TABLE current_relation_members (
371 relation_id bigint NOT NULL,
372 member_type nwr_enum NOT NULL,
373 member_id bigint NOT NULL,
374 member_role character varying NOT NULL,
375 sequence_id integer DEFAULT 0 NOT NULL
380 -- Name: current_relation_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
383 CREATE TABLE current_relation_tags (
384 relation_id bigint NOT NULL,
385 k character varying DEFAULT ''::character varying NOT NULL,
386 v character varying DEFAULT ''::character varying NOT NULL
391 -- Name: current_relations; Type: TABLE; Schema: public; Owner: -; Tablespace:
394 CREATE TABLE current_relations (
396 changeset_id bigint NOT NULL,
397 "timestamp" timestamp without time zone NOT NULL,
398 visible boolean NOT NULL,
399 version bigint NOT NULL
404 -- Name: current_relations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
407 CREATE SEQUENCE current_relations_id_seq
416 -- Name: current_relations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
419 ALTER SEQUENCE current_relations_id_seq OWNED BY current_relations.id;
423 -- Name: current_way_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
426 CREATE TABLE current_way_nodes (
427 way_id bigint NOT NULL,
428 node_id bigint NOT NULL,
429 sequence_id bigint NOT NULL
434 -- Name: current_way_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
437 CREATE TABLE current_way_tags (
438 way_id bigint NOT NULL,
439 k character varying DEFAULT ''::character varying NOT NULL,
440 v character varying DEFAULT ''::character varying NOT NULL
445 -- Name: current_ways; Type: TABLE; Schema: public; Owner: -; Tablespace:
448 CREATE TABLE current_ways (
450 changeset_id bigint NOT NULL,
451 "timestamp" timestamp without time zone NOT NULL,
452 visible boolean NOT NULL,
453 version bigint NOT NULL
458 -- Name: current_ways_id_seq; Type: SEQUENCE; Schema: public; Owner: -
461 CREATE SEQUENCE current_ways_id_seq
470 -- Name: current_ways_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
473 ALTER SEQUENCE current_ways_id_seq OWNED BY current_ways.id;
477 -- Name: diary_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
480 CREATE TABLE diary_comments (
482 diary_entry_id bigint NOT NULL,
483 user_id bigint NOT NULL,
485 created_at timestamp without time zone NOT NULL,
486 updated_at timestamp without time zone NOT NULL,
487 visible boolean DEFAULT true NOT NULL,
488 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
493 -- Name: diary_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
496 CREATE SEQUENCE diary_comments_id_seq
505 -- Name: diary_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
508 ALTER SEQUENCE diary_comments_id_seq OWNED BY diary_comments.id;
512 -- Name: diary_entries; Type: TABLE; Schema: public; Owner: -; Tablespace:
515 CREATE TABLE diary_entries (
517 user_id bigint NOT NULL,
518 title character varying NOT NULL,
520 created_at timestamp without time zone NOT NULL,
521 updated_at timestamp without time zone NOT NULL,
522 latitude double precision,
523 longitude double precision,
524 language_code character varying DEFAULT 'en'::character varying NOT NULL,
525 visible boolean DEFAULT true NOT NULL,
526 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
531 -- Name: diary_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
534 CREATE SEQUENCE diary_entries_id_seq
543 -- Name: diary_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
546 ALTER SEQUENCE diary_entries_id_seq OWNED BY diary_entries.id;
550 -- Name: friends; Type: TABLE; Schema: public; Owner: -; Tablespace:
553 CREATE TABLE friends (
555 user_id bigint NOT NULL,
556 friend_user_id bigint NOT NULL
561 -- Name: friends_id_seq; Type: SEQUENCE; Schema: public; Owner: -
564 CREATE SEQUENCE friends_id_seq
573 -- Name: friends_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
576 ALTER SEQUENCE friends_id_seq OWNED BY friends.id;
580 -- Name: gps_points; Type: TABLE; Schema: public; Owner: -; Tablespace:
583 CREATE TABLE gps_points (
584 altitude double precision,
585 trackid integer NOT NULL,
586 latitude integer NOT NULL,
587 longitude integer NOT NULL,
588 gpx_id bigint NOT NULL,
589 "timestamp" timestamp without time zone,
595 -- Name: gpx_file_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
598 CREATE TABLE gpx_file_tags (
599 gpx_id bigint DEFAULT 0 NOT NULL,
600 tag character varying NOT NULL,
606 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
609 CREATE SEQUENCE gpx_file_tags_id_seq
618 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
621 ALTER SEQUENCE gpx_file_tags_id_seq OWNED BY gpx_file_tags.id;
625 -- Name: gpx_files; Type: TABLE; Schema: public; Owner: -; Tablespace:
628 CREATE TABLE gpx_files (
630 user_id bigint NOT NULL,
631 visible boolean DEFAULT true NOT NULL,
632 name character varying DEFAULT ''::character varying NOT NULL,
634 latitude double precision,
635 longitude double precision,
636 "timestamp" timestamp without time zone NOT NULL,
637 description character varying DEFAULT ''::character varying NOT NULL,
638 inserted boolean NOT NULL,
639 visibility gpx_visibility_enum DEFAULT 'public'::gpx_visibility_enum NOT NULL
644 -- Name: gpx_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
647 CREATE SEQUENCE gpx_files_id_seq
656 -- Name: gpx_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
659 ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
663 -- Name: languages; Type: TABLE; Schema: public; Owner: -; Tablespace:
666 CREATE TABLE languages (
667 code character varying NOT NULL,
668 english_name character varying NOT NULL,
669 native_name character varying
674 -- Name: messages; Type: TABLE; Schema: public; Owner: -; Tablespace:
677 CREATE TABLE messages (
679 from_user_id bigint NOT NULL,
680 title character varying NOT NULL,
682 sent_on timestamp without time zone NOT NULL,
683 message_read boolean DEFAULT false NOT NULL,
684 to_user_id bigint NOT NULL,
685 to_user_visible boolean DEFAULT true NOT NULL,
686 from_user_visible boolean DEFAULT true NOT NULL,
687 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
692 -- Name: messages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
695 CREATE SEQUENCE messages_id_seq
704 -- Name: messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
707 ALTER SEQUENCE messages_id_seq OWNED BY messages.id;
711 -- Name: node_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
714 CREATE TABLE node_tags (
715 node_id bigint NOT NULL,
716 version bigint NOT NULL,
717 k character varying DEFAULT ''::character varying NOT NULL,
718 v character varying DEFAULT ''::character varying NOT NULL
723 -- Name: nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
727 node_id bigint NOT NULL,
728 latitude integer NOT NULL,
729 longitude integer NOT NULL,
730 changeset_id bigint NOT NULL,
731 visible boolean NOT NULL,
732 "timestamp" timestamp without time zone NOT NULL,
733 tile bigint NOT NULL,
734 version bigint NOT NULL,
740 -- Name: note_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
743 CREATE TABLE note_comments (
745 note_id bigint NOT NULL,
746 visible boolean NOT NULL,
747 created_at timestamp without time zone NOT NULL,
751 event note_event_enum
756 -- Name: note_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
759 CREATE SEQUENCE note_comments_id_seq
768 -- Name: note_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
771 ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id;
775 -- Name: notes; Type: TABLE; Schema: public; Owner: -; Tablespace:
780 latitude integer NOT NULL,
781 longitude integer NOT NULL,
782 tile bigint NOT NULL,
783 updated_at timestamp without time zone NOT NULL,
784 created_at timestamp without time zone NOT NULL,
785 status note_status_enum NOT NULL,
786 closed_at timestamp without time zone
791 -- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
794 CREATE SEQUENCE notes_id_seq
803 -- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
806 ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
810 -- Name: oauth_nonces; Type: TABLE; Schema: public; Owner: -; Tablespace:
813 CREATE TABLE oauth_nonces (
815 nonce character varying,
817 created_at timestamp without time zone,
818 updated_at timestamp without time zone
823 -- Name: oauth_nonces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
826 CREATE SEQUENCE oauth_nonces_id_seq
835 -- Name: oauth_nonces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
838 ALTER SEQUENCE oauth_nonces_id_seq OWNED BY oauth_nonces.id;
842 -- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: -; Tablespace:
845 CREATE TABLE oauth_tokens (
848 type character varying(20),
849 client_application_id integer,
850 token character varying(50),
851 secret character varying(50),
852 authorized_at timestamp without time zone,
853 invalidated_at timestamp without time zone,
854 created_at timestamp without time zone,
855 updated_at timestamp without time zone,
856 allow_read_prefs boolean DEFAULT false NOT NULL,
857 allow_write_prefs boolean DEFAULT false NOT NULL,
858 allow_write_diary boolean DEFAULT false NOT NULL,
859 allow_write_api boolean DEFAULT false NOT NULL,
860 allow_read_gpx boolean DEFAULT false NOT NULL,
861 allow_write_gpx boolean DEFAULT false NOT NULL,
862 callback_url character varying,
863 verifier character varying(20),
864 scope character varying,
865 valid_to timestamp without time zone,
866 allow_write_notes boolean DEFAULT false NOT NULL
871 -- Name: oauth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
874 CREATE SEQUENCE oauth_tokens_id_seq
883 -- Name: oauth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
886 ALTER SEQUENCE oauth_tokens_id_seq OWNED BY oauth_tokens.id;
890 -- Name: redactions; Type: TABLE; Schema: public; Owner: -; Tablespace:
893 CREATE TABLE redactions (
895 title character varying,
897 created_at timestamp without time zone,
898 updated_at timestamp without time zone,
899 user_id bigint NOT NULL,
900 description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
905 -- Name: redactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
908 CREATE SEQUENCE redactions_id_seq
917 -- Name: redactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
920 ALTER SEQUENCE redactions_id_seq OWNED BY redactions.id;
924 -- Name: relation_members; Type: TABLE; Schema: public; Owner: -; Tablespace:
927 CREATE TABLE relation_members (
928 relation_id bigint DEFAULT 0 NOT NULL,
929 member_type nwr_enum NOT NULL,
930 member_id bigint NOT NULL,
931 member_role character varying NOT NULL,
932 version bigint DEFAULT 0 NOT NULL,
933 sequence_id integer DEFAULT 0 NOT NULL
938 -- Name: relation_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
941 CREATE TABLE relation_tags (
942 relation_id bigint DEFAULT 0 NOT NULL,
943 k character varying DEFAULT ''::character varying NOT NULL,
944 v character varying DEFAULT ''::character varying NOT NULL,
945 version bigint NOT NULL
950 -- Name: relations; Type: TABLE; Schema: public; Owner: -; Tablespace:
953 CREATE TABLE relations (
954 relation_id bigint DEFAULT 0 NOT NULL,
955 changeset_id bigint NOT NULL,
956 "timestamp" timestamp without time zone NOT NULL,
957 version bigint NOT NULL,
958 visible boolean DEFAULT true NOT NULL,
964 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
967 CREATE TABLE schema_migrations (
968 version character varying NOT NULL
973 -- Name: user_blocks; Type: TABLE; Schema: public; Owner: -; Tablespace:
976 CREATE TABLE user_blocks (
978 user_id bigint NOT NULL,
979 creator_id bigint NOT NULL,
980 reason text NOT NULL,
981 ends_at timestamp without time zone NOT NULL,
982 needs_view boolean DEFAULT false NOT NULL,
984 created_at timestamp without time zone,
985 updated_at timestamp without time zone,
986 reason_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
991 -- Name: user_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
994 CREATE SEQUENCE user_blocks_id_seq
1003 -- Name: user_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1006 ALTER SEQUENCE user_blocks_id_seq OWNED BY user_blocks.id;
1010 -- Name: user_preferences; Type: TABLE; Schema: public; Owner: -; Tablespace:
1013 CREATE TABLE user_preferences (
1014 user_id bigint NOT NULL,
1015 k character varying NOT NULL,
1016 v character varying NOT NULL
1021 -- Name: user_roles; Type: TABLE; Schema: public; Owner: -; Tablespace:
1024 CREATE TABLE user_roles (
1025 id integer NOT NULL,
1026 user_id bigint NOT NULL,
1027 role user_role_enum NOT NULL,
1028 created_at timestamp without time zone,
1029 updated_at timestamp without time zone,
1030 granter_id bigint NOT NULL
1035 -- Name: user_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1038 CREATE SEQUENCE user_roles_id_seq
1047 -- Name: user_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1050 ALTER SEQUENCE user_roles_id_seq OWNED BY user_roles.id;
1054 -- Name: user_tokens; Type: TABLE; Schema: public; Owner: -; Tablespace:
1057 CREATE TABLE user_tokens (
1059 user_id bigint NOT NULL,
1060 token character varying NOT NULL,
1061 expiry timestamp without time zone NOT NULL,
1067 -- Name: user_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1070 CREATE SEQUENCE user_tokens_id_seq
1079 -- Name: user_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1082 ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id;
1086 -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace:
1089 CREATE TABLE users (
1090 email character varying NOT NULL,
1092 pass_crypt character varying NOT NULL,
1093 creation_time timestamp without time zone NOT NULL,
1094 display_name character varying DEFAULT ''::character varying NOT NULL,
1095 data_public boolean DEFAULT false NOT NULL,
1096 description text DEFAULT ''::text NOT NULL,
1097 home_lat double precision,
1098 home_lon double precision,
1099 home_zoom smallint DEFAULT 3,
1100 nearby integer DEFAULT 50,
1101 pass_salt character varying,
1102 image_file_name text,
1103 email_valid boolean DEFAULT false NOT NULL,
1104 new_email character varying,
1105 creation_ip character varying,
1106 languages character varying,
1107 status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
1108 terms_agreed timestamp without time zone,
1109 consider_pd boolean DEFAULT false NOT NULL,
1110 auth_uid character varying,
1111 preferred_editor character varying,
1112 terms_seen boolean DEFAULT false NOT NULL,
1113 description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL,
1114 image_fingerprint character varying,
1115 changesets_count integer DEFAULT 0 NOT NULL,
1116 traces_count integer DEFAULT 0 NOT NULL,
1117 diary_entries_count integer DEFAULT 0 NOT NULL,
1118 image_use_gravatar boolean DEFAULT true NOT NULL,
1119 image_content_type character varying,
1120 auth_provider character varying
1125 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1128 CREATE SEQUENCE users_id_seq
1137 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1140 ALTER SEQUENCE users_id_seq OWNED BY users.id;
1144 -- Name: way_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
1147 CREATE TABLE way_nodes (
1148 way_id bigint NOT NULL,
1149 node_id bigint NOT NULL,
1150 version bigint NOT NULL,
1151 sequence_id bigint NOT NULL
1156 -- Name: way_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
1159 CREATE TABLE way_tags (
1160 way_id bigint DEFAULT 0 NOT NULL,
1161 k character varying NOT NULL,
1162 v character varying NOT NULL,
1163 version bigint NOT NULL
1168 -- Name: ways; Type: TABLE; Schema: public; Owner: -; Tablespace:
1172 way_id bigint DEFAULT 0 NOT NULL,
1173 changeset_id bigint NOT NULL,
1174 "timestamp" timestamp without time zone NOT NULL,
1175 version bigint NOT NULL,
1176 visible boolean DEFAULT true NOT NULL,
1177 redaction_id integer
1182 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1185 ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass);
1189 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1192 ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass);
1196 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1199 ALTER TABLE ONLY changesets ALTER COLUMN id SET DEFAULT nextval('changesets_id_seq'::regclass);
1203 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1206 ALTER TABLE ONLY client_applications ALTER COLUMN id SET DEFAULT nextval('client_applications_id_seq'::regclass);
1210 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1213 ALTER TABLE ONLY current_nodes ALTER COLUMN id SET DEFAULT nextval('current_nodes_id_seq'::regclass);
1217 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1220 ALTER TABLE ONLY current_relations ALTER COLUMN id SET DEFAULT nextval('current_relations_id_seq'::regclass);
1224 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1227 ALTER TABLE ONLY current_ways ALTER COLUMN id SET DEFAULT nextval('current_ways_id_seq'::regclass);
1231 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1234 ALTER TABLE ONLY diary_comments ALTER COLUMN id SET DEFAULT nextval('diary_comments_id_seq'::regclass);
1238 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1241 ALTER TABLE ONLY diary_entries ALTER COLUMN id SET DEFAULT nextval('diary_entries_id_seq'::regclass);
1245 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1248 ALTER TABLE ONLY friends ALTER COLUMN id SET DEFAULT nextval('friends_id_seq'::regclass);
1252 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1255 ALTER TABLE ONLY gpx_file_tags ALTER COLUMN id SET DEFAULT nextval('gpx_file_tags_id_seq'::regclass);
1259 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1262 ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq'::regclass);
1266 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1269 ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass);
1273 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1276 ALTER TABLE ONLY note_comments ALTER COLUMN id SET DEFAULT nextval('note_comments_id_seq'::regclass);
1280 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1283 ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
1287 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1290 ALTER TABLE ONLY oauth_nonces ALTER COLUMN id SET DEFAULT nextval('oauth_nonces_id_seq'::regclass);
1294 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1297 ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_id_seq'::regclass);
1301 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1304 ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_seq'::regclass);
1308 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1311 ALTER TABLE ONLY user_blocks ALTER COLUMN id SET DEFAULT nextval('user_blocks_id_seq'::regclass);
1315 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1318 ALTER TABLE ONLY user_roles ALTER COLUMN id SET DEFAULT nextval('user_roles_id_seq'::regclass);
1322 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1325 ALTER TABLE ONLY user_tokens ALTER COLUMN id SET DEFAULT nextval('user_tokens_id_seq'::regclass);
1329 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1332 ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1336 -- Name: acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1339 ALTER TABLE ONLY acls
1340 ADD CONSTRAINT acls_pkey PRIMARY KEY (id);
1344 -- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1347 ALTER TABLE ONLY changeset_comments
1348 ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id);
1352 -- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1355 ALTER TABLE ONLY changesets
1356 ADD CONSTRAINT changesets_pkey PRIMARY KEY (id);
1360 -- Name: client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1363 ALTER TABLE ONLY client_applications
1364 ADD CONSTRAINT client_applications_pkey PRIMARY KEY (id);
1368 -- Name: current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1371 ALTER TABLE ONLY current_node_tags
1372 ADD CONSTRAINT current_node_tags_pkey PRIMARY KEY (node_id, k);
1376 -- Name: current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1379 ALTER TABLE ONLY current_nodes
1380 ADD CONSTRAINT current_nodes_pkey1 PRIMARY KEY (id);
1384 -- Name: current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1387 ALTER TABLE ONLY current_relation_members
1388 ADD CONSTRAINT current_relation_members_pkey PRIMARY KEY (relation_id, member_type, member_id, member_role, sequence_id);
1392 -- Name: current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1395 ALTER TABLE ONLY current_relation_tags
1396 ADD CONSTRAINT current_relation_tags_pkey PRIMARY KEY (relation_id, k);
1400 -- Name: current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1403 ALTER TABLE ONLY current_relations
1404 ADD CONSTRAINT current_relations_pkey PRIMARY KEY (id);
1408 -- Name: current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1411 ALTER TABLE ONLY current_way_nodes
1412 ADD CONSTRAINT current_way_nodes_pkey PRIMARY KEY (way_id, sequence_id);
1416 -- Name: current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1419 ALTER TABLE ONLY current_way_tags
1420 ADD CONSTRAINT current_way_tags_pkey PRIMARY KEY (way_id, k);
1424 -- Name: current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1427 ALTER TABLE ONLY current_ways
1428 ADD CONSTRAINT current_ways_pkey PRIMARY KEY (id);
1432 -- Name: diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1435 ALTER TABLE ONLY diary_comments
1436 ADD CONSTRAINT diary_comments_pkey PRIMARY KEY (id);
1440 -- Name: diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1443 ALTER TABLE ONLY diary_entries
1444 ADD CONSTRAINT diary_entries_pkey PRIMARY KEY (id);
1448 -- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1451 ALTER TABLE ONLY friends
1452 ADD CONSTRAINT friends_pkey PRIMARY KEY (id);
1456 -- Name: gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1459 ALTER TABLE ONLY gpx_file_tags
1460 ADD CONSTRAINT gpx_file_tags_pkey PRIMARY KEY (id);
1464 -- Name: gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1467 ALTER TABLE ONLY gpx_files
1468 ADD CONSTRAINT gpx_files_pkey PRIMARY KEY (id);
1472 -- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1475 ALTER TABLE ONLY languages
1476 ADD CONSTRAINT languages_pkey PRIMARY KEY (code);
1480 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1483 ALTER TABLE ONLY messages
1484 ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
1488 -- Name: node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1491 ALTER TABLE ONLY node_tags
1492 ADD CONSTRAINT node_tags_pkey PRIMARY KEY (node_id, version, k);
1496 -- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1499 ALTER TABLE ONLY nodes
1500 ADD CONSTRAINT nodes_pkey PRIMARY KEY (node_id, version);
1504 -- Name: note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1507 ALTER TABLE ONLY note_comments
1508 ADD CONSTRAINT note_comments_pkey PRIMARY KEY (id);
1512 -- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1515 ALTER TABLE ONLY notes
1516 ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
1520 -- Name: oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1523 ALTER TABLE ONLY oauth_nonces
1524 ADD CONSTRAINT oauth_nonces_pkey PRIMARY KEY (id);
1528 -- Name: oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1531 ALTER TABLE ONLY oauth_tokens
1532 ADD CONSTRAINT oauth_tokens_pkey PRIMARY KEY (id);
1536 -- Name: redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1539 ALTER TABLE ONLY redactions
1540 ADD CONSTRAINT redactions_pkey PRIMARY KEY (id);
1544 -- Name: relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1547 ALTER TABLE ONLY relation_members
1548 ADD CONSTRAINT relation_members_pkey PRIMARY KEY (relation_id, version, member_type, member_id, member_role, sequence_id);
1552 -- Name: relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1555 ALTER TABLE ONLY relation_tags
1556 ADD CONSTRAINT relation_tags_pkey PRIMARY KEY (relation_id, version, k);
1560 -- Name: relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1563 ALTER TABLE ONLY relations
1564 ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
1568 -- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1571 ALTER TABLE ONLY user_blocks
1572 ADD CONSTRAINT user_blocks_pkey PRIMARY KEY (id);
1576 -- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1579 ALTER TABLE ONLY user_preferences
1580 ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (user_id, k);
1584 -- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1587 ALTER TABLE ONLY user_roles
1588 ADD CONSTRAINT user_roles_pkey PRIMARY KEY (id);
1592 -- Name: user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1595 ALTER TABLE ONLY user_tokens
1596 ADD CONSTRAINT user_tokens_pkey PRIMARY KEY (id);
1600 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1603 ALTER TABLE ONLY users
1604 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1608 -- Name: way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1611 ALTER TABLE ONLY way_nodes
1612 ADD CONSTRAINT way_nodes_pkey PRIMARY KEY (way_id, version, sequence_id);
1616 -- Name: way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1619 ALTER TABLE ONLY way_tags
1620 ADD CONSTRAINT way_tags_pkey PRIMARY KEY (way_id, version, k);
1624 -- Name: ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1627 ALTER TABLE ONLY ways
1628 ADD CONSTRAINT ways_pkey PRIMARY KEY (way_id, version);
1632 -- Name: acls_k_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1635 CREATE INDEX acls_k_idx ON acls USING btree (k);
1639 -- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1642 CREATE INDEX changeset_tags_id_idx ON changeset_tags USING btree (changeset_id);
1646 -- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1649 CREATE INDEX changesets_bbox_idx ON changesets USING gist (min_lat, max_lat, min_lon, max_lon);
1653 -- Name: changesets_closed_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1656 CREATE INDEX changesets_closed_at_idx ON changesets USING btree (closed_at);
1660 -- Name: changesets_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1663 CREATE INDEX changesets_created_at_idx ON changesets USING btree (created_at);
1667 -- Name: changesets_user_id_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1670 CREATE INDEX changesets_user_id_created_at_idx ON changesets USING btree (user_id, created_at);
1674 -- Name: changesets_user_id_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1677 CREATE INDEX changesets_user_id_id_idx ON changesets USING btree (user_id, id);
1681 -- Name: current_nodes_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1684 CREATE INDEX current_nodes_tile_idx ON current_nodes USING btree (tile);
1688 -- Name: current_nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1691 CREATE INDEX current_nodes_timestamp_idx ON current_nodes USING btree ("timestamp");
1695 -- Name: current_relation_members_member_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1698 CREATE INDEX current_relation_members_member_idx ON current_relation_members USING btree (member_type, member_id);
1702 -- Name: current_relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1705 CREATE INDEX current_relations_timestamp_idx ON current_relations USING btree ("timestamp");
1709 -- Name: current_way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1712 CREATE INDEX current_way_nodes_node_idx ON current_way_nodes USING btree (node_id);
1716 -- Name: current_ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1719 CREATE INDEX current_ways_timestamp_idx ON current_ways USING btree ("timestamp");
1723 -- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1726 CREATE INDEX diary_comment_user_id_created_at_index ON diary_comments USING btree (user_id, created_at);
1730 -- Name: diary_comments_entry_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1733 CREATE UNIQUE INDEX diary_comments_entry_id_idx ON diary_comments USING btree (diary_entry_id, id);
1737 -- Name: diary_entry_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1740 CREATE INDEX diary_entry_created_at_index ON diary_entries USING btree (created_at);
1744 -- Name: diary_entry_language_code_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1747 CREATE INDEX diary_entry_language_code_created_at_index ON diary_entries USING btree (language_code, created_at);
1751 -- Name: diary_entry_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1754 CREATE INDEX diary_entry_user_id_created_at_index ON diary_entries USING btree (user_id, created_at);
1758 -- Name: friends_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1761 CREATE INDEX friends_user_id_idx ON friends USING btree (user_id);
1765 -- Name: gpx_file_tags_gpxid_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1768 CREATE INDEX gpx_file_tags_gpxid_idx ON gpx_file_tags USING btree (gpx_id);
1772 -- Name: gpx_file_tags_tag_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1775 CREATE INDEX gpx_file_tags_tag_idx ON gpx_file_tags USING btree (tag);
1779 -- Name: gpx_files_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1782 CREATE INDEX gpx_files_timestamp_idx ON gpx_files USING btree ("timestamp");
1786 -- Name: gpx_files_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1789 CREATE INDEX gpx_files_user_id_idx ON gpx_files USING btree (user_id);
1793 -- Name: gpx_files_visible_visibility_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1796 CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility);
1800 -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
1803 CREATE INDEX index_changeset_comments_on_created_at ON changeset_comments USING btree (created_at);
1807 -- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1810 CREATE INDEX index_changesets_subscribers_on_changeset_id ON changesets_subscribers USING btree (changeset_id);
1814 -- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1817 CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_id ON changesets_subscribers USING btree (subscriber_id, changeset_id);
1821 -- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace:
1824 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
1828 -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -; Tablespace:
1831 CREATE INDEX index_note_comments_on_body ON note_comments USING gin (to_tsvector('english'::regconfig, body));
1835 -- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
1838 CREATE INDEX index_note_comments_on_created_at ON note_comments USING btree (created_at);
1842 -- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: -; Tablespace:
1845 CREATE UNIQUE INDEX index_oauth_nonces_on_nonce_and_timestamp ON oauth_nonces USING btree (nonce, "timestamp");
1849 -- Name: index_oauth_tokens_on_token; Type: INDEX; Schema: public; Owner: -; Tablespace:
1852 CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token);
1856 -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1859 CREATE INDEX index_user_blocks_on_user_id ON user_blocks USING btree (user_id);
1863 -- Name: messages_from_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1866 CREATE INDEX messages_from_user_id_idx ON messages USING btree (from_user_id);
1870 -- Name: messages_to_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1873 CREATE INDEX messages_to_user_id_idx ON messages USING btree (to_user_id);
1877 -- Name: nodes_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1880 CREATE INDEX nodes_changeset_id_idx ON nodes USING btree (changeset_id);
1884 -- Name: nodes_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1887 CREATE INDEX nodes_tile_idx ON nodes USING btree (tile);
1891 -- Name: nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1894 CREATE INDEX nodes_timestamp_idx ON nodes USING btree ("timestamp");
1898 -- Name: note_comments_note_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1901 CREATE INDEX note_comments_note_id_idx ON note_comments USING btree (note_id);
1905 -- Name: notes_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1908 CREATE INDEX notes_created_at_idx ON notes USING btree (created_at);
1912 -- Name: notes_tile_status_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1915 CREATE INDEX notes_tile_status_idx ON notes USING btree (tile, status);
1919 -- Name: notes_updated_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1922 CREATE INDEX notes_updated_at_idx ON notes USING btree (updated_at);
1926 -- Name: points_gpxid_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1929 CREATE INDEX points_gpxid_idx ON gps_points USING btree (gpx_id);
1933 -- Name: points_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1936 CREATE INDEX points_tile_idx ON gps_points USING btree (tile);
1940 -- Name: relation_members_member_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1943 CREATE INDEX relation_members_member_idx ON relation_members USING btree (member_type, member_id);
1947 -- Name: relations_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1950 CREATE INDEX relations_changeset_id_idx ON relations USING btree (changeset_id);
1954 -- Name: relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1957 CREATE INDEX relations_timestamp_idx ON relations USING btree ("timestamp");
1961 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
1964 CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
1968 -- Name: user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1971 CREATE INDEX user_id_idx ON friends USING btree (friend_user_id);
1975 -- Name: user_roles_id_role_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
1978 CREATE UNIQUE INDEX user_roles_id_role_unique ON user_roles USING btree (user_id, role);
1982 -- Name: user_tokens_token_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1985 CREATE UNIQUE INDEX user_tokens_token_idx ON user_tokens USING btree (token);
1989 -- Name: user_tokens_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1992 CREATE INDEX user_tokens_user_id_idx ON user_tokens USING btree (user_id);
1996 -- Name: users_auth_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1999 CREATE UNIQUE INDEX users_auth_idx ON users USING btree (auth_provider, auth_uid);
2003 -- Name: users_display_name_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2006 CREATE UNIQUE INDEX users_display_name_idx ON users USING btree (display_name);
2010 -- Name: users_display_name_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2013 CREATE INDEX users_display_name_lower_idx ON users USING btree (lower((display_name)::text));
2017 -- Name: users_email_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2020 CREATE UNIQUE INDEX users_email_idx ON users USING btree (email);
2024 -- Name: users_email_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2027 CREATE INDEX users_email_lower_idx ON users USING btree (lower((email)::text));
2031 -- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2034 CREATE INDEX way_nodes_node_idx ON way_nodes USING btree (node_id);
2038 -- Name: ways_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2041 CREATE INDEX ways_changeset_id_idx ON ways USING btree (changeset_id);
2045 -- Name: ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2048 CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp");
2052 -- Name: changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2055 ALTER TABLE ONLY changeset_comments
2056 ADD CONSTRAINT changeset_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2060 -- Name: changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2063 ALTER TABLE ONLY changeset_comments
2064 ADD CONSTRAINT changeset_comments_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2068 -- Name: changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2071 ALTER TABLE ONLY changeset_tags
2072 ADD CONSTRAINT changeset_tags_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2076 -- Name: changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2079 ALTER TABLE ONLY changesets_subscribers
2080 ADD CONSTRAINT changesets_subscribers_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2084 -- Name: changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2087 ALTER TABLE ONLY changesets_subscribers
2088 ADD CONSTRAINT changesets_subscribers_subscriber_id_fkey FOREIGN KEY (subscriber_id) REFERENCES users(id);
2092 -- Name: changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2095 ALTER TABLE ONLY changesets
2096 ADD CONSTRAINT changesets_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2100 -- Name: client_applications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2103 ALTER TABLE ONLY client_applications
2104 ADD CONSTRAINT client_applications_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2108 -- Name: current_node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2111 ALTER TABLE ONLY current_node_tags
2112 ADD CONSTRAINT current_node_tags_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2116 -- Name: current_nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2119 ALTER TABLE ONLY current_nodes
2120 ADD CONSTRAINT current_nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2124 -- Name: current_relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2127 ALTER TABLE ONLY current_relation_members
2128 ADD CONSTRAINT current_relation_members_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2132 -- Name: current_relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2135 ALTER TABLE ONLY current_relation_tags
2136 ADD CONSTRAINT current_relation_tags_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2140 -- Name: current_relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2143 ALTER TABLE ONLY current_relations
2144 ADD CONSTRAINT current_relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2148 -- Name: current_way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2151 ALTER TABLE ONLY current_way_nodes
2152 ADD CONSTRAINT current_way_nodes_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2156 -- Name: current_way_nodes_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2159 ALTER TABLE ONLY current_way_nodes
2160 ADD CONSTRAINT current_way_nodes_node_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2164 -- Name: current_way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2167 ALTER TABLE ONLY current_way_tags
2168 ADD CONSTRAINT current_way_tags_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2172 -- Name: current_ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2175 ALTER TABLE ONLY current_ways
2176 ADD CONSTRAINT current_ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2180 -- Name: diary_comments_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2183 ALTER TABLE ONLY diary_comments
2184 ADD CONSTRAINT diary_comments_diary_entry_id_fkey FOREIGN KEY (diary_entry_id) REFERENCES diary_entries(id);
2188 -- Name: diary_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2191 ALTER TABLE ONLY diary_comments
2192 ADD CONSTRAINT diary_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2196 -- Name: diary_entries_language_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2199 ALTER TABLE ONLY diary_entries
2200 ADD CONSTRAINT diary_entries_language_code_fkey FOREIGN KEY (language_code) REFERENCES languages(code);
2204 -- Name: diary_entries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2207 ALTER TABLE ONLY diary_entries
2208 ADD CONSTRAINT diary_entries_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2212 -- Name: friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2215 ALTER TABLE ONLY friends
2216 ADD CONSTRAINT friends_friend_user_id_fkey FOREIGN KEY (friend_user_id) REFERENCES users(id);
2220 -- Name: friends_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2223 ALTER TABLE ONLY friends
2224 ADD CONSTRAINT friends_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2228 -- Name: gps_points_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2231 ALTER TABLE ONLY gps_points
2232 ADD CONSTRAINT gps_points_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2236 -- Name: gpx_file_tags_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2239 ALTER TABLE ONLY gpx_file_tags
2240 ADD CONSTRAINT gpx_file_tags_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2244 -- Name: gpx_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2247 ALTER TABLE ONLY gpx_files
2248 ADD CONSTRAINT gpx_files_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2252 -- Name: messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2255 ALTER TABLE ONLY messages
2256 ADD CONSTRAINT messages_from_user_id_fkey FOREIGN KEY (from_user_id) REFERENCES users(id);
2260 -- Name: messages_to_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2263 ALTER TABLE ONLY messages
2264 ADD CONSTRAINT messages_to_user_id_fkey FOREIGN KEY (to_user_id) REFERENCES users(id);
2268 -- Name: node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2271 ALTER TABLE ONLY node_tags
2272 ADD CONSTRAINT node_tags_id_fkey FOREIGN KEY (node_id, version) REFERENCES nodes(node_id, version);
2276 -- Name: nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2279 ALTER TABLE ONLY nodes
2280 ADD CONSTRAINT nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2284 -- Name: nodes_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2287 ALTER TABLE ONLY nodes
2288 ADD CONSTRAINT nodes_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2292 -- Name: note_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2295 ALTER TABLE ONLY note_comments
2296 ADD CONSTRAINT note_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2300 -- Name: note_comments_note_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2303 ALTER TABLE ONLY note_comments
2304 ADD CONSTRAINT note_comments_note_id_fkey FOREIGN KEY (note_id) REFERENCES notes(id);
2308 -- Name: oauth_tokens_client_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2311 ALTER TABLE ONLY oauth_tokens
2312 ADD CONSTRAINT oauth_tokens_client_application_id_fkey FOREIGN KEY (client_application_id) REFERENCES client_applications(id);
2316 -- Name: oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2319 ALTER TABLE ONLY oauth_tokens
2320 ADD CONSTRAINT oauth_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2324 -- Name: redactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2327 ALTER TABLE ONLY redactions
2328 ADD CONSTRAINT redactions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2332 -- Name: relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2335 ALTER TABLE ONLY relation_members
2336 ADD CONSTRAINT relation_members_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2340 -- Name: relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2343 ALTER TABLE ONLY relation_tags
2344 ADD CONSTRAINT relation_tags_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2348 -- Name: relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2351 ALTER TABLE ONLY relations
2352 ADD CONSTRAINT relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2356 -- Name: relations_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2359 ALTER TABLE ONLY relations
2360 ADD CONSTRAINT relations_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2364 -- Name: user_blocks_moderator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2367 ALTER TABLE ONLY user_blocks
2368 ADD CONSTRAINT user_blocks_moderator_id_fkey FOREIGN KEY (creator_id) REFERENCES users(id);
2372 -- Name: user_blocks_revoker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2375 ALTER TABLE ONLY user_blocks
2376 ADD CONSTRAINT user_blocks_revoker_id_fkey FOREIGN KEY (revoker_id) REFERENCES users(id);
2380 -- Name: user_blocks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2383 ALTER TABLE ONLY user_blocks
2384 ADD CONSTRAINT user_blocks_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2388 -- Name: user_preferences_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2391 ALTER TABLE ONLY user_preferences
2392 ADD CONSTRAINT user_preferences_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2396 -- Name: user_roles_granter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2399 ALTER TABLE ONLY user_roles
2400 ADD CONSTRAINT user_roles_granter_id_fkey FOREIGN KEY (granter_id) REFERENCES users(id);
2404 -- Name: user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2407 ALTER TABLE ONLY user_roles
2408 ADD CONSTRAINT user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2412 -- Name: user_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2415 ALTER TABLE ONLY user_tokens
2416 ADD CONSTRAINT user_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2420 -- Name: way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2423 ALTER TABLE ONLY way_nodes
2424 ADD CONSTRAINT way_nodes_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2428 -- Name: way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2431 ALTER TABLE ONLY way_tags
2432 ADD CONSTRAINT way_tags_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2436 -- Name: ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2439 ALTER TABLE ONLY ways
2440 ADD CONSTRAINT ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2444 -- Name: ways_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2447 ALTER TABLE ONLY ways
2448 ADD CONSTRAINT ways_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2452 -- PostgreSQL database dump complete
2455 SET search_path TO "$user",public;
2457 INSERT INTO schema_migrations (version) VALUES ('1');
2459 INSERT INTO schema_migrations (version) VALUES ('10');
2461 INSERT INTO schema_migrations (version) VALUES ('11');
2463 INSERT INTO schema_migrations (version) VALUES ('12');
2465 INSERT INTO schema_migrations (version) VALUES ('13');
2467 INSERT INTO schema_migrations (version) VALUES ('14');
2469 INSERT INTO schema_migrations (version) VALUES ('15');
2471 INSERT INTO schema_migrations (version) VALUES ('16');
2473 INSERT INTO schema_migrations (version) VALUES ('17');
2475 INSERT INTO schema_migrations (version) VALUES ('18');
2477 INSERT INTO schema_migrations (version) VALUES ('19');
2479 INSERT INTO schema_migrations (version) VALUES ('2');
2481 INSERT INTO schema_migrations (version) VALUES ('20');
2483 INSERT INTO schema_migrations (version) VALUES ('20100513171259');
2485 INSERT INTO schema_migrations (version) VALUES ('20100516124737');
2487 INSERT INTO schema_migrations (version) VALUES ('20100910084426');
2489 INSERT INTO schema_migrations (version) VALUES ('20101114011429');
2491 INSERT INTO schema_migrations (version) VALUES ('20110322001319');
2493 INSERT INTO schema_migrations (version) VALUES ('20110508145337');
2495 INSERT INTO schema_migrations (version) VALUES ('20110521142405');
2497 INSERT INTO schema_migrations (version) VALUES ('20110925112722');
2499 INSERT INTO schema_migrations (version) VALUES ('20111116184519');
2501 INSERT INTO schema_migrations (version) VALUES ('20111212183945');
2503 INSERT INTO schema_migrations (version) VALUES ('20120123184321');
2505 INSERT INTO schema_migrations (version) VALUES ('20120208122334');
2507 INSERT INTO schema_migrations (version) VALUES ('20120208194454');
2509 INSERT INTO schema_migrations (version) VALUES ('20120214210114');
2511 INSERT INTO schema_migrations (version) VALUES ('20120219161649');
2513 INSERT INTO schema_migrations (version) VALUES ('20120318201948');
2515 INSERT INTO schema_migrations (version) VALUES ('20120328090602');
2517 INSERT INTO schema_migrations (version) VALUES ('20120404205604');
2519 INSERT INTO schema_migrations (version) VALUES ('20120808231205');
2521 INSERT INTO schema_migrations (version) VALUES ('20121005195010');
2523 INSERT INTO schema_migrations (version) VALUES ('20121012044047');
2525 INSERT INTO schema_migrations (version) VALUES ('20121119165817');
2527 INSERT INTO schema_migrations (version) VALUES ('20121202155309');
2529 INSERT INTO schema_migrations (version) VALUES ('20121203124841');
2531 INSERT INTO schema_migrations (version) VALUES ('20130328184137');
2533 INSERT INTO schema_migrations (version) VALUES ('20131212124700');
2535 INSERT INTO schema_migrations (version) VALUES ('20140115192822');
2537 INSERT INTO schema_migrations (version) VALUES ('20140117185510');
2539 INSERT INTO schema_migrations (version) VALUES ('20140210003018');
2541 INSERT INTO schema_migrations (version) VALUES ('20140507110937');
2543 INSERT INTO schema_migrations (version) VALUES ('20140519141742');
2545 INSERT INTO schema_migrations (version) VALUES ('20150110152606');
2547 INSERT INTO schema_migrations (version) VALUES ('20150111192335');
2549 INSERT INTO schema_migrations (version) VALUES ('20150222101847');
2551 INSERT INTO schema_migrations (version) VALUES ('21');
2553 INSERT INTO schema_migrations (version) VALUES ('22');
2555 INSERT INTO schema_migrations (version) VALUES ('23');
2557 INSERT INTO schema_migrations (version) VALUES ('24');
2559 INSERT INTO schema_migrations (version) VALUES ('25');
2561 INSERT INTO schema_migrations (version) VALUES ('26');
2563 INSERT INTO schema_migrations (version) VALUES ('27');
2565 INSERT INTO schema_migrations (version) VALUES ('28');
2567 INSERT INTO schema_migrations (version) VALUES ('29');
2569 INSERT INTO schema_migrations (version) VALUES ('3');
2571 INSERT INTO schema_migrations (version) VALUES ('30');
2573 INSERT INTO schema_migrations (version) VALUES ('31');
2575 INSERT INTO schema_migrations (version) VALUES ('32');
2577 INSERT INTO schema_migrations (version) VALUES ('33');
2579 INSERT INTO schema_migrations (version) VALUES ('34');
2581 INSERT INTO schema_migrations (version) VALUES ('35');
2583 INSERT INTO schema_migrations (version) VALUES ('36');
2585 INSERT INTO schema_migrations (version) VALUES ('37');
2587 INSERT INTO schema_migrations (version) VALUES ('38');
2589 INSERT INTO schema_migrations (version) VALUES ('39');
2591 INSERT INTO schema_migrations (version) VALUES ('4');
2593 INSERT INTO schema_migrations (version) VALUES ('40');
2595 INSERT INTO schema_migrations (version) VALUES ('41');
2597 INSERT INTO schema_migrations (version) VALUES ('42');
2599 INSERT INTO schema_migrations (version) VALUES ('43');
2601 INSERT INTO schema_migrations (version) VALUES ('44');
2603 INSERT INTO schema_migrations (version) VALUES ('45');
2605 INSERT INTO schema_migrations (version) VALUES ('46');
2607 INSERT INTO schema_migrations (version) VALUES ('47');
2609 INSERT INTO schema_migrations (version) VALUES ('48');
2611 INSERT INTO schema_migrations (version) VALUES ('49');
2613 INSERT INTO schema_migrations (version) VALUES ('5');
2615 INSERT INTO schema_migrations (version) VALUES ('50');
2617 INSERT INTO schema_migrations (version) VALUES ('51');
2619 INSERT INTO schema_migrations (version) VALUES ('52');
2621 INSERT INTO schema_migrations (version) VALUES ('53');
2623 INSERT INTO schema_migrations (version) VALUES ('54');
2625 INSERT INTO schema_migrations (version) VALUES ('55');
2627 INSERT INTO schema_migrations (version) VALUES ('56');
2629 INSERT INTO schema_migrations (version) VALUES ('57');
2631 INSERT INTO schema_migrations (version) VALUES ('6');
2633 INSERT INTO schema_migrations (version) VALUES ('7');
2635 INSERT INTO schema_migrations (version) VALUES ('8');
2637 INSERT INTO schema_migrations (version) VALUES ('9');