Previous: , Up: Upgrading from Trip Server v1   [Contents][Index]


3.2 Database Changes

This section describes the changes to the database since Trip Server v1. All the following changes can be implemented by running trip-server with the --upgrade option.

3.2.1 pgcrypto extension

The pgcrypto extension is needed for user password validation. Run the following command in the Trip database:

$ psql trip
CREATE EXTENSION pgcrypto;

3.2.2 Session Table

There are new session and session_data tables to handle user sessions.

3.2.3 Passwords

The Blowfish algorithm appears to have been changed in PostgreSQL 13. The following SQL will update old style encrypted passwords to work in PostgreSQL 13.

UPDATE usertable SET password = '$2a' || SUBSTRING(password, 4, 57)
WHERE password NOT LIKE '$2a%';

3.2.4 Handling OSM Extended Waypoint Attributes

The itinerary_waypoint table’s color column has been replaced with an extended_attributes column which now stores the extended attributes of an import from OSMAnd, including the color attribute.