projects
/
freeside.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
627408d
)
should really fix bug commiting between each table upgrade, arg, RT#8580
author
ivan
<ivan>
Sat, 5 Jun 2010 20:30:34 +0000
(20:30 +0000)
committer
ivan
<ivan>
Sat, 5 Jun 2010 20:30:34 +0000
(20:30 +0000)
FS/FS/Upgrade.pm
patch
|
blob
|
history
diff --git
a/FS/FS/Upgrade.pm
b/FS/FS/Upgrade.pm
index
a33c510
..
8597b9d
100644
(file)
--- a/
FS/FS/Upgrade.pm
+++ b/
FS/FS/Upgrade.pm
@@
-42,6
+42,10
@@
sub upgrade {
my $data = upgrade_data(%opt);
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";
foreach my $table ( keys %$data ) {
my $class = "FS::$table";
@@
-53,13
+57,10
@@
sub upgrade {
my $start = time;
my $start = time;
- my $oldAutoCommit = $FS::UID::AutoCommit;
- local $FS::UID::AutoCommit = 0;
- local $FS::UID::AutoCommit = 0;
-
$class->_upgrade_data(%opt);
if ( $oldAutoCommit ) {
$class->_upgrade_data(%opt);
if ( $oldAutoCommit ) {
+ warn " committing";
dbh->commit or die dbh->errstr;
}
dbh->commit or die dbh->errstr;
}