code: public void updateSchemaVersion(VersionComparator version) throws SQLException {
          PreparedStatement statement = null;
          PreparedStatement updateStatement = null;
          ResultSet results = null;
          try {
              statement = connection.prepareStatement("SELECT \"VERSION\" FROM \"SCHEMAVERSION\"");
              results = statement.executeQuery();
  
              if (results.next()) {
                  final VersionComparator currentVersion = new VersionComparator(results.getString(1));
                  if (version == null || currentVersion.isNewerThan(version)) {
                      return;
                  }
                  updateStatement = connection.prepareStatement("UPDATE \"SCHEMAVERSION\" SET \"VERSION\" = ?");
              } else {
                  // Does not exist. Populate schema table with current running version
                  version = new VersionComparator(Config.getInstance().getApplicationVersion());
                  updateStatement = connection.prepareStatement("INSERT INTO \"SCHEMAVERSION\" (\"VERSION\") VALUES (?)");
              }
  
              LOGGER.debug("Updating database schema to: " + version.toString());
  
              updateStatement.setString(1, version.toString());
              updateStatement.executeUpdate();
              connection.commit();
          } finally {
              DbUtil.close(results);
              DbUtil.close(updateStatement);
              DbUtil.close(statement);
              //DbUtil.close(connection); // do not close connection
          }
      }
docs: Updates the schema version in the database.
  @param version the version to set the schema to
  @throws SQLException a SQLException
  @since 1.2.0