Upgrading to 1.0.0

The version 1.0.0 introduces major changes on workout file processing to improve performances and ease the implementation of the next features:

  • data displayed in the workout chart are stored in the database,

  • and segments geometry is also stored.

This last change requires PostGIS extension, which adds geospatial capabilities to the PostgreSQL database.

Instructions for upgrade

Warning

Before upgrading, make a backup of all data:

From PyPI or sources

PostGIS must be installed on your operating system. You can find intructions for your OS on PostGIS documentation.

Here are the instructions for installation on ArchLinux with yay (to adapt depending on your operating system):

  • stop the application and workers

  • install PostGIS on the server running the database

    $ yay postgis
    
  • add PostGIS extension to the database

    $ psql -U <SUPER_USER> -d <FITTRACKEE_DATABASE_NAME> -c 'CREATE EXTENSION IF NOT EXISTS postgis;'
    
  • if the server running the application is different from the server running the database, install gdal library on the server running the application (GDAL is installed with PostGIS)

    $ yay gdal
    
  • update fittrackee (see instructions for upgrade)

  • run database migrations

  • start application and workers

With Docker

  • stop the application, workers and database

    $ docker compose stop
    
  • change the database postgres image in docker-compose.yml to postgis/postgis (keep the same PostgreSQL version), for instance:

    -   image: postgres:17-alpine
    +   image: postgis/postgis:17-3.5-alpine
    

Warning

There is no official image for PostGIS on ARM platforms yet, see issue on GitHub.
The workaround is to build PostGIS image locally.
  • start only the database

    $ docker compose up fittrackee-db -d
    
  • add PostGIS extension to the database

    $ docker compose exec fittrackee-db psql -U <SUPER_USER> -d <FITTRACKEE_DATABASE_NAME> -c 'CREATE EXTENSION IF NOT EXISTS postgis;'
    CREATE EXTENSION
    
  • update fittrackee version in docker-compose.yml

  • start the application, migrations should run without error

Workouts data update

An new CLI option (--add-missing-geometry) allows to refresh workouts without geometry and chart data.

After upgrading fittrackee, run this command with other options depending on the number of workouts to update and the server capability, before enabling geospatial features on UI.

For instance to update the first 1,000 workouts created with a file:

$ ftcli workouts refresh --add-missing-geometry --per-page 1000 -v
This command can be re-executed until there are no more workouts to update.
Once all workouts have been updated, enable geospatial features on the interface by setting the environment variable ENABLE_GEOSPATIAL_FEATURES to True in .env.

Important

The next version will require all workouts to be updated.