From bfc717e241527f37bfefa387ce5fdfdd8e69e6c2 Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Thu, 28 Mar 2013 12:06:32 +0100 Subject: [PATCH] [-] BO : fixed bug #PSCFV-8095 now maximum weigh for carrier is float --- classes/Carrier.php | 2 +- install-dev/data/db_structure.sql | 2 +- install-dev/upgrade/sql/1.5.4.1.sql | 3 +++ 3 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 install-dev/upgrade/sql/1.5.4.1.sql diff --git a/classes/Carrier.php b/classes/Carrier.php index 78ba293ab..f7a49f1b1 100644 --- a/classes/Carrier.php +++ b/classes/Carrier.php @@ -128,7 +128,7 @@ class CarrierCore extends ObjectModel 'max_width' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'max_height' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), 'max_depth' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), - 'max_weight' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt'), + 'max_weight' => array('type' => self::TYPE_FLOAT, 'validate' => 'isFloat'), 'grade' => array('type' => self::TYPE_INT, 'validate' => 'isUnsignedInt', 'size' => 1), 'external_module_name' => array('type' => self::TYPE_STRING, 'size' => 64), 'is_module' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool'), diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql index 0166bb0ec..5a06fb9ac 100644 --- a/install-dev/data/db_structure.sql +++ b/install-dev/data/db_structure.sql @@ -144,7 +144,7 @@ CREATE TABLE `PREFIX_carrier` ( `max_width` int(10) DEFAULT 0, `max_height` int(10) DEFAULT 0, `max_depth` int(10) DEFAULT 0, - `max_weight` int(10) DEFAULT 0, + `max_weight` DECIMAL(20,6) DEFAULT 0, `grade` int(10) DEFAULT 0, PRIMARY KEY (`id_carrier`), KEY `deleted` (`deleted`,`active`), diff --git a/install-dev/upgrade/sql/1.5.4.1.sql b/install-dev/upgrade/sql/1.5.4.1.sql new file mode 100644 index 000000000..ea631f817 --- /dev/null +++ b/install-dev/upgrade/sql/1.5.4.1.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_carrier` CHANGE `max_weight` `max_weight` DECIMAL( 20, 6 ) NULL DEFAULT '0'; \ No newline at end of file