docs: public static void updateSchema(SQLDatabase database, Migration migration, int version)
              throws SQLException {
          Misc.checkArgument(version > 0, "Schema version number must be positive");
          // ensure foreign keys are enforced in the case that we are up to date and no migration happen
          database.execSQL("PRAGMA foreign_keys = ON;");
          int dbVersion = database.getVersion();
          if(dbVersion < version) {
              // switch off foreign keys during the migration - so that we don't get caught out by
              // "ON DELETE CASCADE" constraints etc
              database.execSQL("PRAGMA foreign_keys = OFF;");
              database.beginTransaction();
              try {
                  try {
                      migration.runMigration(database);
                      database.execSQL("PRAGMA user_version = " + version + ";");
  
                      database.setTransactionSuccessful();
                  } catch (Exception ex) {
                      // don't set the transaction successful, so it'll rollback
                      throw new SQLException(
                              String.format("Migration from %1$d to %2$d failed.", dbVersion, version),
                              ex);
                  }
              } finally {
                  database.endTransaction();
                  // re-enable foreign keys
                  database.execSQL("PRAGMA foreign_keys = ON;");
              }
  
          }
      }