ALTER TABLE `##_orders`  ADD INDEX `idx_date_purchased` (`date_purchased`);

ALTER TABLE `##_failed_login` CHANGE COLUMN `lookup` `lookup` VARCHAR(96) NOT NULL ;

ALTER TABLE `##_customers` CHANGE COLUMN `customers_vat_id_status` `customers_vat_id_status` tinyint(1) UNSIGNED DEFAULT 0 ;

UPDATE  `##_language_content`  set  `class` = 'both' WHERE `language_key` = 'TEXT_CATEGORY';

ALTER TABLE `##_content` CHANGE COLUMN `content_sort` `content_sort` INT NULL DEFAULT '0' ;

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

ALTER TABLE `##_orders_stats` ADD COLUMN `orders_stats_price_net` decimal(15, 4) NULL AFTER `orders_stats_price`;

DELETE FROM `##_acl_nav` WHERE `text` = 'rescission' AND `parent` = 'ordertab';
INSERT INTO `##_acl_nav` (`text`, `icon`, `url_i`, `url_d`, `sortorder`, `parent`, `type`, `navtype`, `cls`, `handler`, `iconCls`, `url_h`) VALUES ('rescission', 'images/icons/cancel.png', '&pg=overview', 'adminHandler.php', 2, 'ordertab', 'I', 'W', NULL, NULL, 'fa fa-times', 'https://xtcommerce.atlassian.net/wiki/spaces/MANUAL/pages/4147609604');

CREATE TABLE IF NOT EXISTS `##_rescission` (
       `rescission_id` INT UNSIGNED NOT NULL AUTO_INCREMENT,
       `order_id` VARCHAR(32) DEFAULT '' ,
       `customer_id` INT UNSIGNED NOT NULL,
       `customer_email` VARCHAR(96) NOT NULL,
       `dt_created` DATETIME NOT NULL,
       `data` TEXT NULL,
       `partly` TINYINT UNSIGNED DEFAULT 0,
       `status` TINYINT UNSIGNED DEFAULT 0,
       `customer_comments` TEXT NULL,
       `admin_comments` TEXT NULL,
   PRIMARY KEY (`rescission_id`),
   INDEX `idx_order_id` (`order_id` DESC),
   INDEX `idx_customer_id` (`customer_id` DESC),
   INDEX `idx_email` (`customer_email`),
   INDEX `idx_status` (`status`)
) ENGINE=Innodb CHARSET=utf8;

ALTER TABLE `##_tax_rates` ADD COLUMN `tax_rate_federal_state` VARCHAR(255) NULL DEFAULT NULL AFTER `tax_rate_countries`;



