2017-07-02 03:50:13 +08:00
|
|
|
#!/bin/bash
|
|
|
|
|
2017-04-04 04:55:37 +08:00
|
|
|
# See https://github.com/CartoDB/data-services/issues/228#issuecomment-280037353
|
2017-04-07 04:24:10 +08:00
|
|
|
# Not run during Docker build phase as it would make the image too big
|
|
|
|
cd /data-services/geocoder
|
|
|
|
./geocoder_download_dumps
|
|
|
|
GEOCODER_DB=`echo "SELECT database_name FROM users WHERE username='geocoder'" | psql -U postgres -t carto_db_development`
|
|
|
|
./geocoder_restore_dump postgres $GEOCODER_DB db_dumps/*.sql
|
2017-04-04 04:55:37 +08:00
|
|
|
rm -r db_dumps
|
|
|
|
chmod +x geocoder_download_patches.sh geocoder_apply_patches.sh
|
|
|
|
./geocoder_download_patches.sh
|
2017-04-07 04:24:10 +08:00
|
|
|
./geocoder_apply_patches.sh postgres $GEOCODER_DB data_patches/*.sql
|
2017-04-04 04:55:37 +08:00
|
|
|
rm -r data_patches
|