ALTER TABLE `##_seo_url` ADD INDEX `language_code` (`language_code`);

ALTER TABLE `##_seo_url` ADD INDEX `link_type` (`link_type`);

ALTER TABLE `##_seo_url` ADD INDEX `store_id` (`store_id`);

ALTER TABLE `##_products_permission` ADD INDEX `idx_pid` (`pid`);

ALTER TABLE `##_products_permission` ADD INDEX `idx_permission` (`permission`);

ALTER TABLE `##_products_permission` ADD INDEX `idx_pgroup` (`pgroup`);

ALTER TABLE `##_orders_products` ADD INDEX `idx_products_id_660` (`products_id`);

ALTER TABLE `##_federal_states` CHANGE COLUMN `states_code` `states_code` VARCHAR(5) NOT NULL DEFAULT '' ;

DELETE FROM `##_language_content` WHERE `class` = 'new';

DELETE FROM `##_language_content` WHERE `class` = 'wizard';

ALTER TABLE `##_orders_status_history` ADD INDEX `idx_orders_id` (`orders_id`) ;
ALTER TABLE `##_orders_status_history` ADD INDEX `idx_orders_status_id` (`orders_status_id`);
ALTER TABLE `##_orders_status_history` ADD INDEX `idx_change_trigger` (`change_trigger`);
ALTER TABLE `##_orders_status_history` ADD INDEX `idx_callback_id` (`callback_id` );

ALTER TABLE `##_callback_log` ADD INDEX `idx_module` (`module` );
ALTER TABLE `##_callback_log` ADD INDEX `idx_orders_id` (`orders_id` );
ALTER TABLE `##_callback_log` ADD INDEX `idx_transaction_id` (`transaction_id` );
ALTER TABLE `##_callback_log` ADD INDEX `idx_class` (`class` );

DELETE FROM `##_config` WHERE `config_key` = '_SYSTEM_ORDER_EDIT_SHOW_ORDER_EDITOR_COLUMN';

UPDATE `##_config` SET `config_value` = 'froala' WHERE `config_key` = '_SYSTEM_USE_WYSIWYG';

INSERT INTO `##_media_file_types` (`file_ext`,`file_type`) VALUES ('webp','images');

ALTER TABLE `##_media_to_media_gallery` ADD INDEX `idx_m_id` (`m_id`);

UPDATE `##_customers_addresses` SET customers_company = REPLACE(customers_company, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_company_2 = REPLACE(customers_company_2, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_company_3 = REPLACE(customers_company_3, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_firstname = REPLACE(customers_firstname, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_lastname = REPLACE(customers_lastname, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_street_address = REPLACE(customers_street_address, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_address_addition = REPLACE(customers_address_addition, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_suburb = REPLACE(customers_suburb, "&amp;", "&");
UPDATE `##_customers_addresses` SET customers_city = REPLACE(customers_city, "&amp;", "&");

ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_name` varchar(255) DEFAULT NULL AFTER `products_sorting2`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_email` varchar(255) DEFAULT NULL AFTER `compliance_name`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_address_1` varchar(255) DEFAULT NULL AFTER `compliance_email`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_address_2` varchar(255) DEFAULT NULL AFTER `compliance_address_1`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_zip_code` varchar(20) DEFAULT NULL AFTER `compliance_address_2`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_city` varchar(50) DEFAULT NULL AFTER `compliance_zip_code`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_country_code` char(2) DEFAULT NULL AFTER `compliance_city`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_phone` varchar(255) DEFAULT NULL AFTER `compliance_country_code`;

ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_name` varchar(255) DEFAULT NULL AFTER `compliance_phone`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_email` varchar(255) DEFAULT NULL AFTER `compliance_responsible_name`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_address_1` varchar(255) DEFAULT NULL AFTER `compliance_responsible_email`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_address_2` varchar(255) DEFAULT NULL AFTER `compliance_responsible_address_1`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_zip_code` varchar(20) DEFAULT NULL AFTER `compliance_responsible_address_2`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_city` varchar(50) DEFAULT NULL AFTER `compliance_responsible_zip_code`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_country_code` char(2) DEFAULT NULL AFTER `compliance_responsible_city`;
ALTER TABLE `##_manufacturers` ADD COLUMN `compliance_responsible_phone` varchar(255) DEFAULT NULL AFTER `compliance_responsible_country_code`;

ALTER TABLE `##_stores` DROP `shop_http`;
ALTER TABLE `##_stores` DROP `shop_https`;
