projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
doh, semicolon
[freeside.git]
/
FS
/
bin
/
freeside-upgrade
diff --git
a/FS/bin/freeside-upgrade
b/FS/bin/freeside-upgrade
index
7ee35c6
..
6ced372
100755
(executable)
--- 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
#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
if ( $DRY_RUN ) {
print
- join(";\n", @bugfix,
dbdef->sql_update_schema( dbdef_dist(datasrc), $dbh )
). ";\n";
+ join(";\n", @bugfix,
@statements
). ";\n";
exit;
} else {
exit;
} else {
- foreach my $statement ( @bugfix ) {
+ foreach my $statement ( @bugfix
, @statements
) {
$dbh->do( $statement )
or die "Error: ". $dbh->errstr. "\n executing: $statement";
}
$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;
}
warn "Schema upgrade completed in ". (time-$start). " seconds\n"; # if $DEBUG;
@@
-149,6
+153,8
@@
$start = time;
upgrade()
unless $DRY_RUN || $opt_s;
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;
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;
$dbh->commit or die $dbh->errstr;
$dbh->disconnect or die $dbh->errstr;
-warn "
C
ommit and disconnection completed in ". (time-$start). " seconds; upgrade done!\n"; # if $DEBUG;
+warn "
Final c
ommit and disconnection completed in ". (time-$start). " seconds; upgrade done!\n"; # if $DEBUG;
###
###