From aa6cf4c7fc38db581bdc951f8570dd28b24451d7 Mon Sep 17 00:00:00 2001 From: Sio Date: Thu, 13 Apr 2023 11:59:18 +0800 Subject: [PATCH] fixed issue DatabaseException: Illegal mix of collations for operation 'UNION' When the encode is missing you can't execute the sql successfully when init. --- .../src/main/resources/db/migration/changeLog-Schema.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Apromore-Database/src/main/resources/db/migration/changeLog-Schema.yaml b/Apromore-Database/src/main/resources/db/migration/changeLog-Schema.yaml index f73cfd4e16..5bb7eb9504 100644 --- a/Apromore-Database/src/main/resources/db/migration/changeLog-Schema.yaml +++ b/Apromore-Database/src/main/resources/db/migration/changeLog-Schema.yaml @@ -811,7 +811,7 @@ databaseChangeLog: replaceIfExists: true context: MYSQL,H2 selectQuery: |2- - select cast(process.id as char(10)) + select convert(cast(process.id as char(10)) using utf8) as value, 'process' as type, process.id as processid, null as logid, null as folderid from process union select process.name @@ -832,7 +832,7 @@ databaseChangeLog: select process_branch.branch_name as value, 'process' as type, process_branch.processid as processid, null as logid, null as folderid from process_branch union - select cast(`log`.id as char(10)) + select convert(cast(`log`.id as char(10)) using utf8) as value, 'log' as type, null as processid, `log`.id as logid, null as folderid from `log` union select `log`.name @@ -1913,4 +1913,4 @@ databaseChangeLog: dbms: 'h2' splitStatements: true sql: CREATE TABLE IF NOT EXISTS storage (id bigint NOT NULL AUTO_INCREMENT, storage_path varchar(200) NOT NULL, prefix varchar(100) NOT NULL, "key" varchar(200) DEFAULT NULL, created varchar(100) NOT NULL,updated varchar(100) NOT NULL,PRIMARY KEY (id)); - stripComments: false \ No newline at end of file + stripComments: false