Quantcast
Channel: Liquibase Forums
Viewing all articles
Browse latest Browse all 2993

Re : CustomSqlChange: how access database metadata ?

$
0
0
I tried something else:
 
  1. public static Collection<UniqueConstraint> getUniqueConstraints(Database database, Table table) throws DatabaseException,
                InvalidExampleException {
  2.   SnapshotControl control = new SnapshotControl(database, UniqueConstraint.class);
      CatalogAndSchema catalogAndSchema = new CatalogAndSchema(null, null);
      DatabaseSnapshot snapshot = SnapshotGeneratorFactory.getInstance().createSnapshot(catalogAndSchema, database, control);
      return snapshot.get(UniqueConstraint.class);
  3. }
    but I get an empty set of constraints.

Viewing all articles
Browse latest Browse all 2993

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>