From 91243005bca4dacc54d5c0ec04c61c5177ffa5d2 Mon Sep 17 00:00:00 2001 From: jerryjzhang Date: Sun, 9 Mar 2025 09:18:29 +0800 Subject: [PATCH] (fix)(launcher)Change join_condition to type text to avoid "value too long for column". --- .../src/main/resources/config.update/sql-update-mysql.sql | 5 ++++- launchers/standalone/src/main/resources/db/schema-h2.sql | 2 +- launchers/standalone/src/main/resources/db/schema-mysql.sql | 2 +- .../standalone/src/main/resources/db/schema-postgres.sql | 2 +- 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/launchers/standalone/src/main/resources/config.update/sql-update-mysql.sql b/launchers/standalone/src/main/resources/config.update/sql-update-mysql.sql index 9d1ccee65..24f9bb30f 100644 --- a/launchers/standalone/src/main/resources/config.update/sql-update-mysql.sql +++ b/launchers/standalone/src/main/resources/config.update/sql-update-mysql.sql @@ -410,4 +410,7 @@ ALTER TABLE s2_query_stat_info RENAME COLUMN `sql` TO `query_sql`; --20250224 ALTER TABLE s2_agent add column `admin_org` varchar(3000) DEFAULT NULL COMMENT '管理员组织'; ALTER TABLE s2_agent add column `view_org` varchar(3000) DEFAULT NULL COMMENT '可用组织'; -ALTER TABLE s2_agent add column `is_open` tinyint DEFAULT NULL COMMENT '是否公开'; \ No newline at end of file +ALTER TABLE s2_agent add column `is_open` tinyint DEFAULT NULL COMMENT '是否公开'; + +--20250309 +ALTER TABLE s2_model_rela alter column join_condition type text; \ No newline at end of file diff --git a/launchers/standalone/src/main/resources/db/schema-h2.sql b/launchers/standalone/src/main/resources/db/schema-h2.sql index 6c495cf6e..3629d8796 100644 --- a/launchers/standalone/src/main/resources/db/schema-h2.sql +++ b/launchers/standalone/src/main/resources/db/schema-h2.sql @@ -268,7 +268,7 @@ CREATE TABLE IF NOT EXISTS s2_model_rela from_model_id BIGINT, to_model_id BIGINT, join_type VARCHAR(255), - join_condition VARCHAR(255), + join_condition TEXT, PRIMARY KEY (`id`) ); diff --git a/launchers/standalone/src/main/resources/db/schema-mysql.sql b/launchers/standalone/src/main/resources/db/schema-mysql.sql index f9d330177..93cc72660 100644 --- a/launchers/standalone/src/main/resources/db/schema-mysql.sql +++ b/launchers/standalone/src/main/resources/db/schema-mysql.sql @@ -404,7 +404,7 @@ CREATE TABLE IF NOT EXISTS s2_model_rela from_model_id bigint, to_model_id bigint, join_type VARCHAR(255), - join_condition VARCHAR(255) + join_condition text )ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; CREATE TABLE IF NOT EXISTS `s2_collect` ( diff --git a/launchers/standalone/src/main/resources/db/schema-postgres.sql b/launchers/standalone/src/main/resources/db/schema-postgres.sql index b159d3b5e..349b99999 100644 --- a/launchers/standalone/src/main/resources/db/schema-postgres.sql +++ b/launchers/standalone/src/main/resources/db/schema-postgres.sql @@ -465,7 +465,7 @@ CREATE TABLE IF NOT EXISTS s2_model_rela ( from_model_id bigint, to_model_id bigint, join_type VARCHAR(255), - join_condition VARCHAR(255) + join_condition text ); CREATE TABLE IF NOT EXISTS s2_collect (