rhtyd 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_r172878721
##
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:
@ustcweizhou we also have cloud_usage database, how do we handle changes for
that?
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:
us...@infra.apache.org
With regards,
Apache Git Services