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

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


The following commit(s) were added to refs/heads/dev-2.1.3 by this push:
     new 550c3d30d [Improve] ddl improvement
550c3d30d is described below

commit 550c3d30d9be7c033618b43b8bc1748a72d2e9b3
Author: benjobs <[email protected]>
AuthorDate: Sun Dec 17 21:26:10 2023 +0800

    [Improve] ddl improvement
---
 .../src/main/assembly/script/schema/mysql-schema.sql | 18 +++++++++---------
 .../src/main/assembly/script/upgrade/mysql/2.1.3.sql | 13 +++++++++++++
 .../src/main/resources/db/schema-h2.sql              | 20 ++++++++++----------
 .../main/resources/mapper/core/ApplicationMapper.xml |  2 ++
 4 files changed, 34 insertions(+), 19 deletions(-)

diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
 
b/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
index 5a7c1e1ea..c1a390400 100644
--- 
a/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/script/schema/mysql-schema.sql
@@ -54,8 +54,8 @@ create table `t_flink_app` (
   `jar_check_sum` bigint default null,
   `main_class` varchar(255) collate utf8mb4_general_ci default null,
   `dependency` text collate utf8mb4_general_ci default null,
-  `args` text collate utf8mb4_general_ci,
-  `options` text collate utf8mb4_general_ci,
+  `args` longtext collate utf8mb4_general_ci,
+  `options` longtext collate utf8mb4_general_ci,
   `hot_params` text collate utf8mb4_general_ci,
   `user_id` bigint default null,
   `app_id` varchar(64) collate utf8mb4_general_ci default null,
@@ -74,7 +74,7 @@ create table `t_flink_app` (
   `cp_max_failure_interval` int default null,
   `cp_failure_rate_interval` int default null,
   `cp_failure_action` tinyint default null,
-  `dynamic_properties` text collate utf8mb4_general_ci,
+  `dynamic_properties` longtext collate utf8mb4_general_ci,
   `description` varchar(255) collate utf8mb4_general_ci default null,
   `resolve_order` tinyint default null,
   `k8s_rest_exposed_type` tinyint default null,
@@ -94,9 +94,9 @@ create table `t_flink_app` (
   `start_time` datetime default null,
   `end_time` datetime default null,
   `alert_id` bigint default null,
-  `k8s_pod_template` text collate utf8mb4_general_ci,
-  `k8s_jm_pod_template` text collate utf8mb4_general_ci,
-  `k8s_tm_pod_template` text collate utf8mb4_general_ci,
+  `k8s_pod_template` longtext collate utf8mb4_general_ci,
+  `k8s_jm_pod_template` longtext collate utf8mb4_general_ci,
+  `k8s_tm_pod_template` longtext collate utf8mb4_general_ci,
   `k8s_hadoop_integration` tinyint default 0,
   `flink_cluster_id` bigint default null,
   `ingress_template` text collate utf8mb4_general_ci,
@@ -420,7 +420,7 @@ create table `t_flink_cluster` (
   `address` varchar(150) default null comment 'url address of jobmanager',
   `cluster_id` varchar(45) default null comment 'clusterid of session 
mode(yarn-session:application-id,k8s-session:cluster-id)',
   `cluster_name` varchar(128) not null comment 'cluster name',
-  `options` text comment 'json form of parameter collection ',
+  `options` longtext comment 'json form of parameter collection ',
   `yarn_queue` varchar(128) default null comment 'the yarn queue where the 
task is located',
   `execution_mode` tinyint not null default 1 comment 'k8s execution session 
mode(1:remote,3:yarn-session,5:kubernetes-session)',
   `version_id` bigint not null comment 'flink version id',
@@ -429,12 +429,12 @@ create table `t_flink_cluster` (
   `description` varchar(255) default null,
   `user_id` bigint default null,
   `flink_image` varchar(128) default null comment 'flink image',
-  `dynamic_properties` text comment 'allows specifying multiple generic 
configuration options',
+  `dynamic_properties` longtext comment 'allows specifying multiple generic 
configuration options',
   `k8s_rest_exposed_type` tinyint default 2 comment 'k8s 
export(0:loadbalancer,1:clusterip,2:nodeport)',
   `k8s_hadoop_integration` tinyint default 0,
   `k8s_conf` varchar(255) default null comment 'the path where the k8s 
configuration file is located',
   `resolve_order` int default null,
-  `exception` text comment 'exception information',
+  `exception` longtext comment 'exception information',
   `cluster_state` tinyint default 0 comment 'cluster status (0: created but 
not started, 1: started, 2: stopped)',
   `create_time` datetime not null default current_timestamp comment 'create 
time',
   primary key (`id`,`cluster_name`),
diff --git 
a/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.1.3.sql
 
b/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.1.3.sql
index 077d4903b..958364181 100644
--- 
a/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.1.3.sql
+++ 
b/streampark-console/streampark-console-service/src/main/assembly/script/upgrade/mysql/2.1.3.sql
@@ -21,6 +21,19 @@ set names utf8mb4;
 set foreign_key_checks = 0;
 
 alter table `t_flink_app`
+    modify column `args` longtext,
+    modify column `dynamic_properties` longtext,
+    modify column `k8s_pod_template` longtext,
+    modify column `k8s_jm_pod_template` longtext,
+    modify column `k8s_tm_pod_template` longtext,
+    modify column `options` longtext comment 'json form of parameter 
collection ',
     modify column `modify_time` datetime not null default current_timestamp 
comment 'modify time';
 
+alter table `t_flink_cluster`
+    modify column `options` longtext comment 'json form of parameter 
collection ',
+    modify column `dynamic_properties` longtext comment 'allows specifying 
multiple generic configuration options',
+    modify column `exception` longtext comment 'exception information';
+
+alter table `t_message` modify column `context` longtext;
+
 set foreign_key_checks = 1;
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
 
b/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
index 158bce5c7..74b000e0a 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
+++ 
b/streampark-console/streampark-console-service/src/main/resources/db/schema-h2.sql
@@ -47,8 +47,8 @@ create table if not exists `t_flink_app` (
   `jar_check_sum` bigint default null,
   `main_class` varchar(255)  default null,
   `dependency` text,
-  `args` text,
-  `options` text,
+  `args` longtext,
+  `options` longtext,
   `hot_params` text ,
   `user_id` bigint default null,
   `app_id` varchar(64)  default null,
@@ -67,7 +67,7 @@ create table if not exists `t_flink_app` (
   `cp_max_failure_interval` int default null,
   `cp_failure_rate_interval` int default null,
   `cp_failure_action` tinyint default null,
-  `dynamic_properties` text ,
+  `dynamic_properties` longtext ,
   `description` varchar(255)  default null,
   `resolve_order` tinyint default null,
   `k8s_rest_exposed_type` tinyint default null,
@@ -87,9 +87,9 @@ create table if not exists `t_flink_app` (
   `start_time` datetime default null,
   `end_time` datetime default null,
   `alert_id` bigint default null,
-  `k8s_pod_template` text ,
-  `k8s_jm_pod_template` text ,
-  `k8s_tm_pod_template` text ,
+  `k8s_pod_template` longtext ,
+  `k8s_jm_pod_template` longtext ,
+  `k8s_tm_pod_template` longtext ,
   `k8s_hadoop_integration` tinyint default 0,
   `flink_cluster_id` bigint default null,
   `ingress_template` text ,
@@ -241,7 +241,7 @@ create table if not exists `t_message` (
   `user_id` bigint default null,
   `type` tinyint default null,
   `title` varchar(255)  default null,
-  `context` text ,
+  `context` longtext ,
   `is_read` tinyint default 0,
   `create_time` datetime not null default current_timestamp comment 'create 
time',
   primary key(`id`)
@@ -375,7 +375,7 @@ create table if not exists `t_flink_cluster` (
   `address` varchar(150) default null comment 'url address of jobmanager',
   `cluster_id` varchar(45) default null comment 'clusterId of session 
mode(yarn-session:application-id,k8s-session:cluster-id)',
   `cluster_name` varchar(128) not null comment 'cluster name',
-  `options` text comment 'json form of parameter collection ',
+  `options` longtext comment 'json form of parameter collection ',
   `yarn_queue` varchar(128) default null comment 'the yarn queue where the 
task is located',
   `execution_mode` tinyint not null default 1 comment 'k8s execution session 
mode(1:remote,3:yarn-session,5:kubernetes-session)',
   `version_id` bigint not null comment 'flink version id',
@@ -384,12 +384,12 @@ create table if not exists `t_flink_cluster` (
   `description` varchar(255) default null,
   `user_id` bigint default null,
   `flink_image` varchar(128) default null comment 'flink image',
-  `dynamic_properties` text comment 'allows specifying multiple generic 
configuration options',
+  `dynamic_properties` longtext comment 'allows specifying multiple generic 
configuration options',
   `k8s_rest_exposed_type` tinyint default 2 comment 'k8s 
export(0:loadbalancer,1:clusterip,2:nodeport)',
   `k8s_hadoop_integration` tinyint default 0,
   `k8s_conf` varchar(255) default null comment 'the path where the k 8 s 
configuration file is located',
   `resolve_order` tinyint default null,
-  `exception` text comment 'exception information',
+  `exception` longtext comment 'exception information',
   `cluster_state` tinyint default 0 comment 'cluster status (0: created but 
not started, 1: started, 2: stopped)',
   `create_time` datetime not null default current_timestamp comment 'create 
time',
   primary key(`id`,`cluster_name`),
diff --git 
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
 
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
index 950f62aff..e2674ecef 100644
--- 
a/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
+++ 
b/streampark-console/streampark-console-service/src/main/resources/mapper/core/ApplicationMapper.xml
@@ -15,6 +15,7 @@
   ~ See the License for the specific language governing permissions and
   ~ limitations under the License.
   -->
+
 <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" 
"http://mybatis.org/dtd/mybatis-3-mapper.dtd";>
 <mapper 
namespace="org.apache.streampark.console.core.mapper.ApplicationMapper">
     <resultMap id="BaseResultMap" 
type="org.apache.streampark.console.core.entity.Application">
@@ -72,6 +73,7 @@
         <result column="k8s_pod_template" jdbcType="LONGVARCHAR" 
property="k8sPodTemplate"/>
         <result column="k8s_jm_pod_template" jdbcType="LONGVARCHAR" 
property="k8sJmPodTemplate"/>
         <result column="k8s_tm_pod_template" jdbcType="LONGVARCHAR" 
property="k8sTmPodTemplate"/>
+        <result column="ingress_template" jdbcType="LONGVARCHAR" 
property="ingressTemplate"/>
         <result column="k8s_hadoop_integration" jdbcType="TINYINT" 
property="k8sHadoopIntegration"/>
         <result column="rest_url" jdbcType="VARCHAR" property="restUrl"/>
         <result column="rest_port" jdbcType="INTEGER" property="restPort"/>

Reply via email to