aboutsummaryrefslogtreecommitdiff
path: root/debug.xml
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2016-07-25 16:49:08 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2016-07-25 16:49:08 +1200
commit451c358879e1f6f2fda26e4b85ef97982fbeaba5 (patch)
tree9b40f2dff6b03b5fb66c29c93dd2fd20cb84b65a /debug.xml
parent4a31e34ca62d4b1941d3bc329afc127ef7263f34 (diff)
downloadtraccar-server-451c358879e1f6f2fda26e4b85ef97982fbeaba5.tar.gz
traccar-server-451c358879e1f6f2fda26e4b85ef97982fbeaba5.tar.bz2
traccar-server-451c358879e1f6f2fda26e4b85ef97982fbeaba5.zip
Improve history clearing logic
Diffstat (limited to 'debug.xml')
-rw-r--r--debug.xml4
1 files changed, 2 insertions, 2 deletions
diff --git a/debug.xml b/debug.xml
index 346eda292..304ae7f3d 100644
--- a/debug.xml
+++ b/debug.xml
@@ -323,8 +323,8 @@
DELETE FROM notifications WHERE id = :id;
</entry>
- <entry key='database.clearPositionsHistory'>
- DELETE FROM positions WHERE id != :positionId and deviceid = :deviceId and servertime &lt; :serverTime;
+ <entry key='database.deletePositions'>
+ DELETE FROM positions WHERE serverTime &lt; :serverTime AND id NOT IN (SELECT positionId FROM devices);
</entry>
<!-- PROTOCOL CONFIG -->