code: private static void getUniqueAttributes(DatabaseMetaData md, DatabaseRelationDefinition relation, QuotedIDFactory idfac) throws SQLException {
  
  		RelationID id = relation.getID();
  		// extracting unique
  		try (ResultSet rs = md.getIndexInfo(null, id.getSchemaName(), id.getTableName(), true, true)) {
              extractUniqueAttributes(relation, idfac, rs);
          } catch (Exception e){
  		    // Workaround for MySQL-connector >= 8.0
              try (ResultSet rs = md.getIndexInfo(id.getSchemaName(),null, id.getTableName(), true, true)) {
                  extractUniqueAttributes(relation, idfac, rs);
              }
          }
  	}
docs: Retrieves the unique attributes(s)
  @param md
  @return
  @throws SQLException