This is an automated email from the ASF dual-hosted git repository.

leonbao pushed a commit to branch 1.3.6-prepare
in repository https://gitbox.apache.org/repos/asf/incubator-dolphinscheduler.git


The following commit(s) were added to refs/heads/1.3.6-prepare by this push:
     new f398ab1  [1.3.6-prepare][Improvement][SQL] Improve SQL (#4926)
f398ab1 is described below

commit f398ab1500396f9da540f8ca060c3f39dcf797fb
Author: Shiwen Cheng <[email protected]>
AuthorDate: Thu Mar 4 14:46:13 2021 +0800

    [1.3.6-prepare][Improvement][SQL] Improve SQL (#4926)
---
 .github/workflows/ci_ut.yml                        |  2 +-
 sql/dolphinscheduler_mysql.sql                     | 26 +++++++++++-----------
 ...er-postgre.sql => dolphinscheduler_postgre.sql} |  6 ++---
 sql/soft_version                                   |  2 +-
 .../1.3.0_schema/mysql/dolphinscheduler_ddl.sql    |  1 -
 .../postgresql/dolphinscheduler_ddl.sql            |  2 --
 .../1.3.3_schema/mysql/dolphinscheduler_ddl.sql    |  3 ---
 .../1.3.4_schema/mysql/dolphinscheduler_ddl.sql    | 17 --------------
 .../1.3.4_schema/mysql/dolphinscheduler_dml.sql    | 16 -------------
 .../postgresql/dolphinscheduler_ddl.sql            | 17 --------------
 .../postgresql/dolphinscheduler_dml.sql            | 16 -------------
 11 files changed, 18 insertions(+), 90 deletions(-)

diff --git a/.github/workflows/ci_ut.yml b/.github/workflows/ci_ut.yml
index c32caf1..48a0d26 100644
--- a/.github/workflows/ci_ut.yml
+++ b/.github/workflows/ci_ut.yml
@@ -49,7 +49,7 @@ jobs:
         run: |
           sed -i "s/: root/: test/g" 
$(pwd)/docker/docker-swarm/docker-compose.yml
           docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml 
create --force-recreate dolphinscheduler-zookeeper dolphinscheduler-postgresql
-          sudo cp $(pwd)/sql/dolphinscheduler-postgre.sql $(docker volume 
inspect docker-swarm_dolphinscheduler-postgresql-initdb | grep "Mountpoint" | 
awk -F "\"" '{print $4}')
+          sudo cp $(pwd)/sql/dolphinscheduler_postgre.sql $(docker volume 
inspect docker-swarm_dolphinscheduler-postgresql-initdb | grep "Mountpoint" | 
awk -F "\"" '{print $4}')
           docker-compose -f $(pwd)/docker/docker-swarm/docker-compose.yml up 
-d dolphinscheduler-zookeeper dolphinscheduler-postgresql
       - name: Set up JDK 1.8
         uses: actions/setup-java@v1
diff --git a/sql/dolphinscheduler_mysql.sql b/sql/dolphinscheduler_mysql.sql
index 96db47f..10f524a 100644
--- a/sql/dolphinscheduler_mysql.sql
+++ b/sql/dolphinscheduler_mysql.sql
@@ -29,7 +29,7 @@ CREATE TABLE `QRTZ_BLOB_TRIGGERS` (
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   KEY `SCHED_NAME` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_BLOB_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_BLOB_TRIGGERS
@@ -44,7 +44,7 @@ CREATE TABLE `QRTZ_CALENDARS` (
   `CALENDAR_NAME` varchar(200) NOT NULL,
   `CALENDAR` blob NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`CALENDAR_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_CALENDARS
@@ -62,7 +62,7 @@ CREATE TABLE `QRTZ_CRON_TRIGGERS` (
   `TIME_ZONE_ID` varchar(80) DEFAULT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_CRON_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_CRON_TRIGGERS
@@ -93,7 +93,7 @@ CREATE TABLE `QRTZ_FIRED_TRIGGERS` (
   KEY `IDX_QRTZ_FT_JG` (`SCHED_NAME`,`JOB_GROUP`),
   KEY `IDX_QRTZ_FT_T_G` (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   KEY `IDX_QRTZ_FT_TG` (`SCHED_NAME`,`TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_FIRED_TRIGGERS
@@ -117,7 +117,7 @@ CREATE TABLE `QRTZ_JOB_DETAILS` (
   PRIMARY KEY (`SCHED_NAME`,`JOB_NAME`,`JOB_GROUP`),
   KEY `IDX_QRTZ_J_REQ_RECOVERY` (`SCHED_NAME`,`REQUESTS_RECOVERY`),
   KEY `IDX_QRTZ_J_GRP` (`SCHED_NAME`,`JOB_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_JOB_DETAILS
@@ -131,7 +131,7 @@ CREATE TABLE `QRTZ_LOCKS` (
   `SCHED_NAME` varchar(120) NOT NULL,
   `LOCK_NAME` varchar(40) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`LOCK_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_LOCKS
@@ -145,7 +145,7 @@ CREATE TABLE `QRTZ_PAUSED_TRIGGER_GRPS` (
   `SCHED_NAME` varchar(120) NOT NULL,
   `TRIGGER_GROUP` varchar(200) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_PAUSED_TRIGGER_GRPS
@@ -161,7 +161,7 @@ CREATE TABLE `QRTZ_SCHEDULER_STATE` (
   `LAST_CHECKIN_TIME` bigint(13) NOT NULL,
   `CHECKIN_INTERVAL` bigint(13) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`INSTANCE_NAME`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_SCHEDULER_STATE
@@ -180,7 +180,7 @@ CREATE TABLE `QRTZ_SIMPLE_TRIGGERS` (
   `TIMES_TRIGGERED` bigint(10) NOT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_SIMPLE_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_SIMPLE_TRIGGERS
@@ -207,7 +207,7 @@ CREATE TABLE `QRTZ_SIMPROP_TRIGGERS` (
   `BOOL_PROP_2` varchar(1) DEFAULT NULL,
   PRIMARY KEY (`SCHED_NAME`,`TRIGGER_NAME`,`TRIGGER_GROUP`),
   CONSTRAINT `QRTZ_SIMPROP_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`) REFERENCES `QRTZ_TRIGGERS` (`SCHED_NAME`, 
`TRIGGER_NAME`, `TRIGGER_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_SIMPROP_TRIGGERS
@@ -248,7 +248,7 @@ CREATE TABLE `QRTZ_TRIGGERS` (
   KEY `IDX_QRTZ_T_NFT_ST_MISFIRE` 
(`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_STATE`),
   KEY `IDX_QRTZ_T_NFT_ST_MISFIRE_GRP` 
(`SCHED_NAME`,`MISFIRE_INSTR`,`NEXT_FIRE_TIME`,`TRIGGER_GROUP`,`TRIGGER_STATE`),
   CONSTRAINT `QRTZ_TRIGGERS_ibfk_1` FOREIGN KEY (`SCHED_NAME`, `JOB_NAME`, 
`JOB_GROUP`) REFERENCES `QRTZ_JOB_DETAILS` (`SCHED_NAME`, `JOB_NAME`, 
`JOB_GROUP`)
-) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
 -- ----------------------------
 -- Records of QRTZ_TRIGGERS
@@ -701,7 +701,7 @@ CREATE TABLE `t_ds_task_instance` (
   `alert_flag` tinyint(4) DEFAULT NULL COMMENT 'whether alert',
   `retry_times` int(4) DEFAULT '0' COMMENT 'task retry times',
   `pid` int(4) DEFAULT NULL COMMENT 'pid of task',
-  `app_link` varchar(255) DEFAULT NULL COMMENT 'yarn app id',
+  `app_link` text COMMENT 'yarn app id',
   `flag` tinyint(4) DEFAULT '1' COMMENT '0 not available, 1 available',
   `retry_interval` int(4) DEFAULT NULL COMMENT 'retry interval when task 
failed ',
   `max_retry_times` int(2) DEFAULT NULL COMMENT 'max retry times',
@@ -799,7 +799,7 @@ CREATE TABLE `t_ds_version` (
 -- ----------------------------
 -- Records of t_ds_version
 -- ----------------------------
-INSERT INTO `t_ds_version` VALUES ('1', '1.3.3');
+INSERT INTO `t_ds_version` VALUES ('1', '1.3.6');
 
 
 -- ----------------------------
diff --git a/sql/dolphinscheduler-postgre.sql b/sql/dolphinscheduler_postgre.sql
similarity index 99%
rename from sql/dolphinscheduler-postgre.sql
rename to sql/dolphinscheduler_postgre.sql
index 7ecb0b1..8323c66 100644
--- a/sql/dolphinscheduler-postgre.sql
+++ b/sql/dolphinscheduler_postgre.sql
@@ -562,12 +562,12 @@ CREATE TABLE t_ds_task_instance (
   alert_flag int DEFAULT NULL ,
   retry_times int DEFAULT '0' ,
   pid int DEFAULT NULL ,
-  app_link varchar(255) DEFAULT NULL ,
+  app_link text ,
   flag int DEFAULT '1' ,
   retry_interval int DEFAULT NULL ,
   max_retry_times int DEFAULT NULL ,
   task_instance_priority int DEFAULT NULL ,
-   worker_group varchar(64),
+  worker_group varchar(64),
   executor_id int DEFAULT NULL ,
   PRIMARY KEY (id)
 ) ;
@@ -761,4 +761,4 @@ INSERT INTO 
t_ds_relation_user_alertgroup(alertgroup_id,user_id,create_time,upda
 INSERT INTO t_ds_queue(queue_name,queue,create_time,update_time) VALUES 
('default', 'default','2018-11-29 10:22:33', '2018-11-29 10:22:33');
 
 -- Records of t_ds_queue,default queue name : default
-INSERT INTO t_ds_version(version) VALUES ('1.3.3');
\ No newline at end of file
+INSERT INTO t_ds_version(version) VALUES ('1.3.6');
\ No newline at end of file
diff --git a/sql/soft_version b/sql/soft_version
index aaf8be7..6f96ed0 100644
--- a/sql/soft_version
+++ b/sql/soft_version
@@ -1 +1 @@
-1.3.5
\ No newline at end of file
+1.3.6
\ No newline at end of file
diff --git a/sql/upgrade/1.3.0_schema/mysql/dolphinscheduler_ddl.sql 
b/sql/upgrade/1.3.0_schema/mysql/dolphinscheduler_ddl.sql
index a188bfe..de6a518 100644
--- a/sql/upgrade/1.3.0_schema/mysql/dolphinscheduler_ddl.sql
+++ b/sql/upgrade/1.3.0_schema/mysql/dolphinscheduler_ddl.sql
@@ -276,4 +276,3 @@ d//
 delimiter ;
 CALL uc_dolphin_T_t_ds_process_definition_A_process_definition_unique;
 DROP PROCEDURE 
uc_dolphin_T_t_ds_process_definition_A_process_definition_unique;
-
diff --git a/sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql 
b/sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql
index 506ae35..4762fbd 100644
--- a/sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql
+++ b/sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql
@@ -281,5 +281,3 @@ d//
 delimiter ;
 SELECT uc_dolphin_T_t_ds_process_definition_A_process_definition_unique();
 DROP FUNCTION IF EXISTS 
uc_dolphin_T_t_ds_process_definition_A_process_definition_unique();
-
-
diff --git a/sql/upgrade/1.3.3_schema/mysql/dolphinscheduler_ddl.sql 
b/sql/upgrade/1.3.3_schema/mysql/dolphinscheduler_ddl.sql
index 3e1bb85..a447cc0 100644
--- a/sql/upgrade/1.3.3_schema/mysql/dolphinscheduler_ddl.sql
+++ b/sql/upgrade/1.3.3_schema/mysql/dolphinscheduler_ddl.sql
@@ -38,6 +38,3 @@ d//
 delimiter ;
 CALL uc_dolphin_T_t_ds_resources_un();
 DROP PROCEDURE IF EXISTS uc_dolphin_T_t_ds_resources_un;
-
-
-
diff --git a/sql/upgrade/1.3.4_schema/mysql/dolphinscheduler_ddl.sql 
b/sql/upgrade/1.3.4_schema/mysql/dolphinscheduler_ddl.sql
deleted file mode 100644
index 5f26e35..0000000
--- a/sql/upgrade/1.3.4_schema/mysql/dolphinscheduler_ddl.sql
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
diff --git a/sql/upgrade/1.3.4_schema/mysql/dolphinscheduler_dml.sql 
b/sql/upgrade/1.3.4_schema/mysql/dolphinscheduler_dml.sql
deleted file mode 100644
index 38964cc..0000000
--- a/sql/upgrade/1.3.4_schema/mysql/dolphinscheduler_dml.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
\ No newline at end of file
diff --git a/sql/upgrade/1.3.4_schema/postgresql/dolphinscheduler_ddl.sql 
b/sql/upgrade/1.3.4_schema/postgresql/dolphinscheduler_ddl.sql
deleted file mode 100644
index 5f26e35..0000000
--- a/sql/upgrade/1.3.4_schema/postgresql/dolphinscheduler_ddl.sql
+++ /dev/null
@@ -1,17 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
-
diff --git a/sql/upgrade/1.3.4_schema/postgresql/dolphinscheduler_dml.sql 
b/sql/upgrade/1.3.4_schema/postgresql/dolphinscheduler_dml.sql
deleted file mode 100644
index 38964cc..0000000
--- a/sql/upgrade/1.3.4_schema/postgresql/dolphinscheduler_dml.sql
+++ /dev/null
@@ -1,16 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *    http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
-*/
\ No newline at end of file

Reply via email to