Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Flyway configuration #181

Open
gc4rella opened this issue Jul 31, 2017 · 3 comments
Open

Flyway configuration #181

gc4rella opened this issue Jul 31, 2017 · 3 comments
Assignees
Milestone

Comments

@gc4rella
Copy link
Member

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");
}
@lorenzotomasini
Copy link
Member

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

@gc4rella
Copy link
Member Author

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

@lorenzotomasini
Copy link
Member

but the flyway should always be baselined

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants