forked from Archives/Athou_commafeed
make sure we clean any existing file before starting
This commit is contained in:
@@ -58,6 +58,10 @@ public class H2MigrationService {
|
|||||||
Path newVersionPath = path.resolveSibling(path.getFileName() + "." + getPatchVersion(toVersion) + ".mv.db");
|
Path newVersionPath = path.resolveSibling(path.getFileName() + "." + getPatchVersion(toVersion) + ".mv.db");
|
||||||
Path oldVersionBackupPath = path.resolveSibling(path.getFileName() + "." + getPatchVersion(fromVersion) + ".backup");
|
Path oldVersionBackupPath = path.resolveSibling(path.getFileName() + "." + getPatchVersion(fromVersion) + ".backup");
|
||||||
|
|
||||||
|
Files.deleteIfExists(scriptPath);
|
||||||
|
Files.deleteIfExists(newVersionPath);
|
||||||
|
Files.deleteIfExists(oldVersionBackupPath);
|
||||||
|
|
||||||
H2MigrationTool.readDriverRecords();
|
H2MigrationTool.readDriverRecords();
|
||||||
new H2MigrationTool().migrate(fromVersion, toVersion, path.toAbsolutePath().toString(), user, password,
|
new H2MigrationTool().migrate(fromVersion, toVersion, path.toAbsolutePath().toString(), user, password,
|
||||||
scriptPath.toAbsolutePath().toString(), "", "", false, false, "");
|
scriptPath.toAbsolutePath().toString(), "", "", false, false, "");
|
||||||
|
|||||||
Reference in New Issue
Block a user