IamMujuziMoses commented on a change in pull request #4164:
URL: 
https://github.com/apache/incubator-dolphinscheduler/pull/4164#discussion_r551486402



##########
File path: 
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java
##########
@@ -475,7 +542,12 @@ private void upgradeDolphinSchedulerDDL(String schemaDir) {
         if (StringUtils.isEmpty(rootDir)) {
             throw new RuntimeException("Environment variable user.dir not 
found");
         }
-        String sqlFilePath = 
MessageFormat.format("{0}/sql/upgrade/{1}/{2}/dolphinscheduler_ddl.sql", 
rootDir, schemaDir, getDbType().name().toLowerCase());
+        String sqlFilePath = "";
+        if (schemaDir.startsWith("m")) {
+            sqlFilePath = 
MessageFormat.format("{0}/sql/create/{1}/{2}/dolphinscheduler_dml.sql", 
rootDir, schemaDir, getDbType().name().toLowerCase());

Review comment:
       its ddl instead of dml

##########
File path: 
dolphinscheduler-dao/src/main/java/org/apache/dolphinscheduler/dao/upgrade/UpgradeDao.java
##########
@@ -475,7 +542,12 @@ private void upgradeDolphinSchedulerDDL(String schemaDir) {
         if (StringUtils.isEmpty(rootDir)) {
             throw new RuntimeException("Environment variable user.dir not 
found");
         }
-        String sqlFilePath = 
MessageFormat.format("{0}/sql/upgrade/{1}/{2}/dolphinscheduler_ddl.sql", 
rootDir, schemaDir, getDbType().name().toLowerCase());
+        String sqlFilePath = "";
+        if (schemaDir.startsWith("m")) {
+            sqlFilePath = 
MessageFormat.format("{0}/sql/create/{1}/{2}/dolphinscheduler_dml.sql", 
rootDir, schemaDir, getDbType().name().toLowerCase());
+        } else if (schemaDir.startsWith("1")) {
+            sqlFilePath = 
MessageFormat.format("{0}/sql/upgrade/{1}/{2}/dolphinscheduler_dml.sql", 
rootDir, schemaDir, getDbType().name().toLowerCase());

Review comment:
       its ddl instead of dml




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to