-
-
Save geoloqi/0048fd5f42a963bfc7c1 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
CREATE TABLE `locations` ( | |
`id` int(10) unsigned NOT NULL AUTO_INCREMENT, | |
`uuid` char(36) COLLATE utf8_bin DEFAULT NULL, | |
`device_id` int(10) unsigned NOT NULL DEFAULT '0', | |
`user_id` int(10) unsigned NOT NULL DEFAULT '0', | |
`date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', | |
`time` time NOT NULL DEFAULT '00:00:00', | |
`latitude` double DEFAULT NULL, | |
`longitude` double DEFAULT NULL, | |
`altitude` smallint(6) DEFAULT NULL, | |
`speed` smallint(5) DEFAULT NULL, | |
`heading` smallint(5) DEFAULT NULL, | |
`horizontal_accuracy` smallint(6) DEFAULT NULL, | |
`vertical_accuracy` smallint(6) DEFAULT NULL, | |
`distance_filter` int(10) unsigned DEFAULT NULL, | |
`tracking_limit` smallint(5) unsigned DEFAULT NULL, | |
`rate_limit` smallint(5) unsigned DEFAULT NULL, | |
`battery` smallint(5) unsigned DEFAULT NULL, | |
PRIMARY KEY (`id`), | |
KEY `user_id` (`user_id`), | |
KEY `date` (`date`), | |
KEY `uuid` (`uuid`), | |
KEY `time` (`time`), | |
KEY `lat_lng` (`latitude`,`longitude`) | |
); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment