Handling database updates

How the update system works

Lets assume current version is x and target version is x+n.

The update process goes like this:

The recreation steps ensure that:

Database schema changes

If you want to modify the database schema (adding, removing, changing tables or fields). You should:

Note: up to db-v4, db-v* have been created on the last commit before the update to a new version, so db-v4 is on the last commit before DB_VERSION was bumped to 5.