While debugging the issues I saw with H2 2.0.206 in the Hibernate testsuite I discovered that H2 now reports regular indexes through java.sql.DatabaseMetaData#getIndexInfo having the index type 0 which stands for DatabaseMetaData#tableIndexStatistic which is ignored by Hibernate, as that index type ought to only contain statistical information about the index. All JDBC drivers respect that and usually return 3 for DatabaseMetaData#tableIndexOther and for those that support these index types, also return 1 or 2 for DatabaseMetaData#tableIndexClustered and DatabaseMetaData#tableIndexHashed respectively.
While debugging the issues I saw with H2 2.0.206 in the Hibernate testsuite I discovered that H2 now reports regular indexes through
java.sql.DatabaseMetaData#getIndexInfohaving the index type0which stands forDatabaseMetaData#tableIndexStatisticwhich is ignored by Hibernate, as that index type ought to only contain statistical information about the index. All JDBC drivers respect that and usually return3forDatabaseMetaData#tableIndexOtherand for those that support these index types, also return1or2forDatabaseMetaData#tableIndexClusteredandDatabaseMetaData#tableIndexHashedrespectively.