CREATE TABLE `pp_shop_products_additional_fields` ( `id_additional_field` INT NOT NULL AUTO_INCREMENT, `id_product` INT NOT NULL DEFAULT '0', `name` VARCHAR(255) NOT NULL DEFAULT '0', PRIMARY KEY (`id_additional_field`), INDEX `id_product` (`id_product`), CONSTRAINT `FK__pp_shop_products` FOREIGN KEY (`id_product`) REFERENCES `pp_shop_products` (`id`) ON UPDATE CASCADE ON DELETE CASCADE ) COLLATE='utf8mb4_unicode_ci';
RENAME TABLE `pp_shop_products_additional_fields` TO `pp_shop_products_custom_fields`;
ALTER TABLE `pp_shop_order_products` ADD COLUMN `custom_fields` TEXT NULL DEFAULT NULL AFTER `attributes`;