Midway point to allow upgrading Flyway to the newest version
See https://flywaydb.org/documentation/learnmore/releaseNotes#5.0.0 for why we must upgrade to 4.2.0 first
This commit is contained in:
parent
7868c05664
commit
dba133176a
4
pom.xml
4
pom.xml
@ -35,7 +35,7 @@
|
||||
<junit.version>5.9.1</junit.version>
|
||||
<hsqldb.version>2.7.1</hsqldb.version>
|
||||
<mockito.version>4.9.0</mockito.version>
|
||||
<flyway.version>2.3.1</flyway.version>
|
||||
<flyway.version>4.2.0</flyway.version>
|
||||
<jersey.version>3.1.0</jersey.version>
|
||||
<guice.version>5.1.0</guice.version>
|
||||
<poi.version>5.2.3</poi.version>
|
||||
@ -258,7 +258,7 @@
|
||||
<version>${poi.version}</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.googlecode.flyway</groupId>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
<version>${flyway.version}</version>
|
||||
</dependency>
|
||||
|
@ -110,7 +110,7 @@
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<groupId>com.googlecode.flyway</groupId>
|
||||
<groupId>org.flywaydb</groupId>
|
||||
<artifactId>flyway-core</artifactId>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
@ -1,4 +1,4 @@
|
||||
import com.googlecode.flyway.core.Flyway;
|
||||
import org.flywaydb.core.Flyway;
|
||||
|
||||
import javax.naming.InitialContext;
|
||||
import javax.naming.NamingException;
|
||||
@ -15,7 +15,7 @@ public class DatabaseMigration implements ServletContextListener {
|
||||
private void migrateDatabase() {
|
||||
Flyway flyway = new Flyway();
|
||||
flyway.setDataSource(getDataSource());
|
||||
flyway.setInitOnMigrate(true);
|
||||
flyway.setBaselineOnMigrate(true);
|
||||
flyway.migrate();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user