NFVO icon indicating copy to clipboard operation
NFVO copied to clipboard

Flyway configuration

Open gc4rella opened this issue 8 years ago • 3 comments

https://github.com/openbaton/NFVO/blob/develop/main/src/main/java/org/openbaton/nfvo/system/FlywayConfig.java#L43 initialize the Flyway object, however it calls immediately the migrate method, probably without considering the configuration settings which are applied immediately after.

A possible change is to call the migrate method as following:

flyway.setBaselineOnMigrate(true);
try {
  //flyway.baseline();
  flyway.migrate();
} catch (FlywayException e) {
  log.warn("Database is already baselined with flyway");
}

gc4rella avatar Jul 31 '17 14:07 gc4rella

The problem i am facing is that the migration is anyway executed even if using hsql... this could in some cases lead to some false error of database migration

lorenzotomasini avatar Aug 25 '17 07:08 lorenzotomasini

because migrate is in the init method, thus executed every time.

gc4rella avatar Aug 25 '17 07:08 gc4rella

but the flyway should always be baselined

lorenzotomasini avatar Aug 25 '17 08:08 lorenzotomasini