Update old traccar Server

drako 8 years ago

Hello

I've been using from 2016 an old version of traccar server and everything goes well.
I have my own mysql database and do not use the original traccar db.
Now I want to apply the latest version 3.15 and I have two problems with the following queries.

  1. <entry key='database.selectDevicesAll'>SELECT id , imei as uniqueId FROM my_devices ;</entry>
    ( This query worked normally with the old version and now does not find the devices I have unknown device)

  2. <entry key='database.updateDeviceStatus'>UPDATE my_devices SET status = :status, last_seen = (SELECT * FROM (SELECT :lastUpdate + INTERVAL (SELECT gmt FROM my_devices WHERE id = :id) HOUR) AS p) WHERE id = :id; </entry>

This query also does not work and in last_seen I have null.
Can you explain me how is it supposed to work?
Thank you
George

Anton Tananaev 8 years ago
  1. Probably key was renamed. You need to find what the new key is.

  2. Status has been removed from database. Now it's only stored in memory.

drako 8 years ago

Well if i rename the table to devices from my_devices and add one field (uniqueid) all work normally ..without changing the above queries.
So if I understood these two queries (database.selectDevicesAll , database.updateDeviceStatus) the application does not use them anymore.
Is there another way to solve the problem without renaming the table ?

Anton Tananaev 8 years ago

That's why I said that you need to use new configuration keys.

drako 8 years ago

Ok...
Where to find the right new configuration keys ?

Anton Tananaev 8 years ago

Set database.generateQueries to false and you will see which ones you need to provide.

drako 8 years ago

Bingo !!
I find these two database.selectDevices and updateDeviceExtended and everything went good..

Thanks Anton