Editing the Groups table in MySQL

Nikhil6 years ago

I have connected the traccar with MySQL and in the groups table i am trying to execute the following query for the groups table:
Insert into dbTraccar.groups(name) values('Group1');
The query is executed and the table is updated successfully in mysql but when I check the API response of api/groups no data is received but data is their in the database.

What I am doing wrong please suggest.

Nikhil6 years ago

I tried the full query for mysql like this:
Insert into dbTraccar.groups(id,name,groupid,attributes) values(1,'Group1',1,'group');

but this also gave the same result data is added to the database but api/groups gives null results.

Anton Tananaev6 years ago

Traccar has internal cache that is not updated if you modify database directly. I would recommend you to use API instead.

Nikhil6 years ago

ok thanks what if i have 200-300 records to update. Can this be automated?

Anton Tananaev6 years ago

Of course. Just write a script that uses API.

Nikhil6 years ago

ok done thanks for the help!