projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
parens help alot
[freeside.git]
/
FS
/
FS
/
Upgrade.pm
diff --git
a/FS/FS/Upgrade.pm
b/FS/FS/Upgrade.pm
index
b4fc82b
..
55eed8e
100644
(file)
--- a/
FS/FS/Upgrade.pm
+++ b/
FS/FS/Upgrade.pm
@@
-122,6
+122,12
@@
sub upgrade_sqlradius {
{ PrintError => 0, PrintWarn => 0 }
);
{ PrintError => 0, PrintWarn => 0 }
);
+ unless ($dbh) {
+ warn "can't connect to RADIUS database ".
+ $part_export->option('datasrc'). ": $DBI::errstr\n";
+ next;
+ }
+
my $errmsg = 'Error adding FreesideStatus to '.
$part_export->option('datasrc'). ': ';
my $errmsg = 'Error adding FreesideStatus to '.
$part_export->option('datasrc'). ': ';
@@
-141,7
+147,7
@@
sub upgrade_sqlradius {
$sth_update->execute or die $errmsg.$sth_update->errstr;
} else {
my $error = $sth_alter->errstr;
$sth_update->execute or die $errmsg.$sth_update->errstr;
} else {
my $error = $sth_alter->errstr;
- warn $errmsg.$error
; #unless $error =~ /exists
/i;
+ warn $errmsg.$error
unless $error =~ /Duplicate column name
/i;
}
} else {
my $error = $dbh->errstr;
}
} else {
my $error = $dbh->errstr;
@@
-154,7
+160,7
@@
sub upgrade_sqlradius {
if ( $sth_index ) {
unless ( $sth_index->execute ) {
my $error = $sth_index->errstr;
if ( $sth_index ) {
unless ( $sth_index->execute ) {
my $error = $sth_index->errstr;
- warn $errmsg.$error
; #unless $error =~ /exists
/i;
+ warn $errmsg.$error
unless $error =~ /Duplicate key name
/i;
}
} else {
my $error = $dbh->errstr;
}
} else {
my $error = $dbh->errstr;