diff --git a/pom.xml b/pom.xml index 8ee184d2..10d6aa03 100644 --- a/pom.xml +++ b/pom.xml @@ -294,6 +294,11 @@ dropwizard-migrations ${dropwizard.version} + + org.liquibase + liquibase-core + 3.6.3 + io.dropwizard dropwizard-assets diff --git a/src/main/java/com/commafeed/backend/service/StartupService.java b/src/main/java/com/commafeed/backend/service/StartupService.java index 1405596a..6c5e36b1 100644 --- a/src/main/java/com/commafeed/backend/service/StartupService.java +++ b/src/main/java/com/commafeed/backend/service/StartupService.java @@ -63,9 +63,8 @@ public class StartupService implements Managed { } ResourceAccessor accessor = new ClassLoaderResourceAccessor(Thread.currentThread().getContextClassLoader()); - try (Liquibase liq = new Liquibase("migrations.xml", accessor, database)) { - liq.update("prod"); - } + Liquibase liq = new Liquibase("migrations.xml", accessor, database); + liq.update("prod"); } catch (Exception e) { throw new RuntimeException(e);