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

2018-03-07 Thread GitBox
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


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

2018-03-07 Thread GitBox
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_r172878095
 
 

 ##
 File path: engine/schema/pom.xml
 ##
 @@ -48,5 +48,10 @@
   cloud-framework-db
   ${project.version}
 
+
+  org.flywaydb
+  flyway-core
+  5.0.7
 
 Review comment:
   @ustcweizhou can you move the version to root level pom.


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