[-] BO : fixed bug #PSCFV-8095 now maximum weigh for carrier is float

This commit is contained in:
vAugagneur
2013-03-28 12:06:32 +01:00
parent 02baab7393
commit bfc717e241
3 changed files with 5 additions and 2 deletions

View File

@@ -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'),

View File

@@ -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`),

View File

@@ -0,0 +1,3 @@
SET NAMES 'utf8';
ALTER TABLE `PREFIX_carrier` CHANGE `max_weight` `max_weight` DECIMAL( 20, 6 ) NULL DEFAULT '0';