In the case of SQLite, you can make use of the user_version pragma to track the version of the database. To get the version:
To set the version:
PRAGMA user_version = 5
I then keep each group of updates in an SQL file (that's embedded in the app) and run the updates needed to get up to the most recent version:
Select Case currentUserVersion
// Upgrade to version 2
// Upgrade to version 3
This allows the app to update itself to the most recent version regardless of the current version of the DB.