log from utf8mb4-conversion need help to understand.
So I ran the utf8mb4-conversion to update my database. It threw a few errors and I need help to understand what's going on and what do I need to do.
Code:
Processing table [zen_admin_activity_log]:
Temporarily dropped index idx_page_accessed_zen.
Temporarily dropped index idx_access_date_zen.
Temporarily dropped index idx_flagged_zen.
Temporarily dropped index idx_ip_zen.
Temporarily dropped index idx_severity_zen.
Altered field `page_accessed`: `varchar(80) NOT NULL DEFAULT ''`
Altered field `page_parameters`: `text NULL DEFAULT NULL`
Altered field `ip_address`: `varchar(45) NOT NULL DEFAULT ''`
Altered field `attention`: `mediumtext NULL DEFAULT NULL`
Altered field `logmessage`: `mediumtext NOT NULL `
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'info' at line 1
ALTER TABLE `zen_admin_activity_log` MODIFY `severity` VARBINARY(9) NOT NULL DEFAULT info
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'info' at line 1
ALTER TABLE `zen_admin_activity_log` MODIFY `severity` VARCHAR(9) CHARACTER SET utf8mb4 NOT NULL DEFAULT info
Altered field `severity`: `varchar(9) NOT NULL DEFAULT info`
Processing indexes...
Recreated index idx_page_accessed_zen on zen_admin_activity_log (page_accessed).
Recreated index idx_access_date_zen on zen_admin_activity_log (access_date).
Recreated index idx_flagged_zen on zen_admin_activity_log (flagged).
Recreated index idx_ip_zen on zen_admin_activity_log (ip_address).
Recreated index idx_severity_zen on zen_admin_activity_log (severity).
Table collation updated.
Processing table [zen_admin_pages]:
Temporarily dropped unique index page_key.
Altered field `page_key`: `varchar(191) NOT NULL DEFAULT ''`
Altered field `language_key`: `varchar(255) NOT NULL DEFAULT ''`
Altered field `main_page`: `varchar(255) NOT NULL DEFAULT ''`
Altered field `page_params`: `varchar(255) NOT NULL DEFAULT ''`
Altered field `menu_key`: `varchar(191) NOT NULL DEFAULT ''`
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'N' at line 1
ALTER TABLE `zen_admin_pages` MODIFY `display_on_menu` BINARY(1) NOT NULL DEFAULT N
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'N' at line 1
ALTER TABLE `zen_admin_pages` MODIFY `display_on_menu` CHAR(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT N
Altered field `display_on_menu`: `char(1) NOT NULL DEFAULT N`
Processing indexes...
Recreated unique index page_key on zen_admin_pages (page_key).
Table collation updated.
Processing table [zen_coupon_gv_queue]:
Temporarily dropped index idx_cust_id_order_id_zen.
Temporarily dropped index idx_release_flag_zen.
Altered field `ipaddr`: `varchar(45) NOT NULL DEFAULT ''`
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'N' at line 1
ALTER TABLE `zen_coupon_gv_queue` MODIFY `release_flag` BINARY(1) NOT NULL DEFAULT N
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'N' at line 1
ALTER TABLE `zen_coupon_gv_queue` MODIFY `release_flag` CHAR(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT N
Altered field `release_flag`: `char(1) NOT NULL DEFAULT N`
Processing indexes...
Recreated index idx_cust_id_order_id_zen on zen_coupon_gv_queue (customer_id, order_id).
Recreated index idx_release_flag_zen on zen_coupon_gv_queue (release_flag).
Table collation updated.
Processing table [zen_coupon_redeem_track]:
Temporarily dropped index idx_coupon_id_zen.
Altered field `redeem_ip`: `varchar(45) NOT NULL DEFAULT ''`
Processing indexes...
Recreated index idx_coupon_id_zen on zen_coupon_redeem_track (coupon_id).
Table collation updated.
Processing table [zen_coupon_restrict]:
Temporarily dropped index idx_coup_id_prod_id_zen.
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'N' at line 1
ALTER TABLE `zen_coupon_restrict` MODIFY `coupon_restrict` BINARY(1) NOT NULL DEFAULT N
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'N' at line 1
ALTER TABLE `zen_coupon_restrict` MODIFY `coupon_restrict` CHAR(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT N
Altered field `coupon_restrict`: `char(1) NOT NULL DEFAULT N`
Processing indexes...
Recreated index idx_coup_id_prod_id_zen on zen_coupon_restrict (coupon_id, product_id).
Table collation updated.
Processing table [zen_coupons]:
Temporarily dropped index idx_active_type_zen.
Temporarily dropped index idx_coupon_code_zen.
Temporarily dropped index idx_coupon_type_zen.
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'F' at line 1
ALTER TABLE `zen_coupons` MODIFY `coupon_type` BINARY(1) NOT NULL DEFAULT F
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'F' at line 1
ALTER TABLE `zen_coupons` MODIFY `coupon_type` CHAR(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT F
Altered field `coupon_type`: `char(1) NOT NULL DEFAULT F`
Altered field `coupon_code`: `varchar(32) NOT NULL DEFAULT ''`
Altered field `restrict_to_products`: `varchar(255) NULL DEFAULT NULL`
Altered field `restrict_to_categories`: `varchar(255) NULL DEFAULT NULL`
Altered field `restrict_to_customers`: `text NULL DEFAULT NULL`
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Y' at line 1
ALTER TABLE `zen_coupons` MODIFY `coupon_active` BINARY(1) NOT NULL DEFAULT Y
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Y' at line 1
ALTER TABLE `zen_coupons` MODIFY `coupon_active` CHAR(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT Y
Altered field `coupon_active`: `char(1) NOT NULL DEFAULT Y`
Processing indexes...
Recreated index idx_active_type_zen on zen_coupons (coupon_active, coupon_type).
Recreated index idx_coupon_code_zen on zen_coupons (coupon_code).
Recreated index idx_coupon_type_zen on zen_coupons (coupon_type).
Table collation updated.
Processing table [zen_customers]:
Temporarily dropped index idx_email_address_zen.
Temporarily dropped index idx_referral_zen.
Temporarily dropped index idx_grp_pricing_zen.
Temporarily dropped index idx_nick_zen.
Temporarily dropped index idx_newsletter_zen.
Altered field `customers_gender`: `char(1) NOT NULL DEFAULT ''`
Altered field `customers_firstname`: `varchar(32) NOT NULL DEFAULT ''`
Altered field `customers_lastname`: `varchar(32) NOT NULL DEFAULT ''`
Altered field `customers_email_address`: `varchar(96) NOT NULL DEFAULT ''`
Altered field `customers_nick`: `varchar(96) NOT NULL DEFAULT ''`
Altered field `customers_telephone`: `varchar(32) NOT NULL DEFAULT ''`
Altered field `customers_fax`: `varchar(32) NULL DEFAULT NULL`
Altered field `customers_password`: `varchar(255) NOT NULL DEFAULT ''`
Altered field `customers_newsletter`: `char(1) NULL DEFAULT NULL`
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEXT' at line 1
ALTER TABLE `zen_customers` MODIFY `customers_email_format` VARBINARY(4) NOT NULL DEFAULT TEXT
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TEXT' at line 1
ALTER TABLE `zen_customers` MODIFY `customers_email_format` VARCHAR(4) CHARACTER SET utf8mb4 NOT NULL DEFAULT TEXT
Altered field `customers_email_format`: `varchar(4) NOT NULL DEFAULT TEXT`
Altered field `customers_referral`: `varchar(32) NOT NULL DEFAULT ''`
Altered field `customers_paypal_payerid`: `varchar(20) NOT NULL DEFAULT ''`
Altered field `customers_secret`: `varchar(64) NOT NULL DEFAULT ''`
Processing indexes...
Recreated index idx_email_address_zen on zen_customers (customers_email_address).
Recreated index idx_referral_zen on zen_customers (customers_referral(10)).
Recreated index idx_grp_pricing_zen on zen_customers (customers_group_pricing).
Recreated index idx_nick_zen on zen_customers (customers_nick).
Recreated index idx_newsletter_zen on zen_customers (customers_newsletter).
Table collation updated.
Processing table [zen_product_types]:
Temporarily dropped index idx_type_master_type_zen.
Altered field `type_name`: `varchar(255) NOT NULL DEFAULT ''`
Altered field `type_handler`: `varchar(255) NOT NULL DEFAULT ''`
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Y' at line 1
ALTER TABLE `zen_product_types` MODIFY `allow_add_to_cart` BINARY(1) NOT NULL DEFAULT Y
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Y' at line 1
ALTER TABLE `zen_product_types` MODIFY `allow_add_to_cart` CHAR(1) CHARACTER SET utf8mb4 NOT NULL DEFAULT Y
Altered field `allow_add_to_cart`: `char(1) NOT NULL DEFAULT Y`
Altered field `default_image`: `varchar(255) NOT NULL DEFAULT ''`
Processing indexes...
Recreated index idx_type_master_type_zen on zen_product_types (type_master_type).
Table collation updated.
Processing table [zen_so_refunds]:
Temporarily dropped index refund_id.
Altered field `refund_number`: `varchar(32) NOT NULL DEFAULT ''`
Altered field `refund_name`: `varchar(40) NOT NULL DEFAULT ''`
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REF' at line 1
ALTER TABLE `zen_so_refunds` MODIFY `refund_type` VARBINARY(20) NOT NULL DEFAULT REF
MySQL Error: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'REF' at line 1
ALTER TABLE `zen_so_refunds` MODIFY `refund_type` VARCHAR(20) CHARACTER SET utf8mb4 NOT NULL DEFAULT REF
Altered field `refund_type`: `varchar(20) NOT NULL DEFAULT REF`
Processing indexes...
Recreated index refund_id on zen_so_refunds (refund_id).
Table collation updated.
117 Tables processed, 152 Indexes processed, 7 seconds elapsed time.
Re: log from utf8mb4-conversion need help to understand.
So do I just need to change the error ones from utf8 to utf8mb4 in the sql?
Re: log from utf8mb4-conversion need help to understand.
Which version of the conversion tool did you use?
Re: log from utf8mb4-conversion need help to understand.
Quote:
Originally Posted by
lat9
Which version of the conversion tool did you use?
From this site https://github.com/zencart/utf8mb4-converter
Re: log from utf8mb4-conversion need help to understand.
I see this
Code:
`severity` varchar(9) CHARACTER SET utf8 NOT NULL DEFAULT 'info'
in the admin log. Has it as utf8
Re: log from utf8mb4-conversion need help to understand.
I see that @DrByte has a 'pull-request' (i.e. a change) that corrects the missing quotes around a database field's character defaults. Let me see if I can get a package put together and uploaded to the Zen Cart plugins ... I've got another correction staged, too.
Re: log from utf8mb4-conversion need help to understand.
Thank you, Cindy, this is an excellent idea. I'd rather people were using tested modules in the Plugins area than whatever is on the cutting edge in Github. I actually have a PR myself in mind that I haven't submitted yet.
Re: log from utf8mb4-conversion need help to understand.
I've just submitted v1.2-lat9 of the utf8mb4-conversion.php utility for the Zen Cart moderators' review.
This version, split from the plugin's base GitHub repository, adds the quotes required around text-fields' default values and now makes use of the site's database settings present in the associated /includes/configure.php.
Re: log from utf8mb4-conversion need help to understand.
Quote:
Originally Posted by
swguy
Thank you, Cindy, this is an excellent idea. I'd rather people were using tested modules in the Plugins area than whatever is on the cutting edge in Github. I actually have a PR myself in mind that I haven't submitted yet.
Its the same file as from https://www.zen-cart.com/downloads.php?do=file&id=1318
Re: log from utf8mb4-conversion need help to understand.
It was just updated.
I'll fix the help to point people to the Plugins area for this tool rather than Github.