{"id":2342,"date":"2021-01-23T08:44:42","date_gmt":"2021-01-23T07:44:42","guid":{"rendered":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2342"},"modified":"2021-01-23T09:18:47","modified_gmt":"2021-01-23T08:18:47","slug":"1265-data-truncated-for-enum-column","status":"publish","type":"post","link":"https:\/\/digitalia.culturanuova.net\/blog\/?p=2342","title":{"rendered":"#1265 &#8211; Data truncated for ENUM\/SET column"},"content":{"rendered":"\n<p>It\u2019s a strange error, because it\u2019s impossible that a ENUM or SET value exceeds the right width.<\/p>\n\n\n\n<p>I managed to fix this error <a href=\"https:\/\/localhost\/web\/public_html\/mondodigitale\/wordpress\/?p=2050\" data-type=\"URL\" data-id=\"https:\/\/localhost\/web\/public_html\/mondodigitale\/wordpress\/?p=2050\">converting the field to utf8<\/a> and then I converted the whole table to utf8:<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code>ALTER TABLE yourtable CONVERT TO CHARACTER SET utf8;<\/code><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>It\u2019s a strange error, because it\u2019s impossible that a ENUM or SET value exceeds the right width. I managed to fix this error converting the field to utf8 and then I converted the whole table to utf8:<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[579],"tags":[670,11,3],"class_list":["post-2342","post","type-post","status-publish","format-standard","hentry","category-database","tag-data-truncated","tag-mysql","tag-utf8"],"_links":{"self":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2342","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2342"}],"version-history":[{"count":6,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2342\/revisions"}],"predecessor-version":[{"id":2348,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=\/wp\/v2\/posts\/2342\/revisions\/2348"}],"wp:attachment":[{"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2342"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=2342"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/digitalia.culturanuova.net\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=2342"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}