From 37868cf0b5be5b99e48b28d1aafacdc74c2aff9e Mon Sep 17 00:00:00 2001 From: Abyss777 Date: Fri, 8 Jun 2018 10:00:28 +0500 Subject: Rename all tables to avoid using reserved words --- setup/default.xml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'setup') 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 @@ ./schema/changelog-master.xml - SELECT * FROM users + SELECT * FROM tc_users WHERE email = :email OR login = :email - 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 - 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; - UPDATE devices SET positionId = :id WHERE id = :deviceId + UPDATE tc_devices SET positionId = :id WHERE id = :deviceId - 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 - 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) - DELETE FROM events WHERE serverTime < :serverTime + DELETE FROM tc_events WHERE serverTime < :serverTime - 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 -- cgit v1.2.3