ustcweizhou commented on a change in pull request #2479: CLOUDSTACK-10278:
Introduce Flyway migration on CloudStack database
URL: https://github.com/apache/cloudstack/pull/2479#discussion_r173090330
##########
File path:
engine/schema/src/main/java/com/cloud/upgrade/DatabaseUpgradeChecker.java
##########
@@ -631,6 +635,27 @@ public void check() {
} finally {
lock.releaseRef();
}
+
+ s_logger.info("Running Flyway migration on Cloudstack database");
+ Properties dbProps = DbProperties.getDbProperties();
+ final String cloudUsername = dbProps.getProperty("db.cloud.username");
+ final String cloudPassword = dbProps.getProperty("db.cloud.password");
+ final String cloudHost = dbProps.getProperty("db.cloud.host");
+ final int cloudPort =
Integer.parseInt(dbProps.getProperty("db.cloud.port"));
+ final String dbUrl = "jdbc:mysql://" + cloudHost + ":" + cloudPort +
"/cloud";
Review comment:
@rhtyd this is a good question. To be honest, I never considered it.
Actually not only me, all sql files in engine/schema/resources/META-INF/db/
do not consider it...
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services