]> granicus.if.org Git - postgis/commitdiff
[run_test.pl] Properly upgrade raster from unpackaged
authorSandro Santilli <strk@kbt.io>
Thu, 18 Oct 2018 22:16:41 +0000 (22:16 +0000)
committerSandro Santilli <strk@kbt.io>
Thu, 18 Oct 2018 22:16:41 +0000 (22:16 +0000)
git-svn-id: http://svn.osgeo.org/postgis/trunk@16926 b70326c6-7e19-0410-871a-916f4a2858ee

regress/run_test.pl

index 9eb51c67f49f4e0f408d1096a45366324084d002..a6ab0d00bf397bc3a712300f4b828bbd73b2a25e 100755 (executable)
@@ -1482,7 +1482,7 @@ sub upgrade_spatial_extensions
     if ( $OPT_WITH_RASTER )
     {
       if ( $OPT_UPGRADE_FROM
-           && !  has_split_raster_ext($OPT_UPGRADE_FROM)
+           && ! has_split_raster_ext($OPT_UPGRADE_FROM)
          )
       {
         # upgrade of postgis must have unpackaged raster, so
@@ -1502,6 +1502,10 @@ sub upgrade_spatial_extensions
       {
         my $sql = "ALTER EXTENSION postgis_raster UPDATE TO '${nextver}'";
 
+        if ( $OPT_UPGRADE_FROM eq "unpackaged" ) {
+          $sql = "CREATE EXTENSION postgis_raster VERSION '${nextver}' FROM unpackaged";
+        }
+
         print "Upgrading PostGIS Raster in '${DB}' using: ${sql}\n" ;
 
         my $cmd = "psql $psql_opts -c \"" . $sql . "\" $DB >> $REGRESS_LOG 2>&1";