]> git.openstreetmap.org Git - rails.git/blobdiff - script/vagrant/setup/provision.sh
Fix vagrant to install all thee 3GL functions
[rails.git] / script / vagrant / setup / provision.sh
index 47534b84d66a4fb7e03a617ba6e77a58284381cd..9cbe7849bcddc6b35abf5ba6f2b6169b697775ef 100644 (file)
@@ -47,8 +47,9 @@ fi
 # build and set up postgres extensions
 pushd db/functions
 sudo -u vagrant make
-sudo -u vagrant psql openstreetmap -c "drop function if exists maptile_for_point(int8, int8, int4)"
-sudo -u vagrant psql openstreetmap -c "CREATE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT"
+sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION maptile_for_point(int8, int8, int4) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'maptile_for_point' LANGUAGE C STRICT"
+sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION tile_for_point(int4, int4) RETURNS int8 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'tile_for_point' LANGUAGE C STRICT"
+sudo -u vagrant psql openstreetmap -c "CREATE OR REPLACE FUNCTION xid_to_int4(xid) RETURNS int4 AS '/srv/openstreetmap-website/db/functions/libpgosm.so', 'xid_to_int4' LANGUAGE C STRICT"
 popd
 # set up sample configs
 if [ ! -f config/database.yml ]; then