You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cloudstack.apache.org by GitBox <gi...@apache.org> on 2018/03/08 08:25:11 UTC

[GitHub] ustcweizhou commented on a change in pull request #2479: CLOUDSTACK-10278: Introduce Flyway migration on CloudStack database

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:
users@infra.apache.org


With regards,
Apache Git Services