Skip to content

Commit bfae7ea

Browse files
authored
Fiks flyway 9 (#2007)
* Fikser antal connections for flyway 9 migrering.
1 parent 68d3e1a commit bfae7ea

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

web/src/main/java/no/nav/foreldrepenger/abakus/jetty/JettyServer.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ protected void konfigurerJndi() throws Exception {
186186
}
187187

188188
void migrerDatabaser() {
189-
try (var dataSource = DatasourceUtil.createDatasource(DatasourceRole.ADMIN, 1)) {
189+
try (var dataSource = DatasourceUtil.createDatasource(DatasourceRole.ADMIN, 2)) {
190190
var flyway = Flyway.configure()
191191
.dataSource(dataSource)
192192
.locations("classpath:/db/migration/defaultDS")

web/src/test/java/no/nav/foreldrepenger/abakus/jetty/JettyDevServer.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,12 @@ void migrerDatabaser() {
3535
super.migrerDatabaser();
3636
} catch (Exception e) {
3737
log.info("Migreringer feilet, cleaner og prøver på nytt for lokal db.");
38-
try (var migreringDs = DatasourceUtil.createDatasource(DatasourceRole.ADMIN, 1)) {
38+
try (var migreringDs = DatasourceUtil.createDatasource(DatasourceRole.ADMIN, 2)) {
3939
var flyway = Flyway.configure()
4040
.dataSource(migreringDs)
4141
.locations("classpath:/db/migration/")
4242
.baselineOnMigrate(true)
43+
.cleanDisabled(false)
4344
.load();
4445
flyway.clean();
4546
} catch (FlywayException fwe) {

0 commit comments

Comments
 (0)