diff options
author | Anton Tananaev <anton.tananaev@gmail.com> | 2018-06-08 19:28:21 +1200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-08 19:28:21 +1200 |
commit | ae1b5bd74b69a7e8222af39e3c62aa217ba94d29 (patch) | |
tree | cc73bcf707a3e663c20d19eca273985f24f28059 /setup/default.xml | |
parent | acf93dbe1b5c03df4f8f82ffb7fb0cace767a416 (diff) | |
parent | 7f473f9200c0c6e2f588537da2ce81715b327043 (diff) | |
download | traccar-server-ae1b5bd74b69a7e8222af39e3c62aa217ba94d29.tar.gz traccar-server-ae1b5bd74b69a7e8222af39e3c62aa217ba94d29.tar.bz2 traccar-server-ae1b5bd74b69a7e8222af39e3c62aa217ba94d29.zip |
Merge pull request #3919 from Abyss777/tables_rename
Rename all tables to avoid using reserved words
Diffstat (limited to 'setup/default.xml')
-rw-r--r-- | setup/default.xml | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/setup/default.xml b/setup/default.xml index ee80fb4df..c427217f7 100644 --- a/setup/default.xml +++ b/setup/default.xml @@ -41,36 +41,36 @@ <entry key='database.changelog'>./schema/changelog-master.xml</entry> <entry key='database.loginUser'> - SELECT * FROM users + SELECT * FROM tc_users WHERE email = :email OR login = :email </entry> <entry key='database.selectPositions'> - SELECT * FROM positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime + SELECT * FROM tc_positions WHERE deviceId = :deviceId AND fixTime BETWEEN :from AND :to ORDER BY fixTime </entry> <entry key='database.selectLatestPositions'> - SELECT positions.* FROM positions INNER JOIN devices ON positions.id = devices.positionid; + SELECT tc_positions.* FROM tc_positions INNER JOIN tc_devices ON tc_positions.id = tc_devices.positionid; </entry> <entry key='database.updateLatestPosition'> - UPDATE devices SET positionId = :id WHERE id = :deviceId + UPDATE tc_devices SET positionId = :id WHERE id = :deviceId </entry> <entry key='database.selectEvents'> - SELECT * FROM events WHERE deviceId = :deviceId AND serverTime BETWEEN :from AND :to ORDER BY serverTime + SELECT * FROM tc_events WHERE deviceId = :deviceId AND serverTime BETWEEN :from AND :to ORDER BY serverTime </entry> <entry key='database.deletePositions'> - DELETE FROM positions WHERE serverTime < :serverTime AND id NOT IN (SELECT positionId FROM devices WHERE positionId IS NOT NULL) + DELETE FROM tc_positions WHERE serverTime < :serverTime AND id NOT IN (SELECT positionId FROM tc_devices WHERE positionId IS NOT NULL) </entry> <entry key='database.deleteEvents'> - DELETE FROM events WHERE serverTime < :serverTime + DELETE FROM tc_events WHERE serverTime < :serverTime </entry> <entry key='database.selectStatistics'> - SELECT * FROM statistics WHERE captureTime BETWEEN :from AND :to ORDER BY captureTime + SELECT * FROM tc_statistics WHERE captureTime BETWEEN :from AND :to ORDER BY captureTime </entry> <!-- PROTOCOL CONFIG --> |