From: Stéphane Jacob Date: Fri, 13 May 2011 12:29:59 +0000 (+0200) Subject: Adds scripts to retrieve pre geocoded data from dev server. X-Git-Tag: xorg/1.1.2~62^2~20 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=c7d784c58f742f9e5187263bc09765e8993a6875;hp=49f0caac6cf944a238401a74bce2c37c7c99583b;p=platal.git Adds scripts to retrieve pre geocoded data from dev server. Signed-off-by: Stéphane Jacob --- diff --git a/upgrade/1.1.2/README b/upgrade/1.1.2/README new file mode 100644 index 0000000..272bed9 --- /dev/null +++ b/upgrade/1.1.2/README @@ -0,0 +1,2 @@ +Once all sql/php scripts have be run, run retrieve_address_tables.sh and finally xx_retrieve_geocoding.sql. +Then "./formatAddresses.php -g -t g -r e" will format the last ungeocoded addresses. diff --git a/upgrade/1.1.2/retrieve_address_tables.sh b/upgrade/1.1.2/retrieve_address_tables.sh new file mode 100755 index 0000000..94cdb9a --- /dev/null +++ b/upgrade/1.1.2/retrieve_address_tables.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +mysqldump -h murphy geocoding profile_addresses | sed -e 's/profile_addresses/tmp_profile_addresses/' | mysql x5dat +mysqldump -h murphy geocoding profile_addresses_components | mysql x5dat +mysqldump -h murphy geocoding profile_addresses_components_enum | mysql x5dat + diff --git a/upgrade/1.1.2/xx_retrieve_geocoding.sql b/upgrade/1.1.2/xx_retrieve_geocoding.sql new file mode 100644 index 0000000..95da5cd --- /dev/null +++ b/upgrade/1.1.2/xx_retrieve_geocoding.sql @@ -0,0 +1,11 @@ + UPDATE profile_addresses AS pa +INNER JOIN tmp_profile_addresses AS ta ON (pa.pid = ta.pid AND pa.jobid = ta.jobid AND pa.groupid = ta.groupid AND pa.type = ta.type AND pa.text = ta.text) + SET pa.id = ta.id, pa.postalText = ta.postalText, pa.formatted_address = ta.formatted_address, pa.types = ta.types, + pa.latitude = ta.latitude, pa.longitude = ta.longitude, pa.southwest_latitude = ta.southwest_latitude, + pa.southwest_longitude = ta.southwest_longitude, pa.northeast_latitude = ta.northeast_latitude, pa.northeast_longitude = ta.northeast_longitude, + pa.location_type = ta.location_type, pa.partial_match = ta.partial_match, + pa.geocoding_date = ta.geocoding_date, pa.geocoding_calls = ta.geocoding_calls; + +DROP TABLE tmp_profile_addresses; + +-- vim:set syntax=mysql: