X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FUpgrade.pm;h=b4c79ea5008e0fd9e465426c5896b9ae9c8a52db;hb=106d0163556c31a3b2cf9c065ec6d9d6ded0ce64;hp=37167a8afdc22f40333576805ee75c3af1413523;hpb=2ebfad10ba4587b06ab3eec10b9a041cfec14d83;p=freeside.git diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index 37167a8af..b4c79ea50 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -103,6 +103,9 @@ sub upgrade_data { #remove bad pending records 'cust_pay_pending' => [], + #replace invnum and pkgnum with billpkgnum + 'cust_bill_pkg_detail' => [], + ; \%hash; @@ -117,20 +120,18 @@ sub upgrade_sqlradius { my @part_export = FS::part_export::sqlradius->all_sqlradius_withaccounting(); foreach my $part_export ( @part_export ) { + + my $errmsg = 'Error adding FreesideStatus to '. + $part_export->option('datasrc'). ': '; + my $dbh = DBI->connect( ( map $part_export->option($_), qw ( datasrc username password ) ), { PrintError => 0, PrintWarn => 0 } - ); - - unless $dbh { - warn "can't connect to RADIUS database ". - $part_export->option('datasrc'). ": $DBI::errstr\n"; + ) or do { + warn $errmsg.$DBI::errstr; next; - } + }; - my $errmsg = 'Error adding FreesideStatus to '. - $part_export->option('datasrc'). ': '; - my $str2time = str2time_sql( $dbh->{Driver}->{Name} ); my $group = "UserName"; $group .= ",Realm"