diff --git a/UPDATE.README b/UPDATE.README index ae0405e..2bae657 100644 --- a/UPDATE.README +++ b/UPDATE.README @@ -3,4 +3,5 @@ Always make a backup. Be very careful when updating app/Config directory files. Take very special attention to core.php , do not update salt and cipherSeed. Take very special attention to database schema. -pHAlkaline strongly suggest the use of a diff software, like winmerge , melddiff or similar to see code and db schema changes. \ No newline at end of file +pHAlkaline strongly suggest the use of a diff software, like winmerge , melddiff or similar to see code and db schema changes. +Clear cache , delete all files at app/tmp/cache subdirectories except empty \ No newline at end of file diff --git a/app/Config/Schema/update-1.4.3to1.5.sql b/app/Config/Schema/update-1.4.3to1.5.sql index faf5fb3..9722558 100644 --- a/app/Config/Schema/update-1.4.3to1.5.sql +++ b/app/Config/Schema/update-1.4.3to1.5.sql @@ -2,13 +2,13 @@ SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0; SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0; SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL'; -ALTER TABLE `default_schema`.`phkapa_actions` +ALTER TABLE `phkapa_actions` DROP FOREIGN KEY `phkapa_actions_ibfk_4`; -ALTER TABLE `default_schema`.`phkapa_tickets` +ALTER TABLE `phkapa_tickets` DROP FOREIGN KEY `phkapa_tickets_ibfk_17`; -CREATE TABLE IF NOT EXISTS `default_schema`.`phkapa_customers` ( +CREATE TABLE IF NOT EXISTS `phkapa_customers` ( `id` INT(11) NOT NULL AUTO_INCREMENT, `name` VARCHAR(50) NOT NULL DEFAULT '', `active` TINYINT(1) NOT NULL DEFAULT '1', @@ -20,41 +20,41 @@ AUTO_INCREMENT = 1 DEFAULT CHARACTER SET = utf8 COLLATE = utf8_general_ci; -ALTER TABLE `default_schema`.`phkapa_tickets` +ALTER TABLE `phkapa_tickets` ADD COLUMN `customer_id` INT(11) NULL DEFAULT NULL AFTER `supplier_id`, ADD COLUMN `product` VARCHAR(100) NULL DEFAULT NULL AFTER `customer_id`, ADD INDEX `CustomerIdKey` (`customer_id` ASC); -ALTER TABLE `default_schema`.`phkapa_tickets_revision` +ALTER TABLE `phkapa_tickets_revision` ADD COLUMN `customer_id` INT(11) NULL DEFAULT NULL AFTER `supplier_id`, ADD COLUMN `product` VARCHAR(100) NULL DEFAULT NULL AFTER `customer_id`, ADD INDEX `CustomerIdKey` (`customer_id` ASC), ADD INDEX `SafetyIdKey` (`safety_id` ASC); -ALTER TABLE `default_schema`.`phkapa_actions` +ALTER TABLE `phkapa_actions` ADD CONSTRAINT `phkapa_actions_ibfk_4` FOREIGN KEY (`action_effectiveness_id`) - REFERENCES `default_schema`.`phkapa_action_effectivenesses` (`id`) + REFERENCES `phkapa_action_effectivenesses` (`id`) ON UPDATE CASCADE; -ALTER TABLE `default_schema`.`phkapa_tickets` +ALTER TABLE `phkapa_tickets` ADD CONSTRAINT `phkapa_tickets_ibfk_17` FOREIGN KEY (`customer_id`) - REFERENCES `default_schema`.`phkapa_customers` (`id`) + REFERENCES `phkapa_customers` (`id`) ON UPDATE CASCADE, ADD CONSTRAINT `phkapa_tickets_ibfk_18` FOREIGN KEY (`safety_id`) - REFERENCES `default_schema`.`phkapa_safeties` (`id`) + REFERENCES `phkapa_safeties` (`id`) ON UPDATE CASCADE; -ALTER TABLE `default_schema`.`phkapa_tickets_revision` +ALTER TABLE `phkapa_tickets_revision` ADD CONSTRAINT `phkapa_tickets_revision_ibfk_16` FOREIGN KEY (`customer_id`) - REFERENCES `default_schema`.`phkapa_customers` (`id`) + REFERENCES `phkapa_customers` (`id`) ON UPDATE CASCADE, ADD CONSTRAINT `phkapa_tickets_revision_ibfk_17` FOREIGN KEY (`safety_id`) - REFERENCES `default_schema`.`phkapa_safeties` (`id`) + REFERENCES `phkapa_safeties` (`id`) ON UPDATE CASCADE;