@@ -107,6 +107,9 @@ sub Usage {
107107my ($new_minor ) = $new_version =~ $minor_format ;
108108my ($old_minor ) = $old_version =~ $minor_format ;
109109
110+ print " old mayor $old_mayor new mayor $new_mayor \n " ;
111+ print " old minor $old_minor new minor $new_minor \n " ;
112+
110113my $curr_signature_file_name = " $signature_dir /pgrouting--$new_minor .sig" ;
111114my $old_signature_file_name = " $signature_dir /pgrouting--$old_minor .sig" ;
112115my $curr_sql_file_name = " $output_directory /pgrouting--$new_version .sql" ;
@@ -223,19 +226,19 @@ sub generate_upgrade_script {
223226 }
224227
225228 # updating to 3.4+
226- if ($old_mayor == 2 or ( $old_mayor == 3 and $ old_minor < 4) ) {
229+ if ($old_minor < 3.4 ) {
227230 push @commands , drop_special_case_function(" pgr_maxcardinalitymatch(text,boolean)" );
228231 }
229232
230233 # updating to 3.5+
231- if ($old_mayor == 2 or ( $old_mayor == 3 && $ old_minor < 5) ) {
234+ if ($old_minor < 3.5 ) {
232235 push @commands , drop_special_case_function(" pgr_dijkstra(text,anyarray,bigint,boolean)" );
233236 push @commands , drop_special_case_function(" pgr_dijkstra(text,bigint,anyarray,boolean)" );
234237 push @commands , drop_special_case_function(" pgr_dijkstra(text,bigint,bigint,boolean)" );
235238 }
236239
237240 # updating to 3.6+
238- if ($old_mayor == 2 or ( $old_mayor == 3 && $ old_minor < 6) ) {
241+ if ($old_minor < 3.6 ) {
239242 push @commands , drop_special_case_function(" pgr_withpointsksp(text, text, bigint, bigint, integer, boolean, boolean, char, boolean)" );
240243 push @commands , drop_special_case_function(" pgr_astar(text,anyarray,bigint,boolean,integer,double precision,double precision)" );
241244 push @commands , drop_special_case_function(" pgr_astar(text,bigint,anyarray,boolean,integer,double precision,double precision)" );
@@ -251,7 +254,7 @@ sub generate_upgrade_script {
251254 }
252255
253256 # updating to 3.7+
254- if ($old_mayor == 2 or ( $old_mayor == 3 && $old_minor < 7) ) {
257+ if ($old_mayor >= 3.0 && $old_minor < 3.7 ) {
255258 push @commands , drop_special_case_function(" pgr_primbfs(text,anyarray,bigint)" );
256259 push @commands , drop_special_case_function(" pgr_primbfs(text,bigint,bigint)" );
257260 push @commands , drop_special_case_function(" pgr_primdfs(text,anyarray,bigint)" );
@@ -271,7 +274,7 @@ sub generate_upgrade_script {
271274 }
272275
273276 # updating to 3.7+
274- if ($old_mayor == 3 && $ old_minor >= 4 && $old_minor < 8) {
277+ if ($old_minor >= 3. 4 && $old_minor < 3. 8) {
275278 push @commands , drop_special_case_function(" pgr_findcloseedges(text,geometry,double precision,integer,boolean,boolean)" );
276279 push @commands , drop_special_case_function(" pgr_findcloseedges(text,geometry[],double precision,integer,boolean,boolean)" );
277280 }
@@ -285,9 +288,12 @@ sub generate_upgrade_script {
285288 if ($old_mayor == 2) {
286289 push @commands , update_from_version_2();
287290 }
291+
292+ =pod
288293 if ("$old_version" eq "3.0.0") {
289294 push @commands, update_from_version_3_0_0();
290295 }
296+ =cut
291297
292298 # UGH! someone change the definition of the TYPE or reused an existing
293299 # TYPE name which is VERY BAD because other people might be dependent
@@ -453,6 +459,7 @@ sub others_3_0_0 {
453459 ' "",seq,vid,target_array' );
454460 return @commands ;
455461}
462+
456463=pod
457464*****************************************************************
458465code beyond this point is v2.6 specific
0 commit comments