code: public static String updateGraph(SqlgGraph sqlgGraph, String version) {
          Connection conn = sqlgGraph.tx().getConnection();
          try {
              DatabaseMetaData metadata = conn.getMetaData();
              GraphTraversalSource traversalSource = sqlgGraph.topology();
              List<Vertex> graphVertices = traversalSource.V().hasLabel(SQLG_SCHEMA + "." + Topology.SQLG_SCHEMA_GRAPH).toList();
              Preconditions.checkState(graphVertices.size() == 1, "BUG: There can only ever be one graph vertex, found %s", graphVertices.size());
              Vertex graph = graphVertices.get(0);
              String oldVersion = graph.value(SQLG_SCHEMA_GRAPH_VERSION);
              if (!oldVersion.equals(version)) {
                  graph.property(SQLG_SCHEMA_GRAPH_VERSION, version);
                  graph.property(SQLG_SCHEMA_GRAPH_DB_VERSION, metadata.getDatabaseProductVersion());
                  graph.property(UPDATED_ON, LocalDateTime.now());
              }
              return oldVersion;
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }
docs: Updates sqlg_schema.V_graph's version to the new version and returns the old version.
  
  @param sqlgGraph The graph.
  @param version   The new version.
  @return The old version.