docs: protected void internalUpdateVersions(CmsDbContext dbc, CmsResource resource) throws CmsDataAccessException {
  
          if (dbc.getRequestContext() == null) {
              // no needed during initialization
              return;
          }
          if (dbc.currentProject().isOnlineProject()) {
              // this method is supposed to be used only in the offline project
              return;
          }
  
          // read the online version numbers
          Map<String, Integer> onlineVersions = readVersions(
              dbc,
              CmsProject.ONLINE_PROJECT_ID,
              resource.getResourceId(),
              resource.getStructureId());
          int onlineStructureVersion = onlineVersions.get("structure").intValue();
          int onlineResourceVersion = onlineVersions.get("resource").intValue();
  
          Connection conn = null;
          PreparedStatement stmt = null;
          ResultSet res = null;
  
          try {
              conn = m_sqlManager.getConnection(dbc);
  
              // update the resource version
              stmt = m_sqlManager.getPreparedStatement(conn, dbc.currentProject(), "C_RESOURCES_UPDATE_RESOURCE_VERSION");
              stmt.setInt(1, onlineResourceVersion);
              stmt.setString(2, resource.getResourceId().toString());
              stmt.executeUpdate();
              m_sqlManager.closeAll(dbc, null, stmt, null);
  
              // update the structure version
              stmt = m_sqlManager.getPreparedStatement(
                  conn,
                  dbc.currentProject(),
                  "C_RESOURCES_UPDATE_STRUCTURE_VERSION");
              stmt.setInt(1, onlineStructureVersion);
              stmt.setString(2, resource.getStructureId().toString());
              stmt.executeUpdate();
              m_sqlManager.closeAll(dbc, null, stmt, null);
  
          } catch (SQLException e) {
              throw new CmsDbSqlException(
                  Messages.get().container(Messages.ERR_GENERIC_SQL_1, CmsDbSqlException.getErrorQuery(stmt)),
                  e);
          } finally {
              m_sqlManager.closeAll(dbc, conn, stmt, res);
          }
      }