From 21aa134774b5cfcbffadc00f17e4dbde2530cd9a Mon Sep 17 00:00:00 2001 From: vAugagneur Date: Fri, 26 Apr 2013 12:19:20 +0200 Subject: [PATCH] [-] BO : fixed bug #PSCFV-7411 - Store location problem with some longitude values --- classes/Store.php | 4 ++-- install-dev/data/db_structure.sql | 4 ++-- install-dev/upgrade/sql/1.5.5.0.sql | 3 +++ 3 files changed, 7 insertions(+), 4 deletions(-) create mode 100644 install-dev/upgrade/sql/1.5.5.0.sql diff --git a/classes/Store.php b/classes/Store.php index e40d670e2..22a43ed66 100644 --- a/classes/Store.php +++ b/classes/Store.php @@ -91,8 +91,8 @@ class StoreCore extends ObjectModel 'address2' => array('type' => self::TYPE_STRING, 'validate' => 'isAddress', 'size' => 128), 'postcode' => array('type' => self::TYPE_STRING, 'size' => 12), 'city' => array('type' => self::TYPE_STRING, 'validate' => 'isCityName', 'required' => true, 'size' => 64), - 'latitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate', 'size' => 12), - 'longitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate', 'size' => 12), + 'latitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate', 'size' => 13), + 'longitude' => array('type' => self::TYPE_FLOAT, 'validate' => 'isCoordinate', 'size' => 13), 'hours' => array('type' => self::TYPE_STRING, 'validate' => 'isSerializedArray', 'size' => 254), 'phone' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), 'fax' => array('type' => self::TYPE_STRING, 'validate' => 'isPhoneNumber', 'size' => 16), diff --git a/install-dev/data/db_structure.sql b/install-dev/data/db_structure.sql index 5a06fb9ac..41195aa08 100644 --- a/install-dev/data/db_structure.sql +++ b/install-dev/data/db_structure.sql @@ -1819,8 +1819,8 @@ CREATE TABLE `PREFIX_store` ( `address2` varchar(128) DEFAULT NULL, `city` varchar(64) NOT NULL, `postcode` varchar(12) NOT NULL, - `latitude` decimal(11,8) DEFAULT NULL, - `longitude` decimal(11,8) DEFAULT NULL, + `latitude` decimal(13,8) DEFAULT NULL, + `longitude` decimal(13,8) DEFAULT NULL, `hours` varchar(254) DEFAULT NULL, `phone` varchar(16) DEFAULT NULL, `fax` varchar(16) DEFAULT NULL, diff --git a/install-dev/upgrade/sql/1.5.5.0.sql b/install-dev/upgrade/sql/1.5.5.0.sql new file mode 100644 index 000000000..f2f11e95a --- /dev/null +++ b/install-dev/upgrade/sql/1.5.5.0.sql @@ -0,0 +1,3 @@ +SET NAMES 'utf8'; + +ALTER TABLE `PREFIX_store` CHANGE `latitude` `latitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL , CHANGE `longitude` `longitude` DECIMAL( 13, 8 ) NULL DEFAULT NULL ; \ No newline at end of file