Traccar Driver and Ibutton

Rishi4 hours ago

Hi, I have a question about how Trips reports handle driver identification when the driver changes their iButton.

As I understand, the driverUniqueId is stored only in the position attributes, and during Trips report generation Traccar matches this value with tc_drivers.uniqueid to fetch the driver details.

Suppose a driver was using one iButton for many months, and all the position records and old trip reports contain the old driverUniqueId. After some time, the driver gets a new iButton, and we update the existing driver record in tc_drivers with the new unique ID.

In this case, what happens to the old Trips?

Will the old trips still show the driver name and driverUniqueId?

Or will they show null because the old driverUniqueId no longer exists in the drivers table?

Is it recommended to update the existing driver record, or should we create a new driver record when the driver gets a new iButton, so that history remains accurate?

Just want to confirm the correct approach for maintaining historical trip data when driver identification changes.