bug#AL-1726

Modificação sugerida
master
Fabio Faria 2022-12-15 14:57:51 -03:00
parent 9fa68a40e1
commit 84139c9321
1 changed files with 5 additions and 6 deletions

View File

@ -148,7 +148,7 @@ public class FlyWay {
try{
String ambiente = System.getProperty("ambiente") ==null || System.getProperty("ambiente").isEmpty() ? "" : System.getProperty("ambiente");
if( AMBIENTE_DEV.equalsIgnoreCase(ambiente) || AMBIENTE_CONSULTA.equalsIgnoreCase(ambiente) ) {
if( (AMBIENTE_DEV.equalsIgnoreCase(ambiente) && AMBIENTE_CONSULTA.equalsIgnoreCase(ambiente)) && Boolean.FALSE.equals(isReloadFlyway) ) {
log.warn("Flyway não executado. Ambiente = dev ou consulta");
return true;
}
@ -173,10 +173,9 @@ public class FlyWay {
dataSource = flyway.getDataSource();
}
if(Boolean.TRUE.equals(isReloadFlyway)) {
execute(flyway);
log.info("Flyway executado.");
}
execute(flyway);
log.info("Flyway executado.");
}catch(Throwable t){
log.error("Erro ao executar o Flyway",t);
return false;