totpkey error !

zeusa year 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 ?

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 Tananaeva year ago

Yeah, looks like you have not upgraded correctly.

zeusa year ago

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

Anton Tananaeva year ago

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

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);
zeusa year 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 :)