aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2015-08-07 19:53:19 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2015-08-07 19:53:19 +1200
commit7860fa65e2d968e2f79335d8f81a4717c643d51c (patch)
treeba22a5e65d20e706ff60b461f6490e351444425d
parentc3d2ad1caf639ae648421d66f6c627e97e81579b (diff)
downloadtraccar-server-7860fa65e2d968e2f79335d8f81a4717c643d51c.tar.gz
traccar-server-7860fa65e2d968e2f79335d8f81a4717c643d51c.tar.bz2
traccar-server-7860fa65e2d968e2f79335d8f81a4717c643d51c.zip
Update SQL in config files
-rw-r--r--debug.xml6
-rw-r--r--setup/linux/traccar.xml6
-rw-r--r--setup/macosx/traccar.xml6
-rw-r--r--setup/windows/traccar.xml6
4 files changed, 12 insertions, 12 deletions
diff --git a/debug.xml b/debug.xml
index 3c0ff81ac..d29c308c9 100644
--- a/debug.xml
+++ b/debug.xml
@@ -111,13 +111,13 @@
serverTime TIMESTAMP NOT NULL,
deviceTime TIMESTAMP NOT NULL,
other VARCHAR(4096) NOT NULL,
- FOREIGN KEY (deviceId) REFERENCES device (id));
+ FOREIGN KEY (deviceId) REFERENCES device (id) ON DELETE CASCADE);
ALTER TABLE device ADD
- FOREIGN KEY (positionId) REFERENCES position (id);
+ FOREIGN KEY (positionId) REFERENCES position (id) ON DELETE CASCADE;
ALTER TABLE device ADD
- FOREIGN KEY (dataId) REFERENCES data (id);
+ FOREIGN KEY (dataId) REFERENCES data (id) ON DELETE CASCADE;
CREATE TABLE server (
id INT PRIMARY KEY AUTO_INCREMENT,
diff --git a/setup/linux/traccar.xml b/setup/linux/traccar.xml
index 139b4fec8..3d4e831ca 100644
--- a/setup/linux/traccar.xml
+++ b/setup/linux/traccar.xml
@@ -92,13 +92,13 @@
serverTime TIMESTAMP NOT NULL,
deviceTime TIMESTAMP NOT NULL,
other VARCHAR(4096) NOT NULL,
- FOREIGN KEY (deviceId) REFERENCES device (id));
+ FOREIGN KEY (deviceId) REFERENCES device (id) ON DELETE CASCADE);
ALTER TABLE device ADD
- FOREIGN KEY (positionId) REFERENCES position (id);
+ FOREIGN KEY (positionId) REFERENCES position (id) ON DELETE CASCADE;
ALTER TABLE device ADD
- FOREIGN KEY (dataId) REFERENCES data (id);
+ FOREIGN KEY (dataId) REFERENCES data (id) ON DELETE CASCADE;
CREATE TABLE server (
id INT PRIMARY KEY AUTO_INCREMENT,
diff --git a/setup/macosx/traccar.xml b/setup/macosx/traccar.xml
index 139b4fec8..3d4e831ca 100644
--- a/setup/macosx/traccar.xml
+++ b/setup/macosx/traccar.xml
@@ -92,13 +92,13 @@
serverTime TIMESTAMP NOT NULL,
deviceTime TIMESTAMP NOT NULL,
other VARCHAR(4096) NOT NULL,
- FOREIGN KEY (deviceId) REFERENCES device (id));
+ FOREIGN KEY (deviceId) REFERENCES device (id) ON DELETE CASCADE);
ALTER TABLE device ADD
- FOREIGN KEY (positionId) REFERENCES position (id);
+ FOREIGN KEY (positionId) REFERENCES position (id) ON DELETE CASCADE;
ALTER TABLE device ADD
- FOREIGN KEY (dataId) REFERENCES data (id);
+ FOREIGN KEY (dataId) REFERENCES data (id) ON DELETE CASCADE;
CREATE TABLE server (
id INT PRIMARY KEY AUTO_INCREMENT,
diff --git a/setup/windows/traccar.xml b/setup/windows/traccar.xml
index 0b68fe5ea..d796d8040 100644
--- a/setup/windows/traccar.xml
+++ b/setup/windows/traccar.xml
@@ -92,13 +92,13 @@
serverTime TIMESTAMP NOT NULL,
deviceTime TIMESTAMP NOT NULL,
other VARCHAR(4096) NOT NULL,
- FOREIGN KEY (deviceId) REFERENCES device (id));
+ FOREIGN KEY (deviceId) REFERENCES device (id) ON DELETE CASCADE);
ALTER TABLE device ADD
- FOREIGN KEY (positionId) REFERENCES position (id);
+ FOREIGN KEY (positionId) REFERENCES position (id) ON DELETE CASCADE;
ALTER TABLE device ADD
- FOREIGN KEY (dataId) REFERENCES data (id);
+ FOREIGN KEY (dataId) REFERENCES data (id) ON DELETE CASCADE;
CREATE TABLE server (
id INT PRIMARY KEY AUTO_INCREMENT,