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

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


The following commit(s) were added to refs/heads/dev by this push:
     new a7aa58e  Feature add user state (#2710)
a7aa58e is described below

commit a7aa58e6ca258c817ec53d8ae27743e4904189c7
Author: Rubik-W <[email protected]>
AuthorDate: Wed Jul 15 11:21:38 2020 +0800

    Feature add user state (#2710)
    
    * feature: #1923
    
    * fix:docker sql script add column
    
    * fix: update sql script
    
    * fix: UT bug
    
    * fix: UT bug
    
    * fix: UT bug
    
    * fix: e2e UT bug
    
    * fix: e2e button location
    
    * fix:sql init script to add t_ds_user.state column
    
    Co-authored-by: Rubik-W <[email protected]>
    Co-authored-by: dailidong <[email protected]>
    Co-authored-by: qiaozhanwei <[email protected]>
---
 sql/dolphinscheduler-postgre.sql                             | 3 ++-
 sql/dolphinscheduler_mysql.sql                               | 2 +-
 sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/sql/dolphinscheduler-postgre.sql b/sql/dolphinscheduler-postgre.sql
index 3ec8022..1b27c7b 100644
--- a/sql/dolphinscheduler-postgre.sql
+++ b/sql/dolphinscheduler-postgre.sql
@@ -627,6 +627,7 @@ CREATE TABLE t_ds_user (
   state int DEFAULT 1 ,
   PRIMARY KEY (id)
 );
+comment on column t_ds_user.state is 'state 0:disable 1:enable';
 
 --
 -- Table structure for table t_ds_version
@@ -751,7 +752,7 @@ ALTER TABLE t_ds_worker_server ALTER COLUMN id SET DEFAULT 
NEXTVAL('t_ds_worker_
 
 
 -- Records of t_ds_user?user : admin , password : dolphinscheduler123
-INSERT INTO 
t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,create_time,update_time)
 VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', '[email protected]', 'xx', 
'0', '2018-03-27 15:48:50', '2018-10-24 17:40:22');
+INSERT INTO 
t_ds_user(user_name,user_password,user_type,email,phone,tenant_id,state,create_time,update_time)
 VALUES ('admin', '7ad2410b2f4c074479a8937a28a22b8f', '0', '[email protected]', 'xx', 
'0', 1, '2018-03-27 15:48:50', '2018-10-24 17:40:22');
 
 -- Records of t_ds_alertgroup,dolphinscheduler warning group
 INSERT INTO 
t_ds_alertgroup(group_name,group_type,description,create_time,update_time)  
VALUES ('dolphinscheduler warning group', '0', 'dolphinscheduler warning 
group','2018-11-29 10:20:39', '2018-11-29 10:20:39');
diff --git a/sql/dolphinscheduler_mysql.sql b/sql/dolphinscheduler_mysql.sql
index d4fa011..cac32b6 100644
--- a/sql/dolphinscheduler_mysql.sql
+++ b/sql/dolphinscheduler_mysql.sql
@@ -815,4 +815,4 @@ INSERT INTO `t_ds_relation_user_alertgroup` VALUES ('1', 
'1', '1', '2018-11-29 1
 -- ----------------------------
 -- Records of t_ds_user
 -- ----------------------------
-INSERT INTO `t_ds_user` VALUES ('1', 'admin', 
'7ad2410b2f4c074479a8937a28a22b8f', '0', '[email protected]', 'xx', '0', '2018-03-27 
15:48:50', '2018-10-24 17:40:22', null,1);
+INSERT INTO `t_ds_user` VALUES ('1', 'admin', 
'7ad2410b2f4c074479a8937a28a22b8f', '0', '[email protected]', 'xx', '0', '2018-03-27 
15:48:50', '2018-10-24 17:40:22', null, 1);
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 7ea4a34..a9e7525 100644
--- a/sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql
+++ b/sql/upgrade/1.3.0_schema/postgresql/dolphinscheduler_ddl.sql
@@ -296,6 +296,7 @@ BEGIN
           AND COLUMN_NAME ='state')
       THEN
          ALTER TABLE t_ds_user ADD COLUMN state int DEFAULT 1;
+         comment on column t_ds_user.state is 'state 0:disable 1:enable';
        END IF;
 END;
 $$ LANGUAGE plpgsql;

Reply via email to