this.dropSQL = configuration.generateDropSchemaScript( dialect );
this.createSQL = configuration.generateSchemaCreationScript( dialect );
}
public SchemaExport(MetadataImplementor metadata) {
ServiceRegistry serviceRegistry = metadata.getServiceRegistry();
this.connectionHelper = new SuppliedConnectionProviderConnectionHelper(
serviceRegistry.getService( ConnectionProvider.class )
);
JdbcServices jdbcServices = serviceRegistry.getService( JdbcServices.class );
this.sqlStatementLogger = jdbcServices.getSqlStatementLogger();
this.formatter = ( sqlStatementLogger.isFormat() ? FormatStyle.DDL : FormatStyle.NONE ).getFormatter();
this.sqlExceptionHelper = jdbcServices.getSqlExceptionHelper();
this.importFiles = ConfigurationHelper.getString(
AvailableSettings.HBM2DDL_IMPORT_FILES,
serviceRegistry.getService( ConfigurationService.class ).getSettings(),
DEFAULT_IMPORT_FILE
);
final Dialect dialect = jdbcServices.getDialect();
this.dropSQL = metadata.getDatabase().generateDropSchemaScript( dialect );