diff --git a/bootstrap/sql/migrations/native/1.14.0/mysql/schemaChanges.sql b/bootstrap/sql/migrations/native/1.14.0/mysql/schemaChanges.sql new file mode 100644 index 000000000000..18497aafe70d --- /dev/null +++ b/bootstrap/sql/migrations/native/1.14.0/mysql/schemaChanges.sql @@ -0,0 +1,5 @@ +-- Increase test_case name column size to support long dbt-generated test names +-- Fixes: https://github.com/open-metadata/OpenMetadata/issues/25435 +ALTER TABLE test_case + DROP COLUMN `name`, + ADD COLUMN `name` varchar(2048) GENERATED ALWAYS AS (json_unquote(json_extract(`json`,_utf8mb4'$.name'))) VIRTUAL NOT NULL; diff --git a/bootstrap/sql/migrations/native/1.14.0/postgres/schemaChanges.sql b/bootstrap/sql/migrations/native/1.14.0/postgres/schemaChanges.sql new file mode 100644 index 000000000000..6621d8eea491 --- /dev/null +++ b/bootstrap/sql/migrations/native/1.14.0/postgres/schemaChanges.sql @@ -0,0 +1,5 @@ +-- Increase test_case name column size to support long dbt-generated test names +-- Fixes: https://github.com/open-metadata/OpenMetadata/issues/25435 +ALTER TABLE test_case + DROP COLUMN name, + ADD COLUMN name character varying(2048) GENERATED ALWAYS AS ((json ->> 'name'::text)) STORED NOT NULL; diff --git a/bootstrap/sql/schema/mysql.sql b/bootstrap/sql/schema/mysql.sql index c76d44ffb301..9be5fc090c3c 100644 --- a/bootstrap/sql/schema/mysql.sql +++ b/bootstrap/sql/schema/mysql.sql @@ -961,7 +961,7 @@ CREATE TABLE `test_case` ( `updatedAt` bigint unsigned GENERATED ALWAYS AS (json_unquote(json_extract(`json`,_utf8mb4'$.updatedAt'))) VIRTUAL NOT NULL, `updatedBy` varchar(256) GENERATED ALWAYS AS (json_unquote(json_extract(`json`,_utf8mb4'$.updatedBy'))) VIRTUAL NOT NULL, `deleted` tinyint(1) GENERATED ALWAYS AS (json_extract(`json`,_utf8mb4'$.deleted')) VIRTUAL, - `name` varchar(256) GENERATED ALWAYS AS (json_unquote(json_extract(`json`,_utf8mb4'$.name'))) VIRTUAL NOT NULL, + `name` varchar(2048) GENERATED ALWAYS AS (json_unquote(json_extract(`json`,_utf8mb4'$.name'))) VIRTUAL NOT NULL, `fqnHash` varchar(768) CHARACTER SET ascii COLLATE ascii_bin DEFAULT NULL, UNIQUE KEY `fqnHash` (`fqnHash`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci; diff --git a/bootstrap/sql/schema/postgres.sql b/bootstrap/sql/schema/postgres.sql index 0c6b64b116ed..c3fecd1a5764 100644 --- a/bootstrap/sql/schema/postgres.sql +++ b/bootstrap/sql/schema/postgres.sql @@ -51,7 +51,7 @@ ALTER TABLE public."DATABASE_CHANGE_LOG" OWNER TO openmetadata_user; CREATE TABLE public.automations_workflow ( id character varying(36) GENERATED ALWAYS AS ((json ->> 'id'::text)) STORED NOT NULL, - name character varying(256) GENERATED ALWAYS AS ((json ->> 'name'::text)) STORED NOT NULL, + name character varying(2048) GENERATED ALWAYS AS ((json ->> 'name'::text)) STORED NOT NULL, workflowtype character varying(256) GENERATED ALWAYS AS ((json ->> 'workflowType'::text)) STORED NOT NULL, status character varying(256) GENERATED ALWAYS AS ((json ->> 'status'::text)) STORED, json jsonb NOT NULL,