3 -- Host: localhost Database: openstreetmap
\r
4 -- ------------------------------------------------------
\r
5 -- Server version 4.1.11-Debian_4sarge2-log
\r
7 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
\r
8 /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
\r
9 /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
\r
10 /*!40101 SET NAMES utf8 */;
\r
11 /*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
\r
12 /*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
\r
13 /*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
\r
14 /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;
\r
17 -- Table structure for table `area_segments`
\r
20 DROP TABLE IF EXISTS `area_segments`;
\r
21 CREATE TABLE `area_segments` (
\r
22 `id` bigint(64) NOT NULL default '0',
\r
23 `segment_id` int(11) default NULL,
\r
24 `version` bigint(20) NOT NULL default '0',
\r
25 `sequence_id` int(11) NOT NULL auto_increment,
\r
26 PRIMARY KEY (`id`,`version`,`sequence_id`),
\r
27 KEY `area_segments_id_idx` (`id`),
\r
28 KEY `area_segments_segment_id_idx` (`segment_id`),
\r
29 KEY `area_segments_id_version_idx` (`id`,`version`)
\r
30 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
33 -- Table structure for table `area_tags`
\r
36 DROP TABLE IF EXISTS `area_tags`;
\r
37 CREATE TABLE `area_tags` (
\r
38 `id` bigint(64) NOT NULL default '0',
\r
39 `k` varchar(255) default NULL,
\r
40 `v` varchar(255) default NULL,
\r
41 `version` bigint(20) NOT NULL default '0',
\r
42 `sequence_id` int(11) NOT NULL auto_increment,
\r
43 PRIMARY KEY (`id`,`version`,`sequence_id`)
\r
44 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
47 -- Table structure for table `areas`
\r
50 DROP TABLE IF EXISTS `areas`;
\r
51 CREATE TABLE `areas` (
\r
52 `id` bigint(64) NOT NULL default '0',
\r
53 `user_id` bigint(20) default NULL,
\r
54 `timestamp` datetime default NULL,
\r
55 `version` bigint(20) NOT NULL auto_increment,
\r
56 `visible` tinyint(1) default '1',
\r
57 PRIMARY KEY (`id`,`version`)
\r
58 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
61 -- Table structure for table `current_nodes`
\r
64 DROP TABLE IF EXISTS `current_nodes`;
\r
65 CREATE TABLE `current_nodes` (
\r
66 `id` bigint(64) default NULL,
\r
67 `latitude` double default NULL,
\r
68 `longitude` double default NULL,
\r
69 `user_id` bigint(20) default NULL,
\r
70 `visible` tinyint(1) default NULL,
\r
72 `timestamp` datetime default NULL,
\r
73 KEY `current_nodes_id_idx` (`id`),
\r
74 KEY `current_nodes_lat_lon_idx` (`latitude`,`longitude`)
\r
75 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
78 -- Table structure for table `current_segments`
\r
81 DROP TABLE IF EXISTS `current_segments`;
\r
82 CREATE TABLE `current_segments` (
\r
83 `id` bigint(64) default NULL,
\r
84 `node_a` bigint(64) default NULL,
\r
85 `node_b` bigint(64) default NULL,
\r
86 `user_id` bigint(20) default NULL,
\r
87 `visible` tinyint(1) default NULL,
\r
89 `timestamp` datetime default NULL,
\r
90 KEY `current_segments_id_visible_idx` (`id`,`visible`),
\r
91 KEY `current_segments_a_idx` (`node_a`),
\r
92 KEY `current_segments_b_idx` (`node_b`)
\r
93 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
96 -- Table structure for table `current_way_segments`
\r
99 DROP TABLE IF EXISTS `current_way_segments`;
\r
100 CREATE TABLE `current_way_segments` (
\r
101 `id` bigint(64) default NULL,
\r
102 `segment_id` bigint(11) default NULL,
\r
103 `sequence_id` bigint(11) default NULL,
\r
104 KEY `current_way_segments_seg_idx` (`segment_id`),
\r
105 KEY `current_way_segments_id_idx` (`id`)
\r
106 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
109 -- Table structure for table `current_way_tags`
\r
112 DROP TABLE IF EXISTS `current_way_tags`;
\r
113 CREATE TABLE `current_way_tags` (
\r
114 `id` bigint(64) default NULL,
\r
115 `k` varchar(255) default NULL,
\r
116 `v` varchar(255) default NULL,
\r
117 KEY `current_way_tags_id_idx` (`id`),
\r
118 FULLTEXT KEY `current_way_tags_v_idx` (`v`)
\r
119 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
122 -- Table structure for table `current_ways`
\r
125 DROP TABLE IF EXISTS `current_ways`;
\r
126 CREATE TABLE `current_ways` (
\r
127 `id` bigint(64) default NULL,
\r
128 `user_id` bigint(20) default NULL,
\r
129 `timestamp` datetime default NULL,
\r
130 `visible` tinyint(1) default NULL,
\r
131 KEY `current_ways_id_visible_idx` (`id`,`visible`)
\r
132 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
135 -- Table structure for table `gps_points`
\r
138 DROP TABLE IF EXISTS `gps_points`;
\r
139 CREATE TABLE `gps_points` (
\r
140 `altitude` float default NULL,
\r
141 `user_id` bigint(20) default NULL,
\r
142 `trackid` int(11) default NULL,
\r
143 `latitude` double default NULL,
\r
144 `longitude` double default NULL,
\r
145 `gpx_id` bigint(20) default NULL,
\r
146 `timestamp` datetime default NULL,
\r
147 KEY `points_idx` (`latitude`,`longitude`,`user_id`),
\r
148 KEY `points_uid_idx` (`user_id`),
\r
149 KEY `points_gpxid_idx` (`gpx_id`),
\r
150 KEY `gps_points_timestamp_idx` (`timestamp`)
\r
151 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
154 -- Table structure for table `gpx_file_tags`
\r
157 DROP TABLE IF EXISTS `gpx_file_tags`;
\r
158 CREATE TABLE `gpx_file_tags` (
\r
159 `gpx_id` bigint(64) NOT NULL default '0',
\r
160 `tag` varchar(255) default NULL,
\r
161 `sequence_id` int(11) NOT NULL auto_increment,
\r
162 PRIMARY KEY (`gpx_id`,`sequence_id`)
\r
163 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
166 -- Table structure for table `gpx_files`
\r
169 DROP TABLE IF EXISTS `gpx_files`;
\r
170 CREATE TABLE `gpx_files` (
\r
171 `id` bigint(64) NOT NULL auto_increment,
\r
172 `user_id` bigint(20) default NULL,
\r
173 `visible` tinyint(1) NOT NULL default '1',
\r
174 `name` varchar(255) NOT NULL default '',
\r
175 `size` bigint(20) default NULL,
\r
176 `latitude` double default NULL,
\r
177 `longitude` double default NULL,
\r
178 `timestamp` datetime default NULL,
\r
179 `private` tinyint(1) default '1',
\r
180 `description` varchar(255) default '',
\r
181 `tmpname` varchar(255) default NULL,
\r
182 `inserted` tinyint(1) default NULL,
\r
184 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
187 -- Table structure for table `gpx_pending_files`
\r
190 DROP TABLE IF EXISTS `gpx_pending_files`;
\r
191 CREATE TABLE `gpx_pending_files` (
\r
192 `originalname` varchar(255) default NULL,
\r
193 `tmpname` varchar(255) default NULL,
\r
194 `user_id` bigint(20) default NULL
\r
195 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
198 -- Table structure for table `meta_areas`
\r
201 DROP TABLE IF EXISTS `meta_areas`;
\r
202 CREATE TABLE `meta_areas` (
\r
203 `id` bigint(64) NOT NULL auto_increment,
\r
204 `user_id` bigint(20) default NULL,
\r
205 `timestamp` datetime default NULL,
\r
207 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
210 -- Table structure for table `meta_nodes`
\r
213 DROP TABLE IF EXISTS `meta_nodes`;
\r
214 CREATE TABLE `meta_nodes` (
\r
215 `id` bigint(64) NOT NULL auto_increment,
\r
216 `user_id` bigint(20) default NULL,
\r
217 `timestamp` datetime default NULL,
\r
219 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
222 -- Table structure for table `meta_segments`
\r
225 DROP TABLE IF EXISTS `meta_segments`;
\r
226 CREATE TABLE `meta_segments` (
\r
227 `id` bigint(64) NOT NULL auto_increment,
\r
228 `user_id` bigint(20) default NULL,
\r
229 `timestamp` datetime default NULL,
\r
231 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
234 -- Table structure for table `meta_ways`
\r
237 DROP TABLE IF EXISTS `meta_ways`;
\r
238 CREATE TABLE `meta_ways` (
\r
239 `id` bigint(64) NOT NULL auto_increment,
\r
240 `user_id` bigint(20) default NULL,
\r
241 `timestamp` datetime default NULL,
\r
243 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
246 -- Table structure for table `nodes`
\r
249 DROP TABLE IF EXISTS `nodes`;
\r
250 CREATE TABLE `nodes` (
\r
251 `id` bigint(64) default NULL,
\r
252 `latitude` double default NULL,
\r
253 `longitude` double default NULL,
\r
254 `user_id` bigint(20) default NULL,
\r
255 `visible` tinyint(1) default NULL,
\r
256 `tags` text NOT NULL,
\r
257 `timestamp` datetime default NULL,
\r
258 KEY `nodes_uid_idx` (`id`),
\r
259 KEY `nodes_latlon_idx` (`latitude`,`longitude`)
\r
260 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
263 -- Table structure for table `segments`
\r
266 DROP TABLE IF EXISTS `segments`;
\r
267 CREATE TABLE `segments` (
\r
268 `id` bigint(64) default NULL,
\r
269 `node_a` bigint(64) default NULL,
\r
270 `node_b` bigint(64) default NULL,
\r
271 `user_id` bigint(20) default NULL,
\r
272 `visible` tinyint(1) default NULL,
\r
273 `tags` text NOT NULL,
\r
274 `timestamp` datetime default NULL,
\r
275 KEY `street_segments_nodea_idx` (`node_a`),
\r
276 KEY `street_segments_nodeb_idx` (`node_b`),
\r
277 KEY `street_segment_uid_idx` (`id`)
\r
278 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
281 -- Table structure for table `users`
\r
284 DROP TABLE IF EXISTS `users`;
\r
285 CREATE TABLE `users` (
\r
286 `email` varchar(255) default NULL,
\r
287 `id` bigint(20) NOT NULL auto_increment,
\r
288 `token` varchar(255) default NULL,
\r
289 `active` int(11) NOT NULL default '0',
\r
290 `pass_crypt` varchar(255) default NULL,
\r
291 `creation_time` datetime default NULL,
\r
292 `timeout` datetime default NULL,
\r
293 `display_name` varchar(255) default '',
\r
294 PRIMARY KEY (`id`),
\r
295 KEY `users_email_idx` (`email`)
\r
296 ) ENGINE=MyISAM DEFAULT CHARSET=utf8;
\r
299 -- Table structure for table `way_segments`
\r
302 DROP TABLE IF EXISTS `way_segments`;
\r
303 CREATE TABLE `way_segments` (
\r
304 `id` bigint(64) NOT NULL default '0',
\r
305 `segment_id` int(11) default NULL,
\r
306 `version` bigint(20) NOT NULL default '0',
\r
307 `sequence_id` bigint(11) NOT NULL auto_increment,
\r
308 PRIMARY KEY (`id`,`version`,`sequence_id`)
\r
309 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
312 -- Table structure for table `way_tags`
\r
315 DROP TABLE IF EXISTS `way_tags`;
\r
316 CREATE TABLE `way_tags` (
\r
317 `id` bigint(64) NOT NULL default '0',
\r
318 `k` varchar(255) default NULL,
\r
319 `v` varchar(255) default NULL,
\r
320 `version` bigint(20) default NULL,
\r
321 KEY `way_tags_id_version_idx` (`id`,`version`)
\r
322 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
325 -- Table structure for table `ways`
\r
328 DROP TABLE IF EXISTS `ways`;
\r
329 CREATE TABLE `ways` (
\r
330 `id` bigint(64) NOT NULL default '0',
\r
331 `user_id` bigint(20) default NULL,
\r
332 `timestamp` datetime default NULL,
\r
333 `version` bigint(20) unsigned NOT NULL auto_increment,
\r
334 `visible` tinyint(1) default '1',
\r
335 PRIMARY KEY (`id`,`version`),
\r
336 KEY `ways_id_version_idx` (`id`)
\r
337 ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
\r
339 /*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
\r
340 /*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
\r
341 /*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
\r
342 /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
\r
343 /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
\r
344 /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
\r
345 /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;