Browse Source

REPORT-78654 迁移报错优化

feature/x
lidongy 2 years ago
parent
commit
e3c82e02ca
  1. 5
      fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java

5
fine-hibernate/src/main/java/com/fr/third/org/hibernate/tool/schema/internal/AbstractSchemaMigrator.java

@ -613,13 +613,16 @@ public abstract class AbstractSchemaMigrator implements SchemaMigrator {
ExecutionOptions options,
GenerationTarget... targets) {
if ( !StringHelper.isEmpty( sqlString ) ) {
String formattedSql = null;
for ( GenerationTarget target : targets ) {
try {
target.accept( formatter.format( sqlString ) );
formattedSql = formatter.format( sqlString );
target.accept( formattedSql );
}
catch (CommandAcceptanceException e) {
if ( !quiet ) {
options.getExceptionHandler().handleException( e );
log.warnf( formattedSql );
}
return false;
}

Loading…
Cancel
Save