So far I've done this (liquibase is a Liquibase object that already has been used to set up the schema)
- CatalogAndSchema catalogAndSchema = null;
- DiffToChangeLog changeLogWriter = null;
- PrintStream outputStream = new PrintStream("dbdump.sql");
- Class<? extends DatabaseObject>[] snapshotTypes = (Class<? extends DatabaseObject>[])new Class[1];
- snapshotTypes[0] = Data.class;
- liquibase.generateChangeLog(catalogAndSchema, changeLogWriter, outputStream, snapshotTypes);
but it NPEs in this line in SnapshotGeneratorFactory.createSnapshot() because examples is an array with a single element, containing a null:
- examples[i] = examples[i].customize(database);
I had hoped that when using a null catalogAndSchema I would just use the database I already had set up and populated with data....?