Making database migrations more robust
We currently iterate through all activities and change their date to date time. This is done on each start of Health and unnecessarily slows down the start process. We should add a simple integer to the database that depicts the current database version. On start we check what the current DB version is and if it’s lower than 2/doesn’t exist we do the migration, otherwise we know we’re all set. Upon doing a migration we would increase the database version. This requires an adjustment to the topology file in data/tracker and database.rs’ migrate functions.