totpkey error !

zeus10 months ago

I try add new gps device to traccar, after add new protocol and build it from last git source, installed it on my server, now everything work fine but when I edit user attributes I got error from web UI

ERROR: column "totpkey" of relation "tc_users" does not exist Position: 91 - PSQLException (... < QueryBuilder:469 < DatabaseStorage:115 < BaseObjectResource:103 < ...)

how can I fix this error ?

MEGATRACKGPS SAS10 months ago

The same error is telling you that the Totpkey column does not exist in the table, it is most likely that it is using the database of a previous version you must add the new tables

schema/changelog-5.10.xml

Anton Tananaev10 months ago

Yeah, looks like you have not upgraded correctly.

zeus10 months ago

OK, but how can upgrade correctly?
I search for manual in documentation but I think you don't have manual upgrade

Anton Tananaev10 months ago

How did you search exactly? It's on the main documentation page.

MEGATRACKGPS SAS10 months ago

The documentation is the one I shared with you, here I share the sql command to solve your problem

ALTER TABLE tc_users ADD COLUMN totpkey VARCHAR(64);
zeus10 months ago

thank you, also need add temporary

ALTER TABLE tc_users ADD COLUMN temporary BOOLEAN;
ALTER TABLE tc_users ALTER COLUMN "temporary" SET DEFAULT false;

worked fine :)