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 (
123 SET default_tablespace = '';
125 SET default_with_oids = false;
128 -- Name: acls; Type: TABLE; Schema: public; Owner: -; Tablespace:
134 k character varying NOT NULL,
136 domain character varying
141 -- Name: acls_id_seq; Type: SEQUENCE; Schema: public; Owner: -
144 CREATE SEQUENCE acls_id_seq
153 -- Name: acls_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
156 ALTER SEQUENCE acls_id_seq OWNED BY acls.id;
160 -- Name: changeset_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
163 CREATE TABLE changeset_comments (
165 changeset_id bigint NOT NULL,
166 author_id bigint NOT NULL,
168 created_at timestamp without time zone NOT NULL,
169 visible boolean NOT NULL
174 -- Name: changeset_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
177 CREATE SEQUENCE changeset_comments_id_seq
186 -- Name: changeset_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
189 ALTER SEQUENCE changeset_comments_id_seq OWNED BY changeset_comments.id;
193 -- Name: changeset_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
196 CREATE TABLE changeset_tags (
197 changeset_id bigint NOT NULL,
198 k character varying DEFAULT ''::character varying NOT NULL,
199 v character varying DEFAULT ''::character varying NOT NULL
204 -- Name: changesets; Type: TABLE; Schema: public; Owner: -; Tablespace:
207 CREATE TABLE changesets (
209 user_id bigint NOT NULL,
210 created_at timestamp without time zone NOT NULL,
215 closed_at timestamp without time zone NOT NULL,
216 num_changes integer DEFAULT 0 NOT NULL
221 -- Name: changesets_id_seq; Type: SEQUENCE; Schema: public; Owner: -
224 CREATE SEQUENCE changesets_id_seq
233 -- Name: changesets_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
236 ALTER SEQUENCE changesets_id_seq OWNED BY changesets.id;
240 -- Name: changesets_subscribers; Type: TABLE; Schema: public; Owner: -; Tablespace:
243 CREATE TABLE changesets_subscribers (
244 subscriber_id bigint NOT NULL,
245 changeset_id bigint NOT NULL
250 -- Name: client_applications; Type: TABLE; Schema: public; Owner: -; Tablespace:
253 CREATE TABLE client_applications (
255 name character varying,
256 url character varying,
257 support_url character varying,
258 callback_url character varying,
259 key character varying(50),
260 secret character varying(50),
262 created_at timestamp without time zone,
263 updated_at timestamp without time zone,
264 allow_read_prefs boolean DEFAULT false NOT NULL,
265 allow_write_prefs boolean DEFAULT false NOT NULL,
266 allow_write_diary boolean DEFAULT false NOT NULL,
267 allow_write_api boolean DEFAULT false NOT NULL,
268 allow_read_gpx boolean DEFAULT false NOT NULL,
269 allow_write_gpx boolean DEFAULT false NOT NULL,
270 allow_write_notes boolean DEFAULT false NOT NULL
275 -- Name: client_applications_id_seq; Type: SEQUENCE; Schema: public; Owner: -
278 CREATE SEQUENCE client_applications_id_seq
287 -- Name: client_applications_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
290 ALTER SEQUENCE client_applications_id_seq OWNED BY client_applications.id;
294 -- Name: current_node_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
297 CREATE TABLE current_node_tags (
298 node_id bigint NOT NULL,
299 k character varying DEFAULT ''::character varying NOT NULL,
300 v character varying DEFAULT ''::character varying NOT NULL
305 -- Name: current_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
308 CREATE TABLE current_nodes (
310 latitude integer NOT NULL,
311 longitude integer NOT NULL,
312 changeset_id bigint NOT NULL,
313 visible boolean NOT NULL,
314 "timestamp" timestamp without time zone NOT NULL,
315 tile bigint NOT NULL,
316 version bigint NOT NULL
321 -- Name: current_nodes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
324 CREATE SEQUENCE current_nodes_id_seq
333 -- Name: current_nodes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
336 ALTER SEQUENCE current_nodes_id_seq OWNED BY current_nodes.id;
340 -- Name: current_relation_members; Type: TABLE; Schema: public; Owner: -; Tablespace:
343 CREATE TABLE current_relation_members (
344 relation_id bigint NOT NULL,
345 member_type nwr_enum NOT NULL,
346 member_id bigint NOT NULL,
347 member_role character varying NOT NULL,
348 sequence_id integer DEFAULT 0 NOT NULL
353 -- Name: current_relation_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
356 CREATE TABLE current_relation_tags (
357 relation_id bigint NOT NULL,
358 k character varying DEFAULT ''::character varying NOT NULL,
359 v character varying DEFAULT ''::character varying NOT NULL
364 -- Name: current_relations; Type: TABLE; Schema: public; Owner: -; Tablespace:
367 CREATE TABLE current_relations (
369 changeset_id bigint NOT NULL,
370 "timestamp" timestamp without time zone NOT NULL,
371 visible boolean NOT NULL,
372 version bigint NOT NULL
377 -- Name: current_relations_id_seq; Type: SEQUENCE; Schema: public; Owner: -
380 CREATE SEQUENCE current_relations_id_seq
389 -- Name: current_relations_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
392 ALTER SEQUENCE current_relations_id_seq OWNED BY current_relations.id;
396 -- Name: current_way_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
399 CREATE TABLE current_way_nodes (
400 way_id bigint NOT NULL,
401 node_id bigint NOT NULL,
402 sequence_id bigint NOT NULL
407 -- Name: current_way_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
410 CREATE TABLE current_way_tags (
411 way_id bigint NOT NULL,
412 k character varying DEFAULT ''::character varying NOT NULL,
413 v character varying DEFAULT ''::character varying NOT NULL
418 -- Name: current_ways; Type: TABLE; Schema: public; Owner: -; Tablespace:
421 CREATE TABLE current_ways (
423 changeset_id bigint NOT NULL,
424 "timestamp" timestamp without time zone NOT NULL,
425 visible boolean NOT NULL,
426 version bigint NOT NULL
431 -- Name: current_ways_id_seq; Type: SEQUENCE; Schema: public; Owner: -
434 CREATE SEQUENCE current_ways_id_seq
443 -- Name: current_ways_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
446 ALTER SEQUENCE current_ways_id_seq OWNED BY current_ways.id;
450 -- Name: diary_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
453 CREATE TABLE diary_comments (
455 diary_entry_id bigint NOT NULL,
456 user_id bigint NOT NULL,
458 created_at timestamp without time zone NOT NULL,
459 updated_at timestamp without time zone NOT NULL,
460 visible boolean DEFAULT true NOT NULL,
461 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
466 -- Name: diary_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
469 CREATE SEQUENCE diary_comments_id_seq
478 -- Name: diary_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
481 ALTER SEQUENCE diary_comments_id_seq OWNED BY diary_comments.id;
485 -- Name: diary_entries; Type: TABLE; Schema: public; Owner: -; Tablespace:
488 CREATE TABLE diary_entries (
490 user_id bigint NOT NULL,
491 title character varying NOT NULL,
493 created_at timestamp without time zone NOT NULL,
494 updated_at timestamp without time zone NOT NULL,
495 latitude double precision,
496 longitude double precision,
497 language_code character varying DEFAULT 'en'::character varying NOT NULL,
498 visible boolean DEFAULT true NOT NULL,
499 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
504 -- Name: diary_entries_id_seq; Type: SEQUENCE; Schema: public; Owner: -
507 CREATE SEQUENCE diary_entries_id_seq
516 -- Name: diary_entries_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
519 ALTER SEQUENCE diary_entries_id_seq OWNED BY diary_entries.id;
523 -- Name: friends; Type: TABLE; Schema: public; Owner: -; Tablespace:
526 CREATE TABLE friends (
528 user_id bigint NOT NULL,
529 friend_user_id bigint NOT NULL
534 -- Name: friends_id_seq; Type: SEQUENCE; Schema: public; Owner: -
537 CREATE SEQUENCE friends_id_seq
546 -- Name: friends_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
549 ALTER SEQUENCE friends_id_seq OWNED BY friends.id;
553 -- Name: gps_points; Type: TABLE; Schema: public; Owner: -; Tablespace:
556 CREATE TABLE gps_points (
557 altitude double precision,
558 trackid integer NOT NULL,
559 latitude integer NOT NULL,
560 longitude integer NOT NULL,
561 gpx_id bigint NOT NULL,
562 "timestamp" timestamp without time zone,
568 -- Name: gpx_file_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
571 CREATE TABLE gpx_file_tags (
572 gpx_id bigint DEFAULT 0 NOT NULL,
573 tag character varying NOT NULL,
579 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE; Schema: public; Owner: -
582 CREATE SEQUENCE gpx_file_tags_id_seq
591 -- Name: gpx_file_tags_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
594 ALTER SEQUENCE gpx_file_tags_id_seq OWNED BY gpx_file_tags.id;
598 -- Name: gpx_files; Type: TABLE; Schema: public; Owner: -; Tablespace:
601 CREATE TABLE gpx_files (
603 user_id bigint NOT NULL,
604 visible boolean DEFAULT true NOT NULL,
605 name character varying DEFAULT ''::character varying NOT NULL,
607 latitude double precision,
608 longitude double precision,
609 "timestamp" timestamp without time zone NOT NULL,
610 description character varying DEFAULT ''::character varying NOT NULL,
611 inserted boolean NOT NULL,
612 visibility gpx_visibility_enum DEFAULT 'public'::gpx_visibility_enum NOT NULL
617 -- Name: gpx_files_id_seq; Type: SEQUENCE; Schema: public; Owner: -
620 CREATE SEQUENCE gpx_files_id_seq
629 -- Name: gpx_files_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
632 ALTER SEQUENCE gpx_files_id_seq OWNED BY gpx_files.id;
636 -- Name: languages; Type: TABLE; Schema: public; Owner: -; Tablespace:
639 CREATE TABLE languages (
640 code character varying NOT NULL,
641 english_name character varying NOT NULL,
642 native_name character varying
647 -- Name: messages; Type: TABLE; Schema: public; Owner: -; Tablespace:
650 CREATE TABLE messages (
652 from_user_id bigint NOT NULL,
653 title character varying NOT NULL,
655 sent_on timestamp without time zone NOT NULL,
656 message_read boolean DEFAULT false NOT NULL,
657 to_user_id bigint NOT NULL,
658 to_user_visible boolean DEFAULT true NOT NULL,
659 from_user_visible boolean DEFAULT true NOT NULL,
660 body_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
665 -- Name: messages_id_seq; Type: SEQUENCE; Schema: public; Owner: -
668 CREATE SEQUENCE messages_id_seq
677 -- Name: messages_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
680 ALTER SEQUENCE messages_id_seq OWNED BY messages.id;
684 -- Name: node_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
687 CREATE TABLE node_tags (
688 node_id bigint NOT NULL,
689 version bigint NOT NULL,
690 k character varying DEFAULT ''::character varying NOT NULL,
691 v character varying DEFAULT ''::character varying NOT NULL
696 -- Name: nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
700 node_id bigint NOT NULL,
701 latitude integer NOT NULL,
702 longitude integer NOT NULL,
703 changeset_id bigint NOT NULL,
704 visible boolean NOT NULL,
705 "timestamp" timestamp without time zone NOT NULL,
706 tile bigint NOT NULL,
707 version bigint NOT NULL,
713 -- Name: note_comments; Type: TABLE; Schema: public; Owner: -; Tablespace:
716 CREATE TABLE note_comments (
718 note_id bigint NOT NULL,
719 visible boolean NOT NULL,
720 created_at timestamp without time zone NOT NULL,
724 event note_event_enum
729 -- Name: note_comments_id_seq; Type: SEQUENCE; Schema: public; Owner: -
732 CREATE SEQUENCE note_comments_id_seq
741 -- Name: note_comments_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
744 ALTER SEQUENCE note_comments_id_seq OWNED BY note_comments.id;
748 -- Name: notes; Type: TABLE; Schema: public; Owner: -; Tablespace:
753 latitude integer NOT NULL,
754 longitude integer NOT NULL,
755 tile bigint NOT NULL,
756 updated_at timestamp without time zone NOT NULL,
757 created_at timestamp without time zone NOT NULL,
758 status note_status_enum NOT NULL,
759 closed_at timestamp without time zone
764 -- Name: notes_id_seq; Type: SEQUENCE; Schema: public; Owner: -
767 CREATE SEQUENCE notes_id_seq
776 -- Name: notes_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
779 ALTER SEQUENCE notes_id_seq OWNED BY notes.id;
783 -- Name: oauth_nonces; Type: TABLE; Schema: public; Owner: -; Tablespace:
786 CREATE TABLE oauth_nonces (
788 nonce character varying,
790 created_at timestamp without time zone,
791 updated_at timestamp without time zone
796 -- Name: oauth_nonces_id_seq; Type: SEQUENCE; Schema: public; Owner: -
799 CREATE SEQUENCE oauth_nonces_id_seq
808 -- Name: oauth_nonces_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
811 ALTER SEQUENCE oauth_nonces_id_seq OWNED BY oauth_nonces.id;
815 -- Name: oauth_tokens; Type: TABLE; Schema: public; Owner: -; Tablespace:
818 CREATE TABLE oauth_tokens (
821 type character varying(20),
822 client_application_id integer,
823 token character varying(50),
824 secret character varying(50),
825 authorized_at timestamp without time zone,
826 invalidated_at timestamp without time zone,
827 created_at timestamp without time zone,
828 updated_at timestamp without time zone,
829 allow_read_prefs boolean DEFAULT false NOT NULL,
830 allow_write_prefs boolean DEFAULT false NOT NULL,
831 allow_write_diary boolean DEFAULT false NOT NULL,
832 allow_write_api boolean DEFAULT false NOT NULL,
833 allow_read_gpx boolean DEFAULT false NOT NULL,
834 allow_write_gpx boolean DEFAULT false NOT NULL,
835 callback_url character varying,
836 verifier character varying(20),
837 scope character varying,
838 valid_to timestamp without time zone,
839 allow_write_notes boolean DEFAULT false NOT NULL
844 -- Name: oauth_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
847 CREATE SEQUENCE oauth_tokens_id_seq
856 -- Name: oauth_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
859 ALTER SEQUENCE oauth_tokens_id_seq OWNED BY oauth_tokens.id;
863 -- Name: redactions; Type: TABLE; Schema: public; Owner: -; Tablespace:
866 CREATE TABLE redactions (
868 title character varying,
870 created_at timestamp without time zone,
871 updated_at timestamp without time zone,
872 user_id bigint NOT NULL,
873 description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
878 -- Name: redactions_id_seq; Type: SEQUENCE; Schema: public; Owner: -
881 CREATE SEQUENCE redactions_id_seq
890 -- Name: redactions_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
893 ALTER SEQUENCE redactions_id_seq OWNED BY redactions.id;
897 -- Name: relation_members; Type: TABLE; Schema: public; Owner: -; Tablespace:
900 CREATE TABLE relation_members (
901 relation_id bigint DEFAULT 0 NOT NULL,
902 member_type nwr_enum NOT NULL,
903 member_id bigint NOT NULL,
904 member_role character varying NOT NULL,
905 version bigint DEFAULT 0 NOT NULL,
906 sequence_id integer DEFAULT 0 NOT NULL
911 -- Name: relation_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
914 CREATE TABLE relation_tags (
915 relation_id bigint DEFAULT 0 NOT NULL,
916 k character varying DEFAULT ''::character varying NOT NULL,
917 v character varying DEFAULT ''::character varying NOT NULL,
918 version bigint NOT NULL
923 -- Name: relations; Type: TABLE; Schema: public; Owner: -; Tablespace:
926 CREATE TABLE relations (
927 relation_id bigint DEFAULT 0 NOT NULL,
928 changeset_id bigint NOT NULL,
929 "timestamp" timestamp without time zone NOT NULL,
930 version bigint NOT NULL,
931 visible boolean DEFAULT true NOT NULL,
937 -- Name: schema_migrations; Type: TABLE; Schema: public; Owner: -; Tablespace:
940 CREATE TABLE schema_migrations (
941 version character varying NOT NULL
946 -- Name: user_blocks; Type: TABLE; Schema: public; Owner: -; Tablespace:
949 CREATE TABLE user_blocks (
951 user_id bigint NOT NULL,
952 creator_id bigint NOT NULL,
953 reason text NOT NULL,
954 ends_at timestamp without time zone NOT NULL,
955 needs_view boolean DEFAULT false NOT NULL,
957 created_at timestamp without time zone,
958 updated_at timestamp without time zone,
959 reason_format format_enum DEFAULT 'markdown'::format_enum NOT NULL
964 -- Name: user_blocks_id_seq; Type: SEQUENCE; Schema: public; Owner: -
967 CREATE SEQUENCE user_blocks_id_seq
976 -- Name: user_blocks_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
979 ALTER SEQUENCE user_blocks_id_seq OWNED BY user_blocks.id;
983 -- Name: user_preferences; Type: TABLE; Schema: public; Owner: -; Tablespace:
986 CREATE TABLE user_preferences (
987 user_id bigint NOT NULL,
988 k character varying NOT NULL,
989 v character varying NOT NULL
994 -- Name: user_roles; Type: TABLE; Schema: public; Owner: -; Tablespace:
997 CREATE TABLE user_roles (
999 user_id bigint NOT NULL,
1000 role user_role_enum NOT NULL,
1001 created_at timestamp without time zone,
1002 updated_at timestamp without time zone,
1003 granter_id bigint NOT NULL
1008 -- Name: user_roles_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1011 CREATE SEQUENCE user_roles_id_seq
1020 -- Name: user_roles_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1023 ALTER SEQUENCE user_roles_id_seq OWNED BY user_roles.id;
1027 -- Name: user_tokens; Type: TABLE; Schema: public; Owner: -; Tablespace:
1030 CREATE TABLE user_tokens (
1032 user_id bigint NOT NULL,
1033 token character varying NOT NULL,
1034 expiry timestamp without time zone NOT NULL,
1040 -- Name: user_tokens_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1043 CREATE SEQUENCE user_tokens_id_seq
1052 -- Name: user_tokens_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1055 ALTER SEQUENCE user_tokens_id_seq OWNED BY user_tokens.id;
1059 -- Name: users; Type: TABLE; Schema: public; Owner: -; Tablespace:
1062 CREATE TABLE users (
1063 email character varying NOT NULL,
1065 pass_crypt character varying NOT NULL,
1066 creation_time timestamp without time zone NOT NULL,
1067 display_name character varying DEFAULT ''::character varying NOT NULL,
1068 data_public boolean DEFAULT false NOT NULL,
1069 description text DEFAULT ''::text NOT NULL,
1070 home_lat double precision,
1071 home_lon double precision,
1072 home_zoom smallint DEFAULT 3,
1073 nearby integer DEFAULT 50,
1074 pass_salt character varying,
1075 image_file_name text,
1076 email_valid boolean DEFAULT false NOT NULL,
1077 new_email character varying,
1078 creation_ip character varying,
1079 languages character varying,
1080 status user_status_enum DEFAULT 'pending'::user_status_enum NOT NULL,
1081 terms_agreed timestamp without time zone,
1082 consider_pd boolean DEFAULT false NOT NULL,
1083 openid_url character varying,
1084 preferred_editor character varying,
1085 terms_seen boolean DEFAULT false NOT NULL,
1086 description_format format_enum DEFAULT 'markdown'::format_enum NOT NULL,
1087 image_fingerprint character varying,
1088 changesets_count integer DEFAULT 0 NOT NULL,
1089 traces_count integer DEFAULT 0 NOT NULL,
1090 diary_entries_count integer DEFAULT 0 NOT NULL,
1091 image_use_gravatar boolean DEFAULT true NOT NULL,
1092 image_content_type character varying
1097 -- Name: users_id_seq; Type: SEQUENCE; Schema: public; Owner: -
1100 CREATE SEQUENCE users_id_seq
1109 -- Name: users_id_seq; Type: SEQUENCE OWNED BY; Schema: public; Owner: -
1112 ALTER SEQUENCE users_id_seq OWNED BY users.id;
1116 -- Name: way_nodes; Type: TABLE; Schema: public; Owner: -; Tablespace:
1119 CREATE TABLE way_nodes (
1120 way_id bigint NOT NULL,
1121 node_id bigint NOT NULL,
1122 version bigint NOT NULL,
1123 sequence_id bigint NOT NULL
1128 -- Name: way_tags; Type: TABLE; Schema: public; Owner: -; Tablespace:
1131 CREATE TABLE way_tags (
1132 way_id bigint DEFAULT 0 NOT NULL,
1133 k character varying NOT NULL,
1134 v character varying NOT NULL,
1135 version bigint NOT NULL
1140 -- Name: ways; Type: TABLE; Schema: public; Owner: -; Tablespace:
1144 way_id bigint DEFAULT 0 NOT NULL,
1145 changeset_id bigint NOT NULL,
1146 "timestamp" timestamp without time zone NOT NULL,
1147 version bigint NOT NULL,
1148 visible boolean DEFAULT true NOT NULL,
1149 redaction_id integer
1154 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1157 ALTER TABLE ONLY acls ALTER COLUMN id SET DEFAULT nextval('acls_id_seq'::regclass);
1161 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1164 ALTER TABLE ONLY changeset_comments ALTER COLUMN id SET DEFAULT nextval('changeset_comments_id_seq'::regclass);
1168 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1171 ALTER TABLE ONLY changesets ALTER COLUMN id SET DEFAULT nextval('changesets_id_seq'::regclass);
1175 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1178 ALTER TABLE ONLY client_applications ALTER COLUMN id SET DEFAULT nextval('client_applications_id_seq'::regclass);
1182 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1185 ALTER TABLE ONLY current_nodes ALTER COLUMN id SET DEFAULT nextval('current_nodes_id_seq'::regclass);
1189 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1192 ALTER TABLE ONLY current_relations ALTER COLUMN id SET DEFAULT nextval('current_relations_id_seq'::regclass);
1196 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1199 ALTER TABLE ONLY current_ways ALTER COLUMN id SET DEFAULT nextval('current_ways_id_seq'::regclass);
1203 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1206 ALTER TABLE ONLY diary_comments ALTER COLUMN id SET DEFAULT nextval('diary_comments_id_seq'::regclass);
1210 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1213 ALTER TABLE ONLY diary_entries ALTER COLUMN id SET DEFAULT nextval('diary_entries_id_seq'::regclass);
1217 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1220 ALTER TABLE ONLY friends ALTER COLUMN id SET DEFAULT nextval('friends_id_seq'::regclass);
1224 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1227 ALTER TABLE ONLY gpx_file_tags ALTER COLUMN id SET DEFAULT nextval('gpx_file_tags_id_seq'::regclass);
1231 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1234 ALTER TABLE ONLY gpx_files ALTER COLUMN id SET DEFAULT nextval('gpx_files_id_seq'::regclass);
1238 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1241 ALTER TABLE ONLY messages ALTER COLUMN id SET DEFAULT nextval('messages_id_seq'::regclass);
1245 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1248 ALTER TABLE ONLY note_comments ALTER COLUMN id SET DEFAULT nextval('note_comments_id_seq'::regclass);
1252 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1255 ALTER TABLE ONLY notes ALTER COLUMN id SET DEFAULT nextval('notes_id_seq'::regclass);
1259 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1262 ALTER TABLE ONLY oauth_nonces ALTER COLUMN id SET DEFAULT nextval('oauth_nonces_id_seq'::regclass);
1266 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1269 ALTER TABLE ONLY oauth_tokens ALTER COLUMN id SET DEFAULT nextval('oauth_tokens_id_seq'::regclass);
1273 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1276 ALTER TABLE ONLY redactions ALTER COLUMN id SET DEFAULT nextval('redactions_id_seq'::regclass);
1280 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1283 ALTER TABLE ONLY user_blocks ALTER COLUMN id SET DEFAULT nextval('user_blocks_id_seq'::regclass);
1287 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1290 ALTER TABLE ONLY user_roles ALTER COLUMN id SET DEFAULT nextval('user_roles_id_seq'::regclass);
1294 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1297 ALTER TABLE ONLY user_tokens ALTER COLUMN id SET DEFAULT nextval('user_tokens_id_seq'::regclass);
1301 -- Name: id; Type: DEFAULT; Schema: public; Owner: -
1304 ALTER TABLE ONLY users ALTER COLUMN id SET DEFAULT nextval('users_id_seq'::regclass);
1308 -- Name: acls_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1311 ALTER TABLE ONLY acls
1312 ADD CONSTRAINT acls_pkey PRIMARY KEY (id);
1316 -- Name: changeset_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1319 ALTER TABLE ONLY changeset_comments
1320 ADD CONSTRAINT changeset_comments_pkey PRIMARY KEY (id);
1324 -- Name: changesets_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1327 ALTER TABLE ONLY changesets
1328 ADD CONSTRAINT changesets_pkey PRIMARY KEY (id);
1332 -- Name: client_applications_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1335 ALTER TABLE ONLY client_applications
1336 ADD CONSTRAINT client_applications_pkey PRIMARY KEY (id);
1340 -- Name: current_node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1343 ALTER TABLE ONLY current_node_tags
1344 ADD CONSTRAINT current_node_tags_pkey PRIMARY KEY (node_id, k);
1348 -- Name: current_nodes_pkey1; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1351 ALTER TABLE ONLY current_nodes
1352 ADD CONSTRAINT current_nodes_pkey1 PRIMARY KEY (id);
1356 -- Name: current_relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1359 ALTER TABLE ONLY current_relation_members
1360 ADD CONSTRAINT current_relation_members_pkey PRIMARY KEY (relation_id, member_type, member_id, member_role, sequence_id);
1364 -- Name: current_relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1367 ALTER TABLE ONLY current_relation_tags
1368 ADD CONSTRAINT current_relation_tags_pkey PRIMARY KEY (relation_id, k);
1372 -- Name: current_relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1375 ALTER TABLE ONLY current_relations
1376 ADD CONSTRAINT current_relations_pkey PRIMARY KEY (id);
1380 -- Name: current_way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1383 ALTER TABLE ONLY current_way_nodes
1384 ADD CONSTRAINT current_way_nodes_pkey PRIMARY KEY (way_id, sequence_id);
1388 -- Name: current_way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1391 ALTER TABLE ONLY current_way_tags
1392 ADD CONSTRAINT current_way_tags_pkey PRIMARY KEY (way_id, k);
1396 -- Name: current_ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1399 ALTER TABLE ONLY current_ways
1400 ADD CONSTRAINT current_ways_pkey PRIMARY KEY (id);
1404 -- Name: diary_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1407 ALTER TABLE ONLY diary_comments
1408 ADD CONSTRAINT diary_comments_pkey PRIMARY KEY (id);
1412 -- Name: diary_entries_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1415 ALTER TABLE ONLY diary_entries
1416 ADD CONSTRAINT diary_entries_pkey PRIMARY KEY (id);
1420 -- Name: friends_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1423 ALTER TABLE ONLY friends
1424 ADD CONSTRAINT friends_pkey PRIMARY KEY (id);
1428 -- Name: gpx_file_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1431 ALTER TABLE ONLY gpx_file_tags
1432 ADD CONSTRAINT gpx_file_tags_pkey PRIMARY KEY (id);
1436 -- Name: gpx_files_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1439 ALTER TABLE ONLY gpx_files
1440 ADD CONSTRAINT gpx_files_pkey PRIMARY KEY (id);
1444 -- Name: languages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1447 ALTER TABLE ONLY languages
1448 ADD CONSTRAINT languages_pkey PRIMARY KEY (code);
1452 -- Name: messages_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1455 ALTER TABLE ONLY messages
1456 ADD CONSTRAINT messages_pkey PRIMARY KEY (id);
1460 -- Name: node_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1463 ALTER TABLE ONLY node_tags
1464 ADD CONSTRAINT node_tags_pkey PRIMARY KEY (node_id, version, k);
1468 -- Name: nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1471 ALTER TABLE ONLY nodes
1472 ADD CONSTRAINT nodes_pkey PRIMARY KEY (node_id, version);
1476 -- Name: note_comments_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1479 ALTER TABLE ONLY note_comments
1480 ADD CONSTRAINT note_comments_pkey PRIMARY KEY (id);
1484 -- Name: notes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1487 ALTER TABLE ONLY notes
1488 ADD CONSTRAINT notes_pkey PRIMARY KEY (id);
1492 -- Name: oauth_nonces_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1495 ALTER TABLE ONLY oauth_nonces
1496 ADD CONSTRAINT oauth_nonces_pkey PRIMARY KEY (id);
1500 -- Name: oauth_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1503 ALTER TABLE ONLY oauth_tokens
1504 ADD CONSTRAINT oauth_tokens_pkey PRIMARY KEY (id);
1508 -- Name: redactions_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1511 ALTER TABLE ONLY redactions
1512 ADD CONSTRAINT redactions_pkey PRIMARY KEY (id);
1516 -- Name: relation_members_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1519 ALTER TABLE ONLY relation_members
1520 ADD CONSTRAINT relation_members_pkey PRIMARY KEY (relation_id, version, member_type, member_id, member_role, sequence_id);
1524 -- Name: relation_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1527 ALTER TABLE ONLY relation_tags
1528 ADD CONSTRAINT relation_tags_pkey PRIMARY KEY (relation_id, version, k);
1532 -- Name: relations_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1535 ALTER TABLE ONLY relations
1536 ADD CONSTRAINT relations_pkey PRIMARY KEY (relation_id, version);
1540 -- Name: user_blocks_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1543 ALTER TABLE ONLY user_blocks
1544 ADD CONSTRAINT user_blocks_pkey PRIMARY KEY (id);
1548 -- Name: user_preferences_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1551 ALTER TABLE ONLY user_preferences
1552 ADD CONSTRAINT user_preferences_pkey PRIMARY KEY (user_id, k);
1556 -- Name: user_roles_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1559 ALTER TABLE ONLY user_roles
1560 ADD CONSTRAINT user_roles_pkey PRIMARY KEY (id);
1564 -- Name: user_tokens_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1567 ALTER TABLE ONLY user_tokens
1568 ADD CONSTRAINT user_tokens_pkey PRIMARY KEY (id);
1572 -- Name: users_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1575 ALTER TABLE ONLY users
1576 ADD CONSTRAINT users_pkey PRIMARY KEY (id);
1580 -- Name: way_nodes_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1583 ALTER TABLE ONLY way_nodes
1584 ADD CONSTRAINT way_nodes_pkey PRIMARY KEY (way_id, version, sequence_id);
1588 -- Name: way_tags_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1591 ALTER TABLE ONLY way_tags
1592 ADD CONSTRAINT way_tags_pkey PRIMARY KEY (way_id, version, k);
1596 -- Name: ways_pkey; Type: CONSTRAINT; Schema: public; Owner: -; Tablespace:
1599 ALTER TABLE ONLY ways
1600 ADD CONSTRAINT ways_pkey PRIMARY KEY (way_id, version);
1604 -- Name: acls_k_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1607 CREATE INDEX acls_k_idx ON acls USING btree (k);
1611 -- Name: changeset_tags_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1614 CREATE INDEX changeset_tags_id_idx ON changeset_tags USING btree (changeset_id);
1618 -- Name: changesets_bbox_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1621 CREATE INDEX changesets_bbox_idx ON changesets USING gist (min_lat, max_lat, min_lon, max_lon);
1625 -- Name: changesets_closed_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1628 CREATE INDEX changesets_closed_at_idx ON changesets USING btree (closed_at);
1632 -- Name: changesets_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1635 CREATE INDEX changesets_created_at_idx ON changesets USING btree (created_at);
1639 -- Name: changesets_user_id_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1642 CREATE INDEX changesets_user_id_created_at_idx ON changesets USING btree (user_id, created_at);
1646 -- Name: changesets_user_id_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1649 CREATE INDEX changesets_user_id_id_idx ON changesets USING btree (user_id, id);
1653 -- Name: current_nodes_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1656 CREATE INDEX current_nodes_tile_idx ON current_nodes USING btree (tile);
1660 -- Name: current_nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1663 CREATE INDEX current_nodes_timestamp_idx ON current_nodes USING btree ("timestamp");
1667 -- Name: current_relation_members_member_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1670 CREATE INDEX current_relation_members_member_idx ON current_relation_members USING btree (member_type, member_id);
1674 -- Name: current_relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1677 CREATE INDEX current_relations_timestamp_idx ON current_relations USING btree ("timestamp");
1681 -- Name: current_way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1684 CREATE INDEX current_way_nodes_node_idx ON current_way_nodes USING btree (node_id);
1688 -- Name: current_ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1691 CREATE INDEX current_ways_timestamp_idx ON current_ways USING btree ("timestamp");
1695 -- Name: diary_comment_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1698 CREATE INDEX diary_comment_user_id_created_at_index ON diary_comments USING btree (user_id, created_at);
1702 -- Name: diary_comments_entry_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1705 CREATE UNIQUE INDEX diary_comments_entry_id_idx ON diary_comments USING btree (diary_entry_id, id);
1709 -- Name: diary_entry_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1712 CREATE INDEX diary_entry_created_at_index ON diary_entries USING btree (created_at);
1716 -- Name: diary_entry_language_code_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1719 CREATE INDEX diary_entry_language_code_created_at_index ON diary_entries USING btree (language_code, created_at);
1723 -- Name: diary_entry_user_id_created_at_index; Type: INDEX; Schema: public; Owner: -; Tablespace:
1726 CREATE INDEX diary_entry_user_id_created_at_index ON diary_entries USING btree (user_id, created_at);
1730 -- Name: friends_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1733 CREATE INDEX friends_user_id_idx ON friends USING btree (user_id);
1737 -- Name: gpx_file_tags_gpxid_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1740 CREATE INDEX gpx_file_tags_gpxid_idx ON gpx_file_tags USING btree (gpx_id);
1744 -- Name: gpx_file_tags_tag_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1747 CREATE INDEX gpx_file_tags_tag_idx ON gpx_file_tags USING btree (tag);
1751 -- Name: gpx_files_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1754 CREATE INDEX gpx_files_timestamp_idx ON gpx_files USING btree ("timestamp");
1758 -- Name: gpx_files_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1761 CREATE INDEX gpx_files_user_id_idx ON gpx_files USING btree (user_id);
1765 -- Name: gpx_files_visible_visibility_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1768 CREATE INDEX gpx_files_visible_visibility_idx ON gpx_files USING btree (visible, visibility);
1772 -- Name: index_changeset_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
1775 CREATE INDEX index_changeset_comments_on_created_at ON changeset_comments USING btree (created_at);
1779 -- Name: index_changesets_subscribers_on_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1782 CREATE INDEX index_changesets_subscribers_on_changeset_id ON changesets_subscribers USING btree (changeset_id);
1786 -- Name: index_changesets_subscribers_on_subscriber_id_and_changeset_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1789 CREATE UNIQUE INDEX index_changesets_subscribers_on_subscriber_id_and_changeset_id ON changesets_subscribers USING btree (subscriber_id, changeset_id);
1793 -- Name: index_client_applications_on_key; Type: INDEX; Schema: public; Owner: -; Tablespace:
1796 CREATE UNIQUE INDEX index_client_applications_on_key ON client_applications USING btree (key);
1800 -- Name: index_note_comments_on_body; Type: INDEX; Schema: public; Owner: -; Tablespace:
1803 CREATE INDEX index_note_comments_on_body ON note_comments USING gin (to_tsvector('english'::regconfig, body));
1807 -- Name: index_note_comments_on_created_at; Type: INDEX; Schema: public; Owner: -; Tablespace:
1810 CREATE INDEX index_note_comments_on_created_at ON note_comments USING btree (created_at);
1814 -- Name: index_oauth_nonces_on_nonce_and_timestamp; Type: INDEX; Schema: public; Owner: -; Tablespace:
1817 CREATE UNIQUE INDEX index_oauth_nonces_on_nonce_and_timestamp ON oauth_nonces USING btree (nonce, "timestamp");
1821 -- Name: index_oauth_tokens_on_token; Type: INDEX; Schema: public; Owner: -; Tablespace:
1824 CREATE UNIQUE INDEX index_oauth_tokens_on_token ON oauth_tokens USING btree (token);
1828 -- Name: index_user_blocks_on_user_id; Type: INDEX; Schema: public; Owner: -; Tablespace:
1831 CREATE INDEX index_user_blocks_on_user_id ON user_blocks USING btree (user_id);
1835 -- Name: messages_from_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1838 CREATE INDEX messages_from_user_id_idx ON messages USING btree (from_user_id);
1842 -- Name: messages_to_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1845 CREATE INDEX messages_to_user_id_idx ON messages USING btree (to_user_id);
1849 -- Name: nodes_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1852 CREATE INDEX nodes_changeset_id_idx ON nodes USING btree (changeset_id);
1856 -- Name: nodes_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1859 CREATE INDEX nodes_tile_idx ON nodes USING btree (tile);
1863 -- Name: nodes_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1866 CREATE INDEX nodes_timestamp_idx ON nodes USING btree ("timestamp");
1870 -- Name: note_comments_note_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1873 CREATE INDEX note_comments_note_id_idx ON note_comments USING btree (note_id);
1877 -- Name: notes_created_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1880 CREATE INDEX notes_created_at_idx ON notes USING btree (created_at);
1884 -- Name: notes_tile_status_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1887 CREATE INDEX notes_tile_status_idx ON notes USING btree (tile, status);
1891 -- Name: notes_updated_at_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1894 CREATE INDEX notes_updated_at_idx ON notes USING btree (updated_at);
1898 -- Name: points_gpxid_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1901 CREATE INDEX points_gpxid_idx ON gps_points USING btree (gpx_id);
1905 -- Name: points_tile_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1908 CREATE INDEX points_tile_idx ON gps_points USING btree (tile);
1912 -- Name: relation_members_member_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1915 CREATE INDEX relation_members_member_idx ON relation_members USING btree (member_type, member_id);
1919 -- Name: relations_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1922 CREATE INDEX relations_changeset_id_idx ON relations USING btree (changeset_id);
1926 -- Name: relations_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1929 CREATE INDEX relations_timestamp_idx ON relations USING btree ("timestamp");
1933 -- Name: unique_schema_migrations; Type: INDEX; Schema: public; Owner: -; Tablespace:
1936 CREATE UNIQUE INDEX unique_schema_migrations ON schema_migrations USING btree (version);
1940 -- Name: user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1943 CREATE INDEX user_id_idx ON friends USING btree (friend_user_id);
1947 -- Name: user_openid_url_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1950 CREATE UNIQUE INDEX user_openid_url_idx ON users USING btree (openid_url);
1954 -- Name: user_roles_id_role_unique; Type: INDEX; Schema: public; Owner: -; Tablespace:
1957 CREATE UNIQUE INDEX user_roles_id_role_unique ON user_roles USING btree (user_id, role);
1961 -- Name: user_tokens_token_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1964 CREATE UNIQUE INDEX user_tokens_token_idx ON user_tokens USING btree (token);
1968 -- Name: user_tokens_user_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1971 CREATE INDEX user_tokens_user_id_idx ON user_tokens USING btree (user_id);
1975 -- Name: users_display_name_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1978 CREATE UNIQUE INDEX users_display_name_idx ON users USING btree (display_name);
1982 -- Name: users_display_name_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1985 CREATE INDEX users_display_name_lower_idx ON users USING btree (lower((display_name)::text));
1989 -- Name: users_email_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1992 CREATE UNIQUE INDEX users_email_idx ON users USING btree (email);
1996 -- Name: users_email_lower_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
1999 CREATE INDEX users_email_lower_idx ON users USING btree (lower((email)::text));
2003 -- Name: way_nodes_node_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2006 CREATE INDEX way_nodes_node_idx ON way_nodes USING btree (node_id);
2010 -- Name: ways_changeset_id_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2013 CREATE INDEX ways_changeset_id_idx ON ways USING btree (changeset_id);
2017 -- Name: ways_timestamp_idx; Type: INDEX; Schema: public; Owner: -; Tablespace:
2020 CREATE INDEX ways_timestamp_idx ON ways USING btree ("timestamp");
2024 -- Name: changeset_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2027 ALTER TABLE ONLY changeset_comments
2028 ADD CONSTRAINT changeset_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2032 -- Name: changeset_comments_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2035 ALTER TABLE ONLY changeset_comments
2036 ADD CONSTRAINT changeset_comments_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2040 -- Name: changeset_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2043 ALTER TABLE ONLY changeset_tags
2044 ADD CONSTRAINT changeset_tags_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2048 -- Name: changesets_subscribers_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2051 ALTER TABLE ONLY changesets_subscribers
2052 ADD CONSTRAINT changesets_subscribers_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2056 -- Name: changesets_subscribers_subscriber_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2059 ALTER TABLE ONLY changesets_subscribers
2060 ADD CONSTRAINT changesets_subscribers_subscriber_id_fkey FOREIGN KEY (subscriber_id) REFERENCES users(id);
2064 -- Name: changesets_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2067 ALTER TABLE ONLY changesets
2068 ADD CONSTRAINT changesets_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2072 -- Name: client_applications_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2075 ALTER TABLE ONLY client_applications
2076 ADD CONSTRAINT client_applications_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2080 -- Name: current_node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2083 ALTER TABLE ONLY current_node_tags
2084 ADD CONSTRAINT current_node_tags_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2088 -- Name: current_nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2091 ALTER TABLE ONLY current_nodes
2092 ADD CONSTRAINT current_nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2096 -- Name: current_relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2099 ALTER TABLE ONLY current_relation_members
2100 ADD CONSTRAINT current_relation_members_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2104 -- Name: current_relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2107 ALTER TABLE ONLY current_relation_tags
2108 ADD CONSTRAINT current_relation_tags_id_fkey FOREIGN KEY (relation_id) REFERENCES current_relations(id);
2112 -- Name: current_relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2115 ALTER TABLE ONLY current_relations
2116 ADD CONSTRAINT current_relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2120 -- Name: current_way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2123 ALTER TABLE ONLY current_way_nodes
2124 ADD CONSTRAINT current_way_nodes_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2128 -- Name: current_way_nodes_node_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2131 ALTER TABLE ONLY current_way_nodes
2132 ADD CONSTRAINT current_way_nodes_node_id_fkey FOREIGN KEY (node_id) REFERENCES current_nodes(id);
2136 -- Name: current_way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2139 ALTER TABLE ONLY current_way_tags
2140 ADD CONSTRAINT current_way_tags_id_fkey FOREIGN KEY (way_id) REFERENCES current_ways(id);
2144 -- Name: current_ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2147 ALTER TABLE ONLY current_ways
2148 ADD CONSTRAINT current_ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2152 -- Name: diary_comments_diary_entry_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2155 ALTER TABLE ONLY diary_comments
2156 ADD CONSTRAINT diary_comments_diary_entry_id_fkey FOREIGN KEY (diary_entry_id) REFERENCES diary_entries(id);
2160 -- Name: diary_comments_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2163 ALTER TABLE ONLY diary_comments
2164 ADD CONSTRAINT diary_comments_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2168 -- Name: diary_entries_language_code_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2171 ALTER TABLE ONLY diary_entries
2172 ADD CONSTRAINT diary_entries_language_code_fkey FOREIGN KEY (language_code) REFERENCES languages(code);
2176 -- Name: diary_entries_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2179 ALTER TABLE ONLY diary_entries
2180 ADD CONSTRAINT diary_entries_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2184 -- Name: friends_friend_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2187 ALTER TABLE ONLY friends
2188 ADD CONSTRAINT friends_friend_user_id_fkey FOREIGN KEY (friend_user_id) REFERENCES users(id);
2192 -- Name: friends_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2195 ALTER TABLE ONLY friends
2196 ADD CONSTRAINT friends_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2200 -- Name: gps_points_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2203 ALTER TABLE ONLY gps_points
2204 ADD CONSTRAINT gps_points_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2208 -- Name: gpx_file_tags_gpx_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2211 ALTER TABLE ONLY gpx_file_tags
2212 ADD CONSTRAINT gpx_file_tags_gpx_id_fkey FOREIGN KEY (gpx_id) REFERENCES gpx_files(id);
2216 -- Name: gpx_files_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2219 ALTER TABLE ONLY gpx_files
2220 ADD CONSTRAINT gpx_files_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2224 -- Name: messages_from_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2227 ALTER TABLE ONLY messages
2228 ADD CONSTRAINT messages_from_user_id_fkey FOREIGN KEY (from_user_id) REFERENCES users(id);
2232 -- Name: messages_to_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2235 ALTER TABLE ONLY messages
2236 ADD CONSTRAINT messages_to_user_id_fkey FOREIGN KEY (to_user_id) REFERENCES users(id);
2240 -- Name: node_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2243 ALTER TABLE ONLY node_tags
2244 ADD CONSTRAINT node_tags_id_fkey FOREIGN KEY (node_id, version) REFERENCES nodes(node_id, version);
2248 -- Name: nodes_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2251 ALTER TABLE ONLY nodes
2252 ADD CONSTRAINT nodes_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2256 -- Name: nodes_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2259 ALTER TABLE ONLY nodes
2260 ADD CONSTRAINT nodes_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2264 -- Name: note_comments_author_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2267 ALTER TABLE ONLY note_comments
2268 ADD CONSTRAINT note_comments_author_id_fkey FOREIGN KEY (author_id) REFERENCES users(id);
2272 -- Name: note_comments_note_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2275 ALTER TABLE ONLY note_comments
2276 ADD CONSTRAINT note_comments_note_id_fkey FOREIGN KEY (note_id) REFERENCES notes(id);
2280 -- Name: oauth_tokens_client_application_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2283 ALTER TABLE ONLY oauth_tokens
2284 ADD CONSTRAINT oauth_tokens_client_application_id_fkey FOREIGN KEY (client_application_id) REFERENCES client_applications(id);
2288 -- Name: oauth_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2291 ALTER TABLE ONLY oauth_tokens
2292 ADD CONSTRAINT oauth_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2296 -- Name: redactions_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2299 ALTER TABLE ONLY redactions
2300 ADD CONSTRAINT redactions_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2304 -- Name: relation_members_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2307 ALTER TABLE ONLY relation_members
2308 ADD CONSTRAINT relation_members_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2312 -- Name: relation_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2315 ALTER TABLE ONLY relation_tags
2316 ADD CONSTRAINT relation_tags_id_fkey FOREIGN KEY (relation_id, version) REFERENCES relations(relation_id, version);
2320 -- Name: relations_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2323 ALTER TABLE ONLY relations
2324 ADD CONSTRAINT relations_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2328 -- Name: relations_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2331 ALTER TABLE ONLY relations
2332 ADD CONSTRAINT relations_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2336 -- Name: user_blocks_moderator_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2339 ALTER TABLE ONLY user_blocks
2340 ADD CONSTRAINT user_blocks_moderator_id_fkey FOREIGN KEY (creator_id) REFERENCES users(id);
2344 -- Name: user_blocks_revoker_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2347 ALTER TABLE ONLY user_blocks
2348 ADD CONSTRAINT user_blocks_revoker_id_fkey FOREIGN KEY (revoker_id) REFERENCES users(id);
2352 -- Name: user_blocks_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2355 ALTER TABLE ONLY user_blocks
2356 ADD CONSTRAINT user_blocks_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2360 -- Name: user_preferences_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2363 ALTER TABLE ONLY user_preferences
2364 ADD CONSTRAINT user_preferences_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2368 -- Name: user_roles_granter_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2371 ALTER TABLE ONLY user_roles
2372 ADD CONSTRAINT user_roles_granter_id_fkey FOREIGN KEY (granter_id) REFERENCES users(id);
2376 -- Name: user_roles_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2379 ALTER TABLE ONLY user_roles
2380 ADD CONSTRAINT user_roles_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2384 -- Name: user_tokens_user_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2387 ALTER TABLE ONLY user_tokens
2388 ADD CONSTRAINT user_tokens_user_id_fkey FOREIGN KEY (user_id) REFERENCES users(id);
2392 -- Name: way_nodes_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2395 ALTER TABLE ONLY way_nodes
2396 ADD CONSTRAINT way_nodes_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2400 -- Name: way_tags_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2403 ALTER TABLE ONLY way_tags
2404 ADD CONSTRAINT way_tags_id_fkey FOREIGN KEY (way_id, version) REFERENCES ways(way_id, version);
2408 -- Name: ways_changeset_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2411 ALTER TABLE ONLY ways
2412 ADD CONSTRAINT ways_changeset_id_fkey FOREIGN KEY (changeset_id) REFERENCES changesets(id);
2416 -- Name: ways_redaction_id_fkey; Type: FK CONSTRAINT; Schema: public; Owner: -
2419 ALTER TABLE ONLY ways
2420 ADD CONSTRAINT ways_redaction_id_fkey FOREIGN KEY (redaction_id) REFERENCES redactions(id);
2424 -- PostgreSQL database dump complete
2427 SET search_path TO "$user",public;
2429 INSERT INTO schema_migrations (version) VALUES ('1');
2431 INSERT INTO schema_migrations (version) VALUES ('10');
2433 INSERT INTO schema_migrations (version) VALUES ('11');
2435 INSERT INTO schema_migrations (version) VALUES ('12');
2437 INSERT INTO schema_migrations (version) VALUES ('13');
2439 INSERT INTO schema_migrations (version) VALUES ('14');
2441 INSERT INTO schema_migrations (version) VALUES ('15');
2443 INSERT INTO schema_migrations (version) VALUES ('16');
2445 INSERT INTO schema_migrations (version) VALUES ('17');
2447 INSERT INTO schema_migrations (version) VALUES ('18');
2449 INSERT INTO schema_migrations (version) VALUES ('19');
2451 INSERT INTO schema_migrations (version) VALUES ('2');
2453 INSERT INTO schema_migrations (version) VALUES ('20');
2455 INSERT INTO schema_migrations (version) VALUES ('20100513171259');
2457 INSERT INTO schema_migrations (version) VALUES ('20100516124737');
2459 INSERT INTO schema_migrations (version) VALUES ('20100910084426');
2461 INSERT INTO schema_migrations (version) VALUES ('20101114011429');
2463 INSERT INTO schema_migrations (version) VALUES ('20110322001319');
2465 INSERT INTO schema_migrations (version) VALUES ('20110508145337');
2467 INSERT INTO schema_migrations (version) VALUES ('20110521142405');
2469 INSERT INTO schema_migrations (version) VALUES ('20110925112722');
2471 INSERT INTO schema_migrations (version) VALUES ('20111116184519');
2473 INSERT INTO schema_migrations (version) VALUES ('20111212183945');
2475 INSERT INTO schema_migrations (version) VALUES ('20120123184321');
2477 INSERT INTO schema_migrations (version) VALUES ('20120208122334');
2479 INSERT INTO schema_migrations (version) VALUES ('20120208194454');
2481 INSERT INTO schema_migrations (version) VALUES ('20120214210114');
2483 INSERT INTO schema_migrations (version) VALUES ('20120219161649');
2485 INSERT INTO schema_migrations (version) VALUES ('20120318201948');
2487 INSERT INTO schema_migrations (version) VALUES ('20120328090602');
2489 INSERT INTO schema_migrations (version) VALUES ('20120404205604');
2491 INSERT INTO schema_migrations (version) VALUES ('20120808231205');
2493 INSERT INTO schema_migrations (version) VALUES ('20121005195010');
2495 INSERT INTO schema_migrations (version) VALUES ('20121012044047');
2497 INSERT INTO schema_migrations (version) VALUES ('20121119165817');
2499 INSERT INTO schema_migrations (version) VALUES ('20121202155309');
2501 INSERT INTO schema_migrations (version) VALUES ('20121203124841');
2503 INSERT INTO schema_migrations (version) VALUES ('20130328184137');
2505 INSERT INTO schema_migrations (version) VALUES ('20131212124700');
2507 INSERT INTO schema_migrations (version) VALUES ('20140115192822');
2509 INSERT INTO schema_migrations (version) VALUES ('20140117185510');
2511 INSERT INTO schema_migrations (version) VALUES ('20140210003018');
2513 INSERT INTO schema_migrations (version) VALUES ('20140507110937');
2515 INSERT INTO schema_migrations (version) VALUES ('20140519141742');
2517 INSERT INTO schema_migrations (version) VALUES ('20150110152606');
2519 INSERT INTO schema_migrations (version) VALUES ('20150111192335');
2521 INSERT INTO schema_migrations (version) VALUES ('21');
2523 INSERT INTO schema_migrations (version) VALUES ('22');
2525 INSERT INTO schema_migrations (version) VALUES ('23');
2527 INSERT INTO schema_migrations (version) VALUES ('24');
2529 INSERT INTO schema_migrations (version) VALUES ('25');
2531 INSERT INTO schema_migrations (version) VALUES ('26');
2533 INSERT INTO schema_migrations (version) VALUES ('27');
2535 INSERT INTO schema_migrations (version) VALUES ('28');
2537 INSERT INTO schema_migrations (version) VALUES ('29');
2539 INSERT INTO schema_migrations (version) VALUES ('3');
2541 INSERT INTO schema_migrations (version) VALUES ('30');
2543 INSERT INTO schema_migrations (version) VALUES ('31');
2545 INSERT INTO schema_migrations (version) VALUES ('32');
2547 INSERT INTO schema_migrations (version) VALUES ('33');
2549 INSERT INTO schema_migrations (version) VALUES ('34');
2551 INSERT INTO schema_migrations (version) VALUES ('35');
2553 INSERT INTO schema_migrations (version) VALUES ('36');
2555 INSERT INTO schema_migrations (version) VALUES ('37');
2557 INSERT INTO schema_migrations (version) VALUES ('38');
2559 INSERT INTO schema_migrations (version) VALUES ('39');
2561 INSERT INTO schema_migrations (version) VALUES ('4');
2563 INSERT INTO schema_migrations (version) VALUES ('40');
2565 INSERT INTO schema_migrations (version) VALUES ('41');
2567 INSERT INTO schema_migrations (version) VALUES ('42');
2569 INSERT INTO schema_migrations (version) VALUES ('43');
2571 INSERT INTO schema_migrations (version) VALUES ('44');
2573 INSERT INTO schema_migrations (version) VALUES ('45');
2575 INSERT INTO schema_migrations (version) VALUES ('46');
2577 INSERT INTO schema_migrations (version) VALUES ('47');
2579 INSERT INTO schema_migrations (version) VALUES ('48');
2581 INSERT INTO schema_migrations (version) VALUES ('49');
2583 INSERT INTO schema_migrations (version) VALUES ('5');
2585 INSERT INTO schema_migrations (version) VALUES ('50');
2587 INSERT INTO schema_migrations (version) VALUES ('51');
2589 INSERT INTO schema_migrations (version) VALUES ('52');
2591 INSERT INTO schema_migrations (version) VALUES ('53');
2593 INSERT INTO schema_migrations (version) VALUES ('54');
2595 INSERT INTO schema_migrations (version) VALUES ('55');
2597 INSERT INTO schema_migrations (version) VALUES ('56');
2599 INSERT INTO schema_migrations (version) VALUES ('57');
2601 INSERT INTO schema_migrations (version) VALUES ('6');
2603 INSERT INTO schema_migrations (version) VALUES ('7');
2605 INSERT INTO schema_migrations (version) VALUES ('8');
2607 INSERT INTO schema_migrations (version) VALUES ('9');