code: public void executeUpgrades(final List<Class<? extends UpgradeItem>> classes) throws UpgradeException {
          final Connection connection = getConnection(qm);
          final UpgradeMetaProcessor installedUpgrades = new UpgradeMetaProcessor(connection);
          DbUtil.initPlatformName(connection); // Initialize DbUtil
  
          // First, we need to ensure the schema table is populated on a clean install
          // But we do so without passing any version.
          try {
              installedUpgrades.updateSchemaVersion(null);
          } catch (SQLException e) {
              LOGGER.error("Failed to update schema version", e);
              return;
          }
  
          for (final Class<? extends UpgradeItem> upgradeClass : classes) {
              try {
                  @SuppressWarnings("unchecked")
                  final Constructor constructor = upgradeClass.getConstructor();
                  final UpgradeItem upgradeItem = (UpgradeItem) constructor.newInstance();
  
                  if (upgradeItem.shouldUpgrade(qm, connection)) {
                      if (!installedUpgrades.hasUpgradeRan(upgradeClass)) {
                          LOGGER.info("Upgrade class " + upgradeClass.getName() + " about to run.");
                          final long startTime = System.currentTimeMillis();
                          upgradeItem.executeUpgrade(qm, connection);
                          final long endTime = System.currentTimeMillis();
                          installedUpgrades.installUpgrade(upgradeClass, startTime, endTime);
                          installedUpgrades.updateSchemaVersion(new VersionComparator(upgradeItem.getSchemaVersion()));
                          LOGGER.info("Completed running upgrade class " + upgradeClass.getName() + " in " + (endTime - startTime) + " ms.");
                      } else {
                          LOGGER.debug("Upgrade class " + upgradeClass.getName() + " has already ran, skipping.");
                      }
                  } else {
                      LOGGER.debug("Upgrade class " + upgradeClass.getName() + " does not need to run.");
                  }
              } catch (Exception e) {
                  DbUtil.rollback(connection);
                  LOGGER.error("Error in executing upgrade class: " + upgradeClass.getName(), e);
                  throw new UpgradeException(e);
              }
          }
      }
docs: Performs the execution of upgrades in the order defined by the specified array.
  
  @param classes the upgrade classes
  @throws UpgradeException if errors are encountered
  @since 1.2.0