X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUpgrade.pm;h=576676f76ed480e2337c9a0a8ff14ee3c212a7da;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=8597b9d6b44c0f635b4a674e70ca98c962947be9;hpb=7c47d95403d8ff9a93848a6ad9de9dcedca84bde;p=freeside.git diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 8597b9d6b..576676f76 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -42,10 +42,6 @@ sub upgrade { my $data = upgrade_data(%opt); - my $oldAutoCommit = $FS::UID::AutoCommit; - local $FS::UID::AutoCommit = 0; - local $FS::UID::AutoCommit = 0; - foreach my $table ( keys %$data ) { my $class = "FS::$table"; @@ -57,10 +53,13 @@ sub upgrade { my $start = time; + my $oldAutoCommit = $FS::UID::AutoCommit; + local $FS::UID::AutoCommit = 0; + $FS::UID::AutoCommit = 0; + $class->_upgrade_data(%opt); if ( $oldAutoCommit ) { - warn " committing"; dbh->commit or die dbh->errstr; }