@Override
public void hibernateUpdate(String target, String databaseQualifier, boolean export, String outputFile) {
//TODO add upgrade-state to up_version table to handle a failure during the hbm2ddl update
this.versionedDataUpdater.preUpdateDatabase(databaseQualifier);
final ISchemaExport schemaExportBean = this.getSchemaExport(databaseQualifier);
if (schemaExportBean == null) {
throw new RuntimeException(target + " could not find schemaExportBean " + databaseQualifier);
}
try {
PortalShell.LOGGER.info("");
PortalShell.LOGGER.info("");
PortalShell.LOGGER.info("Hibernate Update DDL: " + databaseQualifier);
outputFile = StringUtils.trimToNull(outputFile);
schemaExportBean.update(export, outputFile, true);
}
catch (Exception e) {
throw new RuntimeException(target + " for " + databaseQualifier + " failed", e);
}