From ddb6c1487ab881cfebc2ee2418acaf20bdc1ab01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Romain=20D=C3=A9nari=C3=A9?= Date: Thu, 7 Nov 2024 16:29:54 +0100 Subject: [PATCH] fix: Update default charset and collation for mysql - EXO-75202 With mysql 8.4, the default charset and collation are updated from UTF to UTF8MB4. In addition NVARCHAR is now deprecated and replaced by VARCHAR. This commit adapt liquibase changes in order to apply this change. Resolves Meeds-io/meeds#2564 --- .../links-rdbms.db.changelog-1.0.0.xml | 26 +- .../metadata-rdbms.db.changelog-1.0.0.xml | 49 ++-- .../social-rdbms.db.changelog-1.0.0.xml | 257 ++++++++++++------ 3 files changed, 219 insertions(+), 113 deletions(-) diff --git a/component/core/src/main/resources/db/changelog/links-rdbms.db.changelog-1.0.0.xml b/component/core/src/main/resources/db/changelog/links-rdbms.db.changelog-1.0.0.xml index 19e1b6d9003..7990a3e2dcd 100644 --- a/component/core/src/main/resources/db/changelog/links-rdbms.db.changelog-1.0.0.xml +++ b/component/core/src/main/resources/db/changelog/links-rdbms.db.changelog-1.0.0.xml @@ -36,14 +36,16 @@ + 9:2bf1a89fd64c5ddbcbb9a7ec7f39bb9a + 9:ab738a13c8adf9c2b302069a62039fa9 - + - + @@ -53,17 +55,19 @@ - + - + + 9:76f551e664fd3aecc6bd90d92eda206f + 9:44402886b9d326ca695631cf320f78eb @@ -71,19 +75,19 @@ - + - + - + @@ -96,4 +100,10 @@ - \ No newline at end of file + + + ALTER TABLE SOC_LINK_SETTINGS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_LINKS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + + + diff --git a/component/core/src/main/resources/db/changelog/metadata-rdbms.db.changelog-1.0.0.xml b/component/core/src/main/resources/db/changelog/metadata-rdbms.db.changelog-1.0.0.xml index 9e07c9a5fb5..ebc0190155d 100644 --- a/component/core/src/main/resources/db/changelog/metadata-rdbms.db.changelog-1.0.0.xml +++ b/component/core/src/main/resources/db/changelog/metadata-rdbms.db.changelog-1.0.0.xml @@ -37,6 +37,8 @@ + 9:0a2f337dc523486dd5e7ce4831b21657 + 9:971c4c0f2b65199e18a17b4be24f6c56 @@ -44,7 +46,7 @@ - + @@ -54,16 +56,18 @@ - + + 9:a4e65111347150fe7c485c0c8a127b69 + 9:e431c1166e876ca7788c2799ffabcb6b - + @@ -71,11 +75,13 @@ - + + 9:f68fb9277e1de878bd3f38c5a2720f5a + 9:c1c64368bdba035f8fdd67c378bcdf04 @@ -83,13 +89,13 @@ - + - + - + @@ -98,16 +104,18 @@ - + + 9:6e43c4b1efd98f990275a9d514cf2a94 + 9:a7d5bc26f7b382c58e58f012628dbdc8 - + @@ -115,19 +123,19 @@ - + - + - - + + @@ -138,8 +146,8 @@ - - + + @@ -173,5 +181,12 @@ - - \ No newline at end of file + + + ALTER TABLE SOC_METADATAS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_METADATA_PROPERTIES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_METADATA_ITEMS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_METADATA_ITEMS_PROPERTIES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + + + diff --git a/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml b/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml index 8f31d31ddf4..5374f6af4cf 100644 --- a/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml +++ b/component/core/src/main/resources/db/changelog/social-rdbms.db.changelog-1.0.0.xml @@ -34,14 +34,16 @@ + 9:3b8b708f94efd4e5fd188a3aca493f95 + 9:9899ce5413e6547650c4ed8a1339f1c7 - + - - + + @@ -51,21 +53,21 @@ - + - + - + - - + + @@ -74,7 +76,7 @@ - + @@ -93,11 +95,12 @@ + 9:8c7220d90531f3c63233584a1ee49a6e - + - + @@ -110,6 +113,7 @@ + 9:5920019eca40dc1e5ab98631319cb231 @@ -117,7 +121,7 @@ - + @@ -129,17 +133,19 @@ + 9:a55d3b177c427faab6a401ae273bc68f + 9:e7cddbf2b48f18d427a1af9c1b53a7d6 - - + + - + @@ -195,53 +201,57 @@ - + 7:c3ca7d3497b2e0b0523e956ac51b7cd8 7:c3de92c3178ae646550a47e0872bf0d3 7:bcd010320c809f5338a4ec3b40dfac00 7:5b06578d177b37a9f7cf8322b47b0818 7:e4bb89b68498a673346e206116538cb4 + 9:20ea6cc18677b619d8ec0c89230c5199 + 9:09f12bb2fdfa2bbb388b28d19e4388f0 - + - + - + - + - + - + + 9:549ae427da30e1f9c7f70387390b8b12 + 9:41cdee54b355be86c0e705a39e6de12f - - + + - + @@ -250,12 +260,14 @@ - + - + + 9:5789915a913ab668d827cd5c492e10e7 + 9:0faefc610e0a23dd5cfb5a4b8447d122 @@ -263,7 +275,7 @@ - + @@ -271,10 +283,10 @@ - + - - + + @@ -283,14 +295,16 @@ 7:c79ef7602443ce4d6bcb45bae3ce6d06 7:b85b7e794c54da597970bc4680e678c1 7:b31d4780c26411f652acab2194175fac + 9:37a25dc0cfee7a1877d7cf94bd204424 + 9:07fb580091db1eb23734f89aabd5fc4d - + - + @@ -299,7 +313,7 @@ - + @@ -309,7 +323,7 @@ - + @@ -322,37 +336,41 @@ + 9:51444be86a76bd916501957b7330808b + 9:f0bfe13e40c7c916837b069233b6487a - + - - + + - + + 9:fee6db118e941563b49a97d90098cf45 + 9:1a16581e86accf181c43870ac9eb8d4f - - - - - + + + + + - + - + ANY - ALTER TABLE SOC_SPACES_MEMBERS MODIFY USER_ID varchar(100) CHARACTER SET utf8 NOT NULL COLLATE utf8_bin; + ALTER TABLE SOC_SPACES_MEMBERS MODIFY USER_ID varchar(100) CHARACTER SET utf8mb4 NOT NULL COLLATE utf8mb4_0900_ai_ci; - + tableName="SOC_SPACES_MEMBERS"/> + @@ -490,13 +508,14 @@ + 9:d39dafb596b8ec68344932cfe2e82ac3 - + - + @@ -554,7 +573,8 @@ - + 9:ce7b1def3ce3eb0949a70971e92a53e7 + @@ -576,8 +596,9 @@ + 9:29a3cad4cdf2052a2928476bdea7c776 @@ -594,6 +615,7 @@ 7:7ca5c5299bebdaac7f2a7ec495a9fe40 8:bc5af3f9bb7233de43162095435a981d 8:07be275888d44afbf758eb009046d967 + 9:927b0e56c5fa68efd5210720bd6e9d6f @@ -601,7 +623,7 @@ - + @@ -612,7 +634,7 @@ - + @@ -626,9 +648,33 @@ + + + - UPDATE SOC_USER_SPACE_BINDING SET USER_SPACE_BINDING_ID=nextval('SEQ_SOC_USER_SPACE_BINDING_ID');UPDATE SOC_GROUP_SPACE_BINDING SET GROUP_SPACE_BINDING_ID=nextval('SEQ_SOC_GROUP_SPACE_BINDING_ID'); + UPDATE SOC_USER_SPACE_BINDING SET USER_SPACE_BINDING_ID=nextval('SEQ_SOC_USER_SPACE_BINDING_ID');UPDATE SOC_GROUP_SPACE_BINDING SET GROUP_SPACE_BINDING_ID=nextval('SEQ_SOC_GROUP_SPACE_BINDING_ID'); + + + + + + + + + + + + + + + + + + + + + @@ -657,6 +703,7 @@ + 9:41e72ddf5ce1dc40870ccf5bea041f0b @@ -665,7 +712,7 @@ - + @@ -676,6 +723,7 @@ + 9:2cd75cd40a4f82519481e83e4f3e837f @@ -687,10 +735,10 @@ - + - + @@ -708,10 +756,10 @@ - + - + @@ -739,22 +787,24 @@ + 9:780043208b608112ffeafc774c0c89c9 - + - + + 9:528d03ce86abe2413685425a47c35dc8 - + @@ -769,6 +819,7 @@ + 9:2a4758a44c81553f686dd6517db20b48 @@ -783,7 +834,7 @@ - + @@ -816,19 +867,19 @@ - - - - - - - - - - - - - + + + + + + + + + + + + + @@ -840,11 +891,13 @@ + 9:036e6687b6a2af306195020d013496ed + 9:40c6af67f2ef6582a519367eb22b1848 - + @@ -857,7 +910,7 @@ - + @@ -866,25 +919,27 @@ + 9:087ea7414a31a050f6812fe739ab0cdc + 9:eb11095c277cb9e2c1f51c7d093ea7f0 - + - + - + - + - + @@ -897,15 +952,16 @@ ALTER TABLE SOC_ACTIVITY_SHARE_ACTIONS MODIFY COLUMN TITLE longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci; - + + 9:e3c0eb9208a0c795d5fd0328f9b77e4a - ALTER TABLE SOC_ACTIVITY_TEMPLATE_PARAMS MODIFY COLUMN TEMPLATE_PARAM_KEY NVARCHAR(255) BINARY; + ALTER TABLE SOC_ACTIVITY_TEMPLATE_PARAMS MODIFY COLUMN TEMPLATE_PARAM_KEY VARCHAR(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin; @@ -922,8 +978,9 @@ + 9:4bebfd9baba648fabdcd9d6e02249ad5 - + @@ -1017,4 +1074,28 @@ + + + + ALTER TABLE SOC_SPACES_MEMBERS MODIFY USER_ID varchar(100) CHARACTER SET utf8mb4 NOT NULL COLLATE utf8mb4_0900_ai_ci; + + + + + ALTER TABLE SOC_ACTIVITIES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_ACTIVITY_TEMPLATE_PARAMS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_SPACES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_APPS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_SPACES_MEMBERS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_IDENTITIES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_IDENTITY_PROPERTIES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_IDENTITY_EXPERIENCES CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_ACTIVITY_SHARE_ACTIONS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_PROFILE_PROPERTY_SETTING CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + ALTER TABLE SOC_LABELS CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci; + +