Skip to content

Instantly share code, notes, and snippets.

@geoloqi
Created May 7, 2011 04:36
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save geoloqi/0048fd5f42a963bfc7c1 to your computer and use it in GitHub Desktop.
Save geoloqi/0048fd5f42a963bfc7c1 to your computer and use it in GitHub Desktop.
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