[postgis-tickets] [SCM] PostGIS branch master updated. 3.1.0alpha1-9-g4b6991a

git at osgeo.org git at osgeo.org
Wed Feb 12 12:50:57 PST 2020


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "PostGIS".

The branch, master has been updated
       via  4b6991a8d60faf0a095b2f37dcabf2a54005ad9f (commit)
      from  1bbc4ccaa996033cc444f0eb149135e778451f74 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 4b6991a8d60faf0a095b2f37dcabf2a54005ad9f
Author: Sandro Santilli <strk at kbt.io>
Date:   Wed Feb 12 21:49:49 2020 +0100

    Implement upgrade command

diff --git a/loader/postgis.sh b/loader/postgis.sh
index bb634c9..8fc2842 100644
--- a/loader/postgis.sh
+++ b/loader/postgis.sh
@@ -22,13 +22,17 @@ enable() {
 }
 
 upgrade() {
-  db="$1"; shift
-  test -n "$db" || {
-    echo "Please specify a database name" >&2
+  test -n "$1" || {
+    echo "Please specify at least a database name" >&2
     return 1
   }
-  echo "Upgrade is not implemented yet" >&2
-  return 1
+  for db in $@; do
+    echo "upgrading db $db"
+    LOG=`cat <<EOF | psql -XtA ${db}
+SELECT postgis_extensions_upgrade()
+EOF`
+    #sh $0 status ${db}
+  done
 }
 
 status() {

-----------------------------------------------------------------------

Summary of changes:
 loader/postgis.sh | 14 +++++++++-----
 1 file changed, 9 insertions(+), 5 deletions(-)


hooks/post-receive
-- 
PostGIS


More information about the postgis-tickets mailing list