3 -- Host: 128.40.58.203 Database: openstreetmap
4 -- ------------------------------------------------------
5 -- Server version 5.0.38-Ubuntu_0ubuntu1-log
8 -- Table structure for table `area_segments`
11 CREATE TABLE `area_segments` (
12 `id` bigint(64) NOT NULL default '0',
13 `segment_id` int(11) default NULL,
14 `version` bigint(20) NOT NULL default '0',
15 `sequence_id` int(11) NOT NULL auto_increment,
16 PRIMARY KEY (`id`,`version`,`sequence_id`),
17 KEY `area_segments_id_idx` (`id`),
18 KEY `area_segments_segment_id_idx` (`segment_id`),
19 KEY `area_segments_id_version_idx` (`id`,`version`)
20 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
23 -- Table structure for table `area_tags`
26 CREATE TABLE `area_tags` (
27 `id` bigint(64) NOT NULL default '0',
28 `k` varchar(255) default NULL,
29 `v` varchar(255) default NULL,
30 `version` bigint(20) NOT NULL default '0',
31 `sequence_id` int(11) NOT NULL auto_increment,
32 PRIMARY KEY (`id`,`version`,`sequence_id`)
33 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
36 -- Table structure for table `areas`
39 CREATE TABLE `areas` (
40 `id` bigint(64) NOT NULL default '0',
41 `user_id` bigint(20) default NULL,
42 `timestamp` datetime default NULL,
43 `version` bigint(20) NOT NULL auto_increment,
44 `visible` tinyint(1) default '1',
45 PRIMARY KEY (`id`,`version`)
46 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
49 -- Table structure for table `current_nodes`
52 CREATE TABLE `current_nodes` (
53 `id` bigint(64) NOT NULL auto_increment,
54 `latitude` double default NULL,
55 `longitude` double default NULL,
56 `user_id` bigint(20) default NULL,
57 `visible` tinyint(1) default NULL,
59 `timestamp` datetime default NULL,
60 KEY `current_nodes_id_idx` (`id`),
61 KEY `current_nodes_lat_lon_idx` (`latitude`,`longitude`),
62 KEY `current_nodes_timestamp_idx` (`timestamp`)
63 ) ENGINE=MyISAM AUTO_INCREMENT=28831962 DEFAULT CHARSET=utf8;
66 -- Table structure for table `current_segments`
69 CREATE TABLE `current_segments` (
70 `id` bigint(64) NOT NULL auto_increment,
71 `node_a` bigint(64) default NULL,
72 `node_b` bigint(64) default NULL,
73 `user_id` bigint(20) default NULL,
74 `visible` tinyint(1) default NULL,
76 `timestamp` datetime default NULL,
77 KEY `current_segments_id_visible_idx` (`id`,`visible`),
78 KEY `current_segments_a_idx` (`node_a`),
79 KEY `current_segments_b_idx` (`node_b`)
80 ) ENGINE=MyISAM AUTO_INCREMENT=24826942 DEFAULT CHARSET=utf8;
83 -- Table structure for table `current_way_segments`
86 CREATE TABLE `current_way_segments` (
87 `id` bigint(64) default NULL,
88 `segment_id` bigint(11) default NULL,
89 `sequence_id` bigint(11) default NULL,
90 KEY `current_way_segments_seg_idx` (`segment_id`),
91 KEY `current_way_segments_id_idx` (`id`)
92 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
95 -- Table structure for table `current_way_tags`
98 CREATE TABLE `current_way_tags` (
99 `id` bigint(64) default NULL,
100 `k` varchar(255) NOT NULL default '',
101 `v` varchar(255) NOT NULL default '',
102 KEY `current_way_tags_id_idx` (`id`),
103 FULLTEXT KEY `current_way_tags_v_idx` (`v`)
104 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
107 -- Table structure for table `current_ways`
110 CREATE TABLE `current_ways` (
111 `id` bigint(64) NOT NULL auto_increment,
112 `user_id` bigint(20) default NULL,
113 `timestamp` datetime default NULL,
114 `visible` tinyint(1) default NULL,
116 ) ENGINE=MyISAM AUTO_INCREMENT=4570119 DEFAULT CHARSET=utf8;
119 -- Table structure for table `diary_entries`
122 CREATE TABLE `diary_entries` (
123 `id` bigint(20) NOT NULL auto_increment,
124 `user_id` bigint(20) NOT NULL,
125 `title` varchar(255) default NULL,
127 `created_at` datetime default NULL,
128 `updated_at` datetime default NULL,
130 ) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;
133 -- Table structure for table `friends`
136 CREATE TABLE `friends` (
137 `id` bigint(20) NOT NULL auto_increment,
138 `user_id` bigint(20) NOT NULL,
139 `friend_user_id` bigint(20) NOT NULL,
141 KEY `user_id_idx` (`friend_user_id`)
142 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
145 -- Table structure for table `gps_points`
148 CREATE TABLE `gps_points` (
149 `altitude` float default NULL,
150 `user_id` int(20) unsigned default NULL,
151 `trackid` int(11) default NULL,
152 `latitude` int(11) default NULL,
153 `longitude` int(11) default NULL,
154 `gpx_id` int(20) unsigned default NULL,
155 `timestamp` datetime default NULL,
156 KEY `points_idx` (`latitude`,`longitude`,`user_id`),
157 KEY `points_uid_idx` (`user_id`),
158 KEY `points_gpxid_idx` (`gpx_id`)
159 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
162 -- Table structure for table `gpx_file_tags`
165 CREATE TABLE `gpx_file_tags` (
166 `gpx_id` bigint(64) NOT NULL default '0',
167 `tag` varchar(255) default NULL,
168 `id` int(20) NOT NULL auto_increment,
170 KEY `gpx_file_tags_gpxid_idx` (`gpx_id`)
171 ) ENGINE=MyISAM AUTO_INCREMENT=31675 DEFAULT CHARSET=utf8;
174 -- Table structure for table `gpx_files`
177 CREATE TABLE `gpx_files` (
178 `id` bigint(64) NOT NULL auto_increment,
179 `user_id` bigint(20) default NULL,
180 `visible` tinyint(1) NOT NULL default '1',
181 `name` varchar(255) NOT NULL default '',
182 `size` bigint(20) default NULL,
183 `latitude` double default NULL,
184 `longitude` double default NULL,
185 `timestamp` datetime default NULL,
186 `public` tinyint(1) NOT NULL default '1',
187 `description` varchar(255) default '',
188 `inserted` tinyint(1) default NULL,
190 KEY `gpx_files_timestamp_idx` (`timestamp`),
191 KEY `gpx_files_visible_public_idx` (`visible`,`public`)
192 ) ENGINE=MyISAM AUTO_INCREMENT=22864 DEFAULT CHARSET=utf8;
195 -- Table structure for table `gpx_pending_files`
198 CREATE TABLE `gpx_pending_files` (
199 `originalname` varchar(255) default NULL,
200 `tmpname` varchar(255) default NULL,
201 `user_id` bigint(20) default NULL
202 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
205 -- Table structure for table `messages`
208 CREATE TABLE `messages` (
209 `id` bigint(20) NOT NULL auto_increment,
210 `user_id` bigint(20) NOT NULL,
211 `from_user_id` bigint(20) NOT NULL,
212 `from_display_name` varchar(255) default '',
213 `title` varchar(255) default NULL,
215 `sent_on` datetime default NULL,
216 `message_read` tinyint(1) default '0',
217 `to_user_id` bigint(20) NOT NULL,
219 KEY `from_name_idx` (`from_display_name`)
220 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
223 -- Table structure for table `meta_areas`
226 CREATE TABLE `meta_areas` (
227 `id` bigint(64) NOT NULL auto_increment,
228 `user_id` bigint(20) default NULL,
229 `timestamp` datetime default NULL,
231 ) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;
234 -- Table structure for table `nodes`
237 CREATE TABLE `nodes` (
238 `id` bigint(64) default NULL,
239 `latitude` double default NULL,
240 `longitude` double default NULL,
241 `user_id` bigint(20) default NULL,
242 `visible` tinyint(1) default NULL,
243 `tags` text NOT NULL,
244 `timestamp` datetime default NULL,
245 KEY `nodes_uid_idx` (`id`),
246 KEY `nodes_latlon_idx` (`latitude`,`longitude`)
247 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
250 -- Table structure for table `segments`
253 CREATE TABLE `segments` (
254 `id` bigint(64) default NULL,
255 `node_a` bigint(64) default NULL,
256 `node_b` bigint(64) default NULL,
257 `user_id` bigint(20) default NULL,
258 `visible` tinyint(1) default NULL,
259 `tags` text NOT NULL,
260 `timestamp` datetime default NULL,
261 KEY `street_segments_nodea_idx` (`node_a`),
262 KEY `street_segments_nodeb_idx` (`node_b`),
263 KEY `street_segment_uid_idx` (`id`)
264 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
267 -- Table structure for table `users`
270 CREATE TABLE `users` (
271 `email` varchar(255) default NULL,
272 `id` bigint(20) NOT NULL auto_increment,
273 `token` varchar(255) default NULL,
274 `active` int(11) NOT NULL default '0',
275 `pass_crypt` varchar(255) default NULL,
276 `creation_time` datetime default NULL,
277 `timeout` datetime default NULL,
278 `display_name` varchar(255) default '',
280 `data_public` tinyint(1) default '0',
281 `description` text NOT NULL,
282 `home_lat` double default '1',
283 `home_lon` double default '1',
284 `within_lon` double default NULL,
285 `within_lat` double default NULL,
286 `home_zoom` int(2) default '3',
288 KEY `users_email_idx` (`email`),
289 KEY `users_display_name_idx` (`display_name`)
290 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
293 -- Table structure for table `way_segments`
296 CREATE TABLE `way_segments` (
297 `id` bigint(64) NOT NULL default '0',
298 `segment_id` int(11) default NULL,
299 `version` bigint(20) NOT NULL default '0',
300 `sequence_id` bigint(11) NOT NULL auto_increment,
301 PRIMARY KEY (`id`,`version`,`sequence_id`)
302 ) ENGINE=MyISAM AUTO_INCREMENT=8459472 DEFAULT CHARSET=utf8;
305 -- Table structure for table `way_tags`
308 CREATE TABLE `way_tags` (
309 `id` bigint(64) NOT NULL default '0',
310 `k` varchar(255) default NULL,
311 `v` varchar(255) default NULL,
312 `version` bigint(20) default NULL,
313 KEY `way_tags_id_version_idx` (`id`,`version`)
314 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
317 -- Table structure for table `ways`
320 CREATE TABLE `ways` (
321 `id` bigint(64) NOT NULL default '0',
322 `user_id` bigint(20) default NULL,
323 `timestamp` datetime default NULL,
324 `version` bigint(20) unsigned NOT NULL auto_increment,
325 `visible` tinyint(1) default '1',
326 PRIMARY KEY (`id`,`version`),
327 KEY `ways_id_version_idx` (`id`)
328 ) ENGINE=MyISAM AUTO_INCREMENT=3414768 DEFAULT CHARSET=utf8;