diff --git a/classes/Address.php b/classes/Address.php index 73dac7eb7..abf8ac2a3 100644 --- a/classes/Address.php +++ b/classes/Address.php @@ -124,8 +124,8 @@ class AddressCore extends ObjectModel 'postcode' => array('type' => self::TYPE_STRING, 'validate' => 'isPostCode', 'size' => 12), 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), 'other' => array('type' => self::TYPE_STRING, 'validate' => 'isMessage', 'size' => 300), - 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), - 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), + 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), + 'phone_mobile' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 32), 'dni' => array('type' => self::TYPE_STRING, 'validate' => 'isDniLite', 'size' => 16), 'deleted' => array('type' => self::TYPE_BOOL, 'validate' => 'isBool', 'copy_post' => false), 'date_add' => array('type' => self::TYPE_DATE, 'validate' => 'isDateFormat', 'copy_post' => false), diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql index 522f28efe..0166bb0ec 100644 --- a/install-dev/data/db_structure.sql +++ b/install-dev/data/db_structure.sql @@ -33,8 +33,8 @@ CREATE TABLE `PREFIX_address` ( `postcode` varchar(12) default NULL, `city` varchar(64) NOT NULL, `other` text, - `phone` varchar(16) default NULL, - `phone_mobile` varchar(16) default NULL, + `phone` varchar(32) default NULL, + `phone_mobile` varchar(32) default NULL, `vat_number` varchar(32) default NULL, `dni` varchar(16) DEFAULT NULL, `date_add` datetime NOT NULL, diff --git a/install-dev/upgrade/sql/1.5.4.0.sql b/install-dev/upgrade/sql/1.5.4.0.sql index 96cc876e5..07a10b9f3 100644 --- a/install-dev/upgrade/sql/1.5.4.0.sql +++ b/install-dev/upgrade/sql/1.5.4.0.sql @@ -41,3 +41,6 @@ UPDATE PREFIX_configuration SET `value` = '8388608' WHERE `name` = 'PS_PRODUCT_P ALTER TABLE `PREFIX_guest` ADD `mobile_theme` tinyint(1) NOT NULL DEFAULT 0; ALTER TABLE `PREFIX_orders` ADD `mobile_theme` tinyint(1) NOT NULL DEFAULT 0 AFTER `gift_message`; ALTER TABLE `PREFIX_cart` ADD `mobile_theme` tinyint(1) NOT NULL DEFAULT 0 AFTER `gift_message`; + +ALTER TABLE `PREFIX_address` CHANGE `phone` `phone` varchar(32) default NULL; +ALTER TABLE `PREFIX_address` CHANGE `phone_mobile` `phone_mobile` varchar(32) default NULL;