aboutsummaryrefslogtreecommitdiff
path: root/debug.xml
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 11:12:18 +1300
committerAnton Tananaev <anton.tananaev@gmail.com>2015-10-13 11:12:18 +1300
commit43a64fc359f8acf08f97d70ebdb93dafa607dc08 (patch)
tree52da0b19c3da83a57348f603e7dd6467b6717b96 /debug.xml
parente997c2642b35350241614acaef6d606e37223fe6 (diff)
downloadtrackermap-server-43a64fc359f8acf08f97d70ebdb93dafa607dc08.tar.gz
trackermap-server-43a64fc359f8acf08f97d70ebdb93dafa607dc08.tar.bz2
trackermap-server-43a64fc359f8acf08f97d70ebdb93dafa607dc08.zip
Remove data model and fix some issues
Diffstat (limited to 'debug.xml')
-rw-r--r--debug.xml30
1 files changed, 1 insertions, 29 deletions
diff --git a/debug.xml b/debug.xml
index 5192dcb8b..b5ff02981 100644
--- a/debug.xml
+++ b/debug.xml
@@ -73,8 +73,7 @@
uniqueId VARCHAR(128) NOT NULL UNIQUE,
status VARCHAR(128),
lastUpdate TIMESTAMP,
- positionId INT,
- dataId INT);
+ positionId INT);
CREATE TABLE user_device (
userId INT NOT NULL,
@@ -105,16 +104,6 @@
CREATE INDEX position_deviceId_fixTime ON position (deviceId, fixTime);
- CREATE TABLE data (
- id INT PRIMARY KEY AUTO_INCREMENT,
- protocol VARCHAR(128),
- deviceId INT NOT NULL,
- serverTime TIMESTAMP NOT NULL,
- deviceTime TIMESTAMP NOT NULL,
- type VARCHAR(128),
- attributes VARCHAR(4096) NOT NULL,
- FOREIGN KEY (deviceId) REFERENCES device (id) ON DELETE CASCADE);
-
CREATE TABLE server (
id INT PRIMARY KEY AUTO_INCREMENT,
registration BIT NOT NULL,
@@ -245,23 +234,6 @@
UPDATE device SET positionId = :id WHERE id = :deviceId;
</entry>
- <entry key='database.selectData'>
- SELECT * FROM data WHERE deviceId = :deviceId AND deviceTime BETWEEN :from AND :to ORDER BY deviceTime;
- </entry>
-
- <entry key='database.insertData'>
- INSERT INTO data (deviceId, protocol, serverTime, deviceTime, type, attributes)
- VALUES (:deviceId, :protocol, CURRENT_TIMESTAMP(), :time, :type, :attributes);
- </entry>
-
- <entry key='database.selectLatestData'>
- SELECT * FROM data WHERE id IN (SELECT dataId FROM device);
- </entry>
-
- <entry key='database.updateLatestData'>
- UPDATE device SET dataId = :id WHERE id = :deviceId;
- </entry>
-
<!-- PROTOCOL CONFIG -->
<!--<entry key='detector.port'>5000</entry>-->