From 7860fa65e2d968e2f79335d8f81a4717c643d51c Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 7 Aug 2015 19:53:19 +1200 Subject: Update SQL in config files --- setup/linux/traccar.xml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'setup/linux/traccar.xml') 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, -- cgit v1.2.3