forked from sirfragles/Teltonika_GPS_Server_Node.js
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGPS_DATA.sql
76 lines (69 loc) · 2.21 KB
/
GPS_DATA.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/*
Date: 2016-02-10 20:23:31
*/
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for GPS_DATA
-- ----------------------------
DROP TABLE IF EXISTS `GPS_DATA`;
CREATE TABLE `GPS_DATA` (
`imei` varchar(15) NOT NULL,
`timestamp` datetime NOT NULL,
`savetime` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`latitude` int(11) NOT NULL,
`longitude` int(11) NOT NULL,
`altitude` int(11) DEFAULT NULL,
`angle` int(11) DEFAULT NULL,
`sattelites` int(11) DEFAULT NULL,
`speed` int(11) DEFAULT NULL,
PRIMARY KEY (`timestamp`,`longitude`,`latitude`,`imei`),
UNIQUE KEY `timestamp_idx` (`timestamp`) USING BTREE
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for IMEI_ALLOW
-- ----------------------------
DROP TABLE IF EXISTS `IMEI_ALLOW`;
CREATE TABLE `IMEI_ALLOW` (
`imei` varchar(15) NOT NULL,
`allow` tinyint(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for IO_DATA_1
-- ----------------------------
DROP TABLE IF EXISTS `IO_DATA_1`;
CREATE TABLE `IO_DATA_1` (
`timestamp` datetime NOT NULL,
`id` int(11) NOT NULL,
`value` tinyint(4) unsigned NOT NULL,
PRIMARY KEY (`timestamp`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for IO_DATA_2
-- ----------------------------
DROP TABLE IF EXISTS `IO_DATA_2`;
CREATE TABLE `IO_DATA_2` (
`timestamp` datetime NOT NULL,
`id` int(11) NOT NULL,
`value` smallint(5) unsigned NOT NULL,
PRIMARY KEY (`timestamp`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for IO_DATA_4
-- ----------------------------
DROP TABLE IF EXISTS `IO_DATA_4`;
CREATE TABLE `IO_DATA_4` (
`timestamp` datetime NOT NULL,
`id` int(11) NOT NULL,
`value` int(10) unsigned NOT NULL,
PRIMARY KEY (`timestamp`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- ----------------------------
-- Table structure for IO_DATA_8
-- ----------------------------
DROP TABLE IF EXISTS `IO_DATA_8`;
CREATE TABLE `IO_DATA_8` (
`timestamp` datetime NOT NULL,
`id` int(11) NOT NULL,
`value` bigint(20) unsigned NOT NULL,
PRIMARY KEY (`timestamp`,`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;