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