X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2Fbin%2Ffreeside-upgrade;h=6ced37297d6990e736c7e240be098a22e072d2cb;hb=761b6b889a02b9ec593fdba70484dbf07b28d172;hp=7ee35c68d1a15dcb74f4fbdf4d8c395fee2c26b8;hpb=c6ba0fa6271880599ce3d60dcd23de248526f0b8;p=freeside.git diff --git a/FS/bin/freeside-upgrade b/FS/bin/freeside-upgrade index 7ee35c68d..6ced37297 100755 --- a/FS/bin/freeside-upgrade +++ b/FS/bin/freeside-upgrade @@ -60,20 +60,24 @@ if (dbdef->table('cust_main')->column('agent_custid') && ! $opt_s) { #from 1.3 to 1.4... if not, it needs to be hooked into -upgrade here or #you'll lose all the part_svc settings it migrates to part_svc_column +my @statements = + grep { $_ !~ /^CREATE +INDEX +h_queue/ } #useless, holds up queue insertion + dbdef->sql_update_schema( dbdef_dist(datasrc), $dbh ); + if ( $DRY_RUN ) { print - join(";\n", @bugfix, dbdef->sql_update_schema( dbdef_dist(datasrc), $dbh ) ). ";\n"; + join(";\n", @bugfix, @statements ). ";\n"; exit; } else { - foreach my $statement ( @bugfix ) { + foreach my $statement ( @bugfix, @statements ) { $dbh->do( $statement ) or die "Error: ". $dbh->errstr. "\n executing: $statement"; } - warn "Pre-schema change upgrades completed in ". (time-$start). " seconds\n"; # if $DEBUG; - $start = time; +# warn "Pre-schema change upgrades completed in ". (time-$start). " seconds\n"; # if $DEBUG; +# $start = time; - dbdef->update_schema( dbdef_dist(datasrc), $dbh ); +# dbdef->update_schema( dbdef_dist(datasrc), $dbh ); } warn "Schema upgrade completed in ". (time-$start). " seconds\n"; # if $DEBUG; @@ -149,6 +153,8 @@ $start = time; upgrade() unless $DRY_RUN || $opt_s; +$dbh->commit or die $dbh->errstr; + warn "Table updates completed in ". (time-$start). " seconds\n"; # if $DEBUG; $start = time; @@ -161,7 +167,7 @@ $start = time; $dbh->commit or die $dbh->errstr; $dbh->disconnect or die $dbh->errstr; -warn "Commit and disconnection completed in ". (time-$start). " seconds; upgrade done!\n"; # if $DEBUG; +warn "Final commit and disconnection completed in ". (time-$start). " seconds; upgrade done!\n"; # if $DEBUG; ###