#1509 - DBMigration add ... List<String> getPendingDrops();

This commit is contained in:
rob bygrave
2018-10-19 16:24:06 +13:00
parent 8160d1f01c
commit 29aa395cd4
3 changed files with 31 additions and 5 deletions
@@ -303,6 +303,23 @@ public class DefaultDbMigration implements DbMigration {
}
}
/**
* Return the versions containing pending drops.
*/
public List<String> getPendingDrops() {
if (!online) {
DbOffline.setGenerateMigration();
}
setDefaults();
try {
return createRequest().getPendingDrops();
} finally {
if (!online) {
DbOffline.reset();
}
}
}
/**
* Load the configuration for each of the target platforms.
*/
@@ -494,6 +511,9 @@ public class DefaultDbMigration implements DbMigration {
if (nextDrop != null) {
return nextDrop;
}
if (generatePendingDrop != null) {
return generatePendingDrop;
}
return migrationConfig.getGeneratePendingDrop();
}
@@ -595,9 +615,6 @@ public class DefaultDbMigration implements DbMigration {
if (name != null) {
migrationConfig.setName(name);
}
if (generatePendingDrop != null) {
migrationConfig.setGeneratePendingDrop(generatePendingDrop);
}
}
}