aboutsummaryrefslogtreecommitdiff
path: root/debug.xml
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-02 16:53:24 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-02 16:53:24 +1200
commit2617753615e47acb6600a7d551c4f6508f5af91f (patch)
tree33497cb97473da56ce339b5b0acc29628a913af5 /debug.xml
parent6f47747e6a438037392794f72ac91dbce6cc6683 (diff)
downloadtrackermap-server-2617753615e47acb6600a7d551c4f6508f5af91f.tar.gz
trackermap-server-2617753615e47acb6600a7d551c4f6508f5af91f.tar.bz2
trackermap-server-2617753615e47acb6600a7d551c4f6508f5af91f.zip
Add database schema version
Diffstat (limited to 'debug.xml')
-rw-r--r--debug.xml8
1 files changed, 8 insertions, 0 deletions
diff --git a/debug.xml b/debug.xml
index f33a350c4..8dea1ae59 100644
--- a/debug.xml
+++ b/debug.xml
@@ -45,6 +45,10 @@
<entry key='database.checkTable'>traccar</entry>
+ <entry key='database.selectSchemaVersion'>
+ SELECT * FROM traccar;
+ </entry>
+
<entry key='database.createSchema'>
CREATE TABLE "user" (
id INT PRIMARY KEY AUTO_INCREMENT,
@@ -79,6 +83,8 @@
FOREIGN KEY (userId) REFERENCES "user" (id) ON DELETE CASCADE,
FOREIGN KEY (deviceId) REFERENCES device (id) ON DELETE CASCADE);
+ CREATE INDEX user_device_userId ON user_device(userId);
+
CREATE TABLE position (
id INT PRIMARY KEY AUTO_INCREMENT,
protocol VARCHAR(128),
@@ -126,6 +132,8 @@
CREATE TABLE traccar (
version INT DEFAULT 0 NOT NULL);
+
+ INSERT INTO traccar (version) VALUES (301);
</entry>
<entry key='database.selectServers'>