aboutsummaryrefslogtreecommitdiff
path: root/default.cfg
diff options
context:
space:
mode:
Diffstat (limited to 'default.cfg')
-rw-r--r--default.cfg40
1 files changed, 38 insertions, 2 deletions
diff --git a/default.cfg b/default.cfg
index e16223dfd..3c432d092 100644
--- a/default.cfg
+++ b/default.cfg
@@ -15,8 +15,8 @@
<!-->
Create database:
- CREATE TABLE devices (id INT, imei VARCHAR(16))
- CREATE TABLE positions (device_id INT, time TIMESTAMP, is_valid BOOLEAN, latitude DOUBLE, longitude DOUBLE, speed DOUBLE, course DOUBLE, power DOUBLE)
+ CREATE TABLE devices (id INT IDENTITY imei VARCHAR(16))
+ CREATE TABLE positions (device_id INT, time TIMESTAMP, valid BOOLEAN, latitude DOUBLE, longitude DOUBLE, speed DOUBLE, course DOUBLE, power DOUBLE)
<-->
<!-->
@@ -29,6 +29,41 @@
</entry>
<!-->
+ imei - String
+ <-->
+ <entry key="database.insertDevice">
+ INSERT INTO devices (imei)
+ VALUES (:imei)
+ </entry>
+
+ <!-->
+ id - Integer
+ imei - String
+ <-->
+ <entry key="database.updateDevice">
+ UPDATE devices
+ SET imei = :imei
+ WHERE id = :id
+ </entry>
+
+ <!-->
+ id - Integer
+ <-->
+ <entry key="database.deleteDevice">
+ DELETE FROM devices
+ WHERE id = :id
+ </entry>
+
+ <!-->
+ device_id - Integer
+ <-->
+ <entry key="database.selectPosition">
+ SELECT *
+ FROM positions
+ WHERE device_id = :device_id
+ </entry>
+
+ <!-->
device_id - Integer
time - Date
valid - Boolean
@@ -45,6 +80,7 @@
</entry>
<!-- Web interface port -->
+ <entry key="http.enable">true</entry>
<entry key="http.port">8082</entry>
<!-- Logging options -->