You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@dolphinscheduler.apache.org by le...@apache.org on 2021/10/08 06:36:55 UTC

[dolphinscheduler] 02/02: Add missing fields in H2 init sql (#6454)

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

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

commit 677a8d427ec27dd719ffc2c5ca0d71db9e6fcefb
Author: kezhenxu94 <ke...@apache.org>
AuthorDate: Fri Oct 8 11:05:27 2021 +0800

    Add missing fields in H2 init sql (#6454)
---
 sql/dolphinscheduler_h2.sql | 44 ++++++++++++++++++++++++--------------------
 1 file changed, 24 insertions(+), 20 deletions(-)

diff --git a/sql/dolphinscheduler_h2.sql b/sql/dolphinscheduler_h2.sql
index ffa3a3a..1565ab4 100644
--- a/sql/dolphinscheduler_h2.sql
+++ b/sql/dolphinscheduler_h2.sql
@@ -327,8 +327,9 @@ CREATE TABLE t_ds_command
     process_instance_priority int(11) DEFAULT NULL,
     worker_group              varchar(64),
     environment_code          bigint(20) DEFAULT '-1',
+    dry_run                   int NULL DEFAULT 0,
     PRIMARY KEY (id),
-    KEY priority_id_index (process_instance_priority, id)
+    KEY                       priority_id_index (process_instance_priority, id)
 );
 
 -- ----------------------------
@@ -379,6 +380,7 @@ CREATE TABLE t_ds_error_command
     worker_group              varchar(64),
     environment_code          bigint(20) DEFAULT '-1',
     message                   text,
+    dry_run                   int NULL DEFAULT 0,
     PRIMARY KEY (id)
 );
 
@@ -592,6 +594,7 @@ CREATE TABLE t_ds_process_instance
     timeout                    int(11) DEFAULT '0',
     tenant_id                  int(11) NOT NULL DEFAULT '-1',
     var_pool                   longtext,
+    dry_run                    int NULL DEFAULT 0,
     PRIMARY KEY (id)
 );
 
@@ -831,11 +834,12 @@ CREATE TABLE t_ds_task_instance
     task_instance_priority  int(11) DEFAULT NULL,
     worker_group            varchar(64)  DEFAULT NULL,
     environment_code        bigint(20) DEFAULT '-1',
-    environment_config      text DEFAULT '',
+    environment_config      text         DEFAULT '',
     executor_id             int(11) DEFAULT NULL,
     first_submit_time       datetime     DEFAULT NULL,
     delay_time              int(4) DEFAULT '0',
     var_pool                longtext,
+    dry_run                 int NULL DEFAULT 0,
     PRIMARY KEY (id),
     FOREIGN KEY (process_instance_id) REFERENCES t_ds_process_instance (id) ON DELETE CASCADE
 );
@@ -1002,17 +1006,17 @@ CREATE TABLE t_ds_alert_plugin_instance
 DROP TABLE IF EXISTS t_ds_environment;
 CREATE TABLE t_ds_environment
 (
-  id            int NOT NULL AUTO_INCREMENT,
-  code          bigint(20) NOT NULL,
-  name          varchar(100) DEFAULT NULL,
-  config        text DEFAULT NULL,
-  description   text,
-  operator      int DEFAULT NULL,
-  create_time   timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-  update_time   timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-  PRIMARY KEY (id),
-  UNIQUE KEY environment_name_unique (name),
-  UNIQUE KEY environment_code_unique (code)
+    id          int       NOT NULL AUTO_INCREMENT,
+    code        bigint(20) NOT NULL,
+    name        varchar(100)       DEFAULT NULL,
+    config      text               DEFAULT NULL,
+    description text,
+    operator    int                DEFAULT NULL,
+    create_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    update_time timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+    PRIMARY KEY (id),
+    UNIQUE KEY environment_name_unique (name),
+    UNIQUE KEY environment_code_unique (code)
 );
 
 --
@@ -1021,12 +1025,12 @@ CREATE TABLE t_ds_environment
 DROP TABLE IF EXISTS t_ds_environment_worker_group_relation;
 CREATE TABLE t_ds_environment_worker_group_relation
 (
-    id                  int NOT NULL AUTO_INCREMENT,
-    environment_code    bigint(20) NOT NULL,
-    worker_group        varchar(255) NOT NULL,
-    operator            int DEFAULT NULL,
-    create_time         timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
-    update_time         timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
-    PRIMARY KEY (id) ,
+    id               int          NOT NULL AUTO_INCREMENT,
+    environment_code bigint(20) NOT NULL,
+    worker_group     varchar(255) NOT NULL,
+    operator         int                   DEFAULT NULL,
+    create_time      timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP,
+    update_time      timestamp    NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
+    PRIMARY KEY (id),
     UNIQUE KEY environment_worker_group_unique (environment_code,worker_group)
 );