From 1562ec19bc8cfc66607009f327c58369007779f2 Mon Sep 17 00:00:00 2001 From: Andrew McMillan Date: Sat, 6 Jun 2009 11:52:53 +1200 Subject: [PATCH] Better sequence initialisation. --- dba/update-apms-database | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dba/update-apms-database b/dba/update-apms-database index cdaf25a..b5164ed 100755 --- a/dba/update-apms-database +++ b/dba/update-apms-database @@ -399,7 +399,7 @@ EOQ } else { my $start = ""; - $start = "START $maxval" if ( $maxval >= 1 ); + $start = "START $maxval" if ( defined($maxval) && $maxval >= 1 ); $sql = "CREATE SEQUENCE ${tablename}_${columname}_seq $start OWNED BY ${tablename}.${columname}"; print STDERR $sql, "\n" if ( $debug ); $dbh->do( $sql ) or die "ERROR: Cannot create sequence ${tablename}_${columname}_seq."; -- 2.11.4.GIT