修正新引入的错误
This commit is contained in:
@@ -105,9 +105,9 @@ public class DBUtil {
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Flyway flyway = Flyway.configure().dataSource(comboPooledDataSource).locations(migrateLocation).baselineOnMigrate(true).load();
|
||||
BigInteger majorVersion = flyway.info().current().getVersion().getMajor();
|
||||
if((IsEmbedDB && majorVersion.intValue() < 38) || (!IsEmbedDB && majorVersion.intValue() < 43)) {
|
||||
if(!IsEmbedDB && (flyway.info().current() == null || flyway.info().current().getVersion().getMajor().intValue() < 43)) {
|
||||
System.out.println("数据库升级需要较长时间,可能长达数分钟或更长,请耐心等待,不要中断。。。");
|
||||
}
|
||||
flyway.migrate();
|
||||
|
||||
Reference in New Issue
Block a user