Update from 2.x to 3.0

First of all, database structure has changed. Below you can find a script to copy most important data from old database (2.X) to the new one (3.0). Script is specific to MySQL database (InnoDB) and only copies users, devices and positions. Passwords for all users is set to "password" as there is no way to convert old plain text passwords into the new secure hashed passwords.

There were a few changes to the config file, so if you want to keep your current config, you need to update following parameters:

If you want to continue using old web interface or its customized version you need to specify following parameters in the config:

Script to copy data from 2.X to 3.0 database (MySQL):

SET foreign_key_checks = 0;


INSERT IGNORE INTO user (id, name, email, hashedPassword, salt, admin)
SELECT id, login, login, 'ef38a22ac8e75f7f3a6212dbfe05273365333ef53e34c14c', '000000000000000000000000000000000000000000000000', admin FROM users;

INSERT IGNORE INTO device (id, name, uniqueId, positionId)
SELECT id, name, uniqueId, latestPosition_id FROM devices;

INSERT INTO user_device (userId, deviceId)
SELECT users_id, devices_id FROM users_devices;

INSERT INTO position (id, deviceId, serverTime, deviceTime, fixTime, valid, latitude, longitude, altitude, speed, course, address, other)
SELECT id, device_id, time, time, time, valid, latitude, longitude, altitude, speed, course, address, other FROM positions;

SET foreign_key_checks = 1;

Script to remove old database tables (don't forget to backup old data):

SET foreign_key_checks = 0;
DROP TABLE IF EXISTS application_settings, devices, positions, user_settings, users, users_devices;
SET foreign_key_checks = 1;