

IMPORTANT NOTE: existing data of original web interface will not be accessible because it is stored in other tables. In chrome this can be done like said here Then data can be copied between databases using SQL queries or some scripts.Ħ) If necessary clear web browser cookies related to your traccar web UI. If it needed to be preserved, then instead of dropping database just use a brand new database with a different name. IMPORTANT NOTE : this will delete all existing data. Also this can be done via GUI management tools (like MySQL workbench). This database will be created automatically when service starts.įor any other databases like MySQL there are queries to drop and create them. To ensure this please drop and re-create existing database:įor default H2 database this can be done by removing contents of data folder under the traccar installation folder. VALUES (:deviceId, :protocol, CURRENT_TIMESTAMP(), :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes) ī) Database must be empty before first startup. VALUES (:deviceId, :protocol, CURRENT_TIMESTAMP(), :time, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :other) Temporarily comment out the following queries in default configuration file (located in conf\default.xml of traccar installation folder). not when upgrading from previous versions when the database is already present INNER JOIN users AS u ON ud.users_id=u.idĨa) Only for the first time installation, i.e. SELECT ud.users_id AS userId, ud.devices_id AS deviceId FROM users_devices AS ud SELECT u.id AS userId, d.id AS deviceId FROM users AS u, devices AS d WHERE u.admin = 1 LEFT OUTER JOIN user_settings AS us ON us.id = s.userSettings_id LEFT OUTER JOIN user_settings AS us ON us.id = u.userSettings_id LEFT OUTER JOIN user_settings us ON us.id = u.userSettings_id Us.speedUnit, us.centerLatitude AS latitude, us.centerLongitude AS longitude, U.expirationDate AS expirationTime, u.blocked AS disabled, u.admin, SELECT u.id, u.login AS name, u.password AS hashedPassword, u.salt, u.email, u.readOnly AS readonly,
#TRACCAR PHP UPDATE#
UPDATE devices SET latestPosition_id = :id WHERE id = :deviceId Valid, latitude, longitude, altitude, speed, course, address, other AS attributesįROM positions WHERE id IN (SELECT latestPosition_id FROM devices) SELECT id, protocol, device_id AS deviceId, serverTime, time AS deviceTime, time AS fixTime, VALUES (:deviceId, :protocol, :now, :deviceTime, :valid, :latitude, :longitude, :altitude, :speed, :course, :address, :attributes) INSERT INTO positions (device_id, protocol, serverTime, time, valid, latitude, longitude, altitude, speed, course, address, other) Then data can be copied between databases using SQL queries or some scripts.ħ) Disable queries for the group permissions and attribute aliases in default configuration file (located in conf\default.xml of traccar installation folder): IMPORTANT NOTE : This will delete all existing data. Also this can be done via GUI management tools (like MySQL Workbench). The database will be automatically re-created on first service start.įor any other databases like MySQL there are queries to drop and create them. To ensure this please drop and re-create the existing database:įor a default H2 database this can be done by removing contents of the data folder under the traccar installation folder. Your database must be empty before first startup. IMPORTANT NOTE : These changes must be done in default configuration file named default.xml, not in traccar.xml. opt/traccar/schema/changelog-master.xml ->
