From 6c07c7915f11c4d985739063c1c0309b2f27927a Mon Sep 17 00:00:00 2001 From: ChengJie1053 <18033291053@163.com> Date: Wed, 27 Dec 2023 11:52:45 +0800 Subject: [PATCH] Fix doris databases sql password could be empty --- linkis-dist/package/db/linkis_dml.sql | 3 +++ .../upgrade/1.6.0_schema/mysql/linkis_dml.sql | 19 +++++++++++++++++++ 2 files changed, 22 insertions(+) create mode 100644 linkis-dist/package/db/upgrade/1.6.0_schema/mysql/linkis_dml.sql diff --git a/linkis-dist/package/db/linkis_dml.sql b/linkis-dist/package/db/linkis_dml.sql index 8a1dcffa3a..b58197f38d 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/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 0000000000..0c9b591a27 --- /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;