{"id":4550,"date":"2024-10-11T15:51:19","date_gmt":"2024-10-11T06:51:19","guid":{"rendered":"https:\/\/iis.edu.tama.ac.jp\/wp\/?p=4550"},"modified":"2024-10-11T16:47:45","modified_gmt":"2024-10-11T07:47:45","slug":"mattermost-%e3%81%ae-mysql-postgres-%e3%83%9e%e3%82%a4%e3%82%b0%e3%83%ac%e3%83%bc%e3%82%b7%e3%83%a7%e3%83%b3","status":"publish","type":"post","link":"https:\/\/iis.edu.tama.ac.jp\/wp\/ja\/archives\/daily\/4550","title":{"rendered":"mattermost \u306e MySQL -> Postgres \u30de\u30a4\u30b0\u30ec\u30fc\u30b7\u30e7\u30f3"},"content":{"rendered":"\n<p>\u3044\u3088\u3044\u3088 mattermost \u304b\u3089\u300cMySQL \u306e\u30b5\u30dd\u30fc\u30c8\u3092\u6253\u3061\u5207\u308b\u304b\u3089\u65e9\u3081\u306b Postgres \u306b\u79fb\u884c\u3059\u308b\u3088\u3046\u306b\u300d\u3068\u3044\u3046\u6307\u4ee4\u304c\u5c4a\u304d\u307e\u3057\u305f\u3002https:\/\/docs.mattermost.com\/deploy\/postgres-migration-assist-tool.html \u3092\u898b\u306a\u304c\u3089\u51e6\u7406\u3092\u59cb\u3081\u305f\u3068\u3053\u308d\u3001\u30c6\u30fc\u30d6\u30eb\u306e collation \u304c\u4e00\u90e8\u7570\u306a\u3063\u3066\u3044\u308b\u3068\u306e\u30a8\u30e9\u30fc\u3067\u6b62\u307e\u308a\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>An Error Occurred: error during running unicode checks for mysql: error during running checks: Error 1267 (HY000): Illegal mix of collations (utf8_general_ci,IMPLICIT) and (utf8_unicode_ci,IMPLICIT) for operation '='<\/code><\/pre>\n\n\n\n<p>\u3068\u306f\u3044\u3048\u3001\u30c6\u30fc\u30d6\u30eb\u304c 100 \u500b\u307b\u3069\u3042\u308b\u3088\u3046\u306a\u306e\u3067\u3001\u3044\u3061\u3044\u3061\u8abf\u3079\u308b\u308f\u3051\u306b\u306f\u3044\u304b\u306a\u3044\uff01\u3000\u3068\u3044\u3046\u3053\u3068\u3067\u3001MySQL \u3067\u30c6\u30fc\u30d6\u30eb\u60c5\u5831\u3092\u5f15\u3063\u5f35\u3063\u3066\u304f\u308b\u547d\u4ee4\u3092\u767a\u884c\u3057\u307e\u3057\u305f\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MariaDB &#91;mattermost]&gt; select TABLE_SCHEMA, TABLE_NAME,TABLE_COLLATION from information_schema.tables as t where t.TABLE_SCHEMA='mattermost' and t.TABLE_COLLATION like '%unicode%';\n+--------------+-------------------------+-----------------+\n| TABLE_SCHEMA | TABLE_NAME              | TABLE_COLLATION |\n+--------------+-------------------------+-----------------+\n| mattermost   | NotifyAdmin             | utf8_unicode_ci |\n| mattermost   | DesktopTokens           | utf8_unicode_ci |\n| mattermost   | PersistentNotifications | utf8_unicode_ci |\n| mattermost   | PostReminders           | utf8_unicode_ci |\n| mattermost   | RecentSearches          | utf8_unicode_ci |\n+--------------+-------------------------+-----------------+\n5 rows in set (0.003 sec)<\/code><\/pre>\n\n\n\n<p>\u3053\u306e\u304f\u3089\u3044\u306a\u3089\u3001\u624b\u4f5c\u696d\u3067\u3059\u3079\u3066\u5909\u66f4\u3059\u308b\u3053\u3068\u306b\u3057\u307e\u3057\u305f\u3002\u3053\u308c\u3067\u3044\u3051\u308b\u306e\u304b\uff1f\uff08\u7d9a\u304f\uff09<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MariaDB &#91;mattermost]&gt; ALTER TABLE RecentSearches  CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;<\/code><\/pre>\n\n\n\n<p>\u2026\u2026\u307e\u3060\u3060\u3081\u3002\u3069\u3053\u304b\u3067 implicit \u306b collation \u304c\u5b9a\u7fa9\u3055\u308c\u3066\u3044\u308b\u30d5\u30a3\u30fc\u30eb\u30c9\u304c\u3042\u308b\u3089\u3057\u3044\u3002<\/p>\n\n\n\n<p>10\/11 \u30a2\u30c3\u30d7\u30c7\u30fc\u30c8\uff1a\u304a\u304a\u3082\u3068\u306e\u30c7\u30fc\u30bf\u30d9\u30fc\u30b9\u306e collation \u3092\u8a2d\u5b9a\u3059\u308b\u306e\u304c\u6b63\u89e3\u3067\u3057\u305f\u3002\u3053\u308c\u3067\u3001<code>migration-assist<\/code> \u306e\u7b2c\uff11\u30b9\u30c6\u30c3\u30d7\u7d42\u4e86\u3067\u3059\u3002<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>MariaDB &#91;mattermost]> alter database mattermost character set utf8mb4 collate utf8mb4_general_ci;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>\u3044\u3088\u3044\u3088 mattermost \u304b\u3089\u300cMySQL \u306e\u30b5\u30dd\u30fc\u30c8\u3092\u6253\u3061\u5207\u308b\u304b\u3089\u65e9\u3081\u306b Postgres \u306b\u79fb\u884c\u3059\u308b\u3088\u3046\u306b\u300d\u3068\u3044\u3046\u6307\u4ee4\u304c\u5c4a\u304d\u307e\u3057\u305f\u3002https:\/\/docs.mattermost.com\/deploy\/post [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"status","meta":{"footnotes":""},"categories":[92,5],"tags":[160,162],"class_list":["post-4550","post","type-post","status-publish","format-status","hentry","category-tb-ja","category-daily","tag-160","tag-162","post_format-post-format-status"],"_links":{"self":[{"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/posts\/4550","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/comments?post=4550"}],"version-history":[{"count":7,"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/posts\/4550\/revisions"}],"predecessor-version":[{"id":4559,"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/posts\/4550\/revisions\/4559"}],"wp:attachment":[{"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/media?parent=4550"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/categories?post=4550"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/iis.edu.tama.ac.jp\/wp\/wp-json\/wp\/v2\/tags?post=4550"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}