code: public void updateVersion()
      {
          try
          {
              MessageDigest versionDigest = MessageDigest.getInstance("MD5");
  
              for (Row row : SystemKeyspace.serializedSchema())
              {
                  if (invalidSchemaRow(row) || ignoredSchemaRow(row))
                      continue;
  
                  // we want to digest only live columns
                  ColumnFamilyStore.removeDeletedColumnsOnly(row.cf, Integer.MAX_VALUE, SecondaryIndexManager.nullUpdater);
                  row.cf.purgeTombstones(Integer.MAX_VALUE);
                  row.cf.updateDigest(versionDigest);
              }
  
              version = UUID.nameUUIDFromBytes(versionDigest.digest());
              SystemKeyspace.updateSchemaVersion(version);
          }
          catch (Exception e)
          {
              throw new RuntimeException(e);
          }
      }
docs: Read schema from system keyspace and calculate MD5 digest of every row, resulting digest
  will be converted into UUID which would act as content-based version of the schema.