You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have three questions for the upcoming airhacks show:
How do migrate your database schema with Flyway? Do you use the Java/Maven or CLI approach?
What do you think about the following solution (JavaEE 8, OpenLiberty 18.0.0.2, Flyway 5.0.7)?
@Startup@TransactionAttribute(TransactionAttributeType.NOT_SUPPORTED)
@SingletonpublicclassFlywayMigration {
privatefinalLoggerlog = Logger.getLogger(this.getClass().getName());
@Resource(lookup = "jdbc/sample")
DataSourcedataSource;
@PostConstructprivatevoidonStartup() {
if (dataSource == null) {
log.severe("no datasource found to execute the db migrations!");
thrownewRuntimeException(
"no datasource found to execute the db migrations!");
}
Flywayflyway = newFlyway();
flyway.setDataSource(dataSource);
for (MigrationInfoi : flyway.info().all()) {
log.info("migrate task: " + i.getVersion() + " : "
+ i.getDescription() + " from file: " + i.getScript());
}
flyway.migrate();
}
}
And what's your Flyway strategy in enterprise projects for the SQL scripts? Do you create a single SQL script for every change during the Sprint or do you collect all changes during one sprint/cycle and squash them into one single SQL script, so that /db/migration won't grow that much?
What are the three most important books about Programming/Software Design/Java every developer should read in your opinion?
If you could give your 20-year-old self three lessons for your Developer career, what would it be?
Hi Adam,
I have three questions for the upcoming airhacks show:
What do you think about the following solution (JavaEE 8, OpenLiberty 18.0.0.2, Flyway 5.0.7)?
And what's your Flyway strategy in enterprise projects for the SQL scripts? Do you create a single SQL script for every change during the Sprint or do you collect all changes during one sprint/cycle and squash them into one single SQL script, so that
/db/migration
won't grow that much?What are the three most important books about Programming/Software Design/Java every developer should read in your opinion?
If you could give your 20-year-old self three lessons for your Developer career, what would it be?
Thank you!