code: public boolean hasUpgradeRan(final Class<? extends UpgradeItem> upgradeClass) throws SQLException {
          PreparedStatement statement = null;
          ResultSet results = null;
          try {
              statement = connection.prepareStatement("SELECT \"UPGRADECLASS\" FROM \"INSTALLEDUPGRADES\" WHERE \"UPGRADECLASS\" = ?");
              statement.setString(1, upgradeClass.getCanonicalName());
              results = statement.executeQuery();
              return results.next();
          } finally {
              DbUtil.close(results);
              DbUtil.close(statement);
              //DbUtil.close(connection); // do not close connection
          }
      }
docs: Determines if the specified upgrade already has a record of being executed previously or not.
  @param upgradeClass the class to check fi an upgrade has previously executed
  @return true if already executed, false if not
  @throws SQLException a SQLException
  @since 1.2.0