diff --git a/commafeed-server/pom.xml b/commafeed-server/pom.xml
index c36e0097..32f946c2 100644
--- a/commafeed-server/pom.xml
+++ b/commafeed-server/pom.xml
@@ -261,8 +261,8 @@
dropwizard-hibernate
- org.liquibase
- liquibase-core
+ io.dropwizard
+ dropwizard-migrations
io.dropwizard
diff --git a/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java b/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java
index 769fce4e..cfd7b0ce 100644
--- a/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java
+++ b/commafeed-server/src/main/java/com/commafeed/CommaFeedApplication.java
@@ -57,6 +57,7 @@ import io.dropwizard.assets.AssetsBundle;
import io.dropwizard.db.DataSourceFactory;
import io.dropwizard.forms.MultiPartBundle;
import io.dropwizard.hibernate.HibernateBundle;
+import io.dropwizard.migrations.MigrationsBundle;
import io.dropwizard.server.DefaultServerFactory;
import io.dropwizard.servlets.CacheBustingFilter;
import io.dropwizard.setup.Bootstrap;
@@ -107,6 +108,13 @@ public class CommaFeedApplication extends Application {
}
});
+ bootstrap.addBundle(new MigrationsBundle() {
+ @Override
+ public DataSourceFactory getDataSourceFactory(CommaFeedConfiguration configuration) {
+ return configuration.getDataSourceFactory();
+ }
+ });
+
bootstrap.addBundle(new AssetsBundle("/assets/", "/", "index.html"));
bootstrap.addBundle(new MultiPartBundle());
}
diff --git a/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java b/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java
index 0131967b..536b8d51 100644
--- a/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java
+++ b/commafeed-server/src/main/java/com/commafeed/CommaFeedConfiguration.java
@@ -45,18 +45,14 @@ public class CommaFeedConfiguration extends Configuration {
@JsonProperty("app")
private ApplicationSettings applicationSettings;
- private final ResourceBundle bundle;
+ private final String version;
+ private final String gitCommit;
public CommaFeedConfiguration() {
- bundle = ResourceBundle.getBundle("application");
- }
+ ResourceBundle bundle = ResourceBundle.getBundle("application");
- public String getVersion() {
- return bundle.getString("version");
- }
-
- public String getGitCommit() {
- return bundle.getString("git.commit");
+ this.version = bundle.getString("version");
+ this.gitCommit = bundle.getString("git.commit");
}
@Getter