You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@linkis.apache.org by pe...@apache.org on 2023/12/29 02:55:25 UTC
(linkis) branch master updated: Fix doris databases sql password could be empty (#5059)
This is an automated email from the ASF dual-hosted git repository.
peacewong pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/linkis.git
The following commit(s) were added to refs/heads/master by this push:
new 52bf1e1b2 Fix doris databases sql password could be empty (#5059)
52bf1e1b2 is described below
commit 52bf1e1b2e5a0c54c3c6644e6b27edae846f904e
Author: ChengJie1053 <18...@163.com>
AuthorDate: Fri Dec 29 10:55:20 2023 +0800
Fix doris databases sql password could be empty (#5059)
* Fix doris databases sql password could be empty
* Optimized code
---
linkis-dist/package/db/linkis_ddl_pg.sql | 7 +++----
linkis-dist/package/db/linkis_dml.sql | 3 +++
linkis-dist/package/db/linkis_dml_pg.sql | 2 +-
.../db/upgrade/1.6.0_schema/mysql/linkis_dml.sql | 19 +++++++++++++++++++
4 files changed, 26 insertions(+), 5 deletions(-)
diff --git a/linkis-dist/package/db/linkis_ddl_pg.sql b/linkis-dist/package/db/linkis_ddl_pg.sql
index 36cb554c9..ef3eeec34 100644
--- a/linkis-dist/package/db/linkis_ddl_pg.sql
+++ b/linkis-dist/package/db/linkis_ddl_pg.sql
@@ -40,12 +40,11 @@ CREATE TABLE linkis_ps_configuration_config_key (
is_hidden bool NULL,
is_advanced bool NULL,
"level" int2 NULL,
- boundary_type int2 null,
- "treeName" varchar(20) NULL,
+ "treeName" varchar(20) NULL,
+ boundary_type int2 NOT NULL DEFAULT 0,
en_description varchar(200) NULL,
en_name varchar(100) NULL,
"en_treeName" varchar(100) NULL,
- boundary_type int2 NOT NULL,
template_required bool NULL,
CONSTRAINT linkis_configuration_config_key_pkey PRIMARY KEY (id)
);
@@ -137,7 +136,7 @@ CREATE TABLE IF NOT EXISTS linkis_ps_configuration_key_limit_for_user (
DROP TABLE IF EXISTS linkis_ps_configutation_lm_across_cluster_rule;
CREATE TABLE IF NOT EXISTS linkis_ps_configutation_lm_across_cluster_rule (
- rule_id INT PRIMARY KEY AUTOINCREMENT,
+ rule_id bigserial NOT NULL,
cluster_name varchar(32) NOT NULL,
creator varchar(32) NOT NULL,
username varchar(32) NOT NULL,
diff --git a/linkis-dist/package/db/linkis_dml.sql b/linkis-dist/package/db/linkis_dml.sql
index 8a1dcffa3..b58197f38 100644
--- a/linkis-dist/package/db/linkis_dml.sql
+++ b/linkis-dist/package/db/linkis_dml.sql
@@ -777,3 +777,6 @@ VALUES (@data_source_type_id, 'address', '地址', 'Address', NULL, 'TEXT', NULL
(@data_source_type_id, 'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, 1, '用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL, now(), now()),
(@data_source_type_id, 'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, 1, '密码(Password)', 'Password', '', NULL, NULL, NULL, now(), now()),
(@data_source_type_id, 'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, 1, '实例名(instance)', 'Instance', NULL, NULL, NULL, NULL, now(), now());
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where `name` = 'doris';
+UPDATE linkis_ps_dm_datasource_type_key SET `require` = 0 WHERE `key` ="password" and `data_source_type_id` = @data_source_type_id;
diff --git a/linkis-dist/package/db/linkis_dml_pg.sql b/linkis-dist/package/db/linkis_dml_pg.sql
index ad1064aa3..6139f1e6a 100644
--- a/linkis-dist/package/db/linkis_dml_pg.sql
+++ b/linkis-dist/package/db/linkis_dml_pg.sql
@@ -647,7 +647,7 @@ VALUES ((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'),
((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'), 'driverClassName', '驱动类名(Driver class name)', 'Driver class name', 'com.mysql.jdbc.Driver', 'TEXT', NULL, '1', '驱动类名(Driver class name)', 'Driver class name', NULL, NULL, NULL, NULL, now(), now()),
((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'), 'params', '连接参数(Connection params)', 'Connection params', NULL, 'TEXT', NULL, '0', '输入JSON格式(Input JSON format): {"param":"value"}', 'Input JSON format: {"param":"value"}', NULL, NULL, NULL, NULL, now(), now()),
((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'), 'username', '用户名(Username)', 'Username', NULL, 'TEXT', NULL, '1', '用户名(Username)', 'Username', '^[0-9A-Za-z_-]+$', NULL, NULL, NULL, now(), now()),
- ((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'), 'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, '1', '密码(Password)', 'Password', '', NULL, NULL, NULL, now(), now()),
+ ((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'), 'password', '密码(Password)', 'Password', NULL, 'PASSWORD', NULL, '0', '密码(Password)', 'Password', '', NULL, NULL, NULL, now(), now()),
((select id from "linkis_ps_dm_datasource_type" where "name" = 'doris'), 'instance', '实例名(instance)', 'Instance', NULL, 'TEXT', NULL, '1', '实例名(instance)', 'Instance', NULL, NULL, NULL, NULL, now(), now());
-- https://github.com/ClickHouse/clickhouse-jdbc/tree/master/clickhouse-jdbc
diff --git a/linkis-dist/package/db/upgrade/1.6.0_schema/mysql/linkis_dml.sql b/linkis-dist/package/db/upgrade/1.6.0_schema/mysql/linkis_dml.sql
new file mode 100644
index 000000000..0c9b591a2
--- /dev/null
+++ b/linkis-dist/package/db/upgrade/1.6.0_schema/mysql/linkis_dml.sql
@@ -0,0 +1,19 @@
+/*
+ * 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.
+*/
+
+select @data_source_type_id := id from `linkis_ps_dm_datasource_type` where `name` = 'doris';
+UPDATE linkis_ps_dm_datasource_type_key SET `require` = 0 WHERE `key` ="password" and `data_source_type_id` = @data_source_type_id;
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@linkis.apache.org
For additional commands, e-mail: commits-help@linkis.apache.org