[freeside-commits] freeside/FS/FS Upgrade.pm,1.31.2.7,1.31.2.8
Ivan,,,
ivan at wavetail.420.am
Tue Jul 27 19:54:48 PDT 2010
Update of /home/cvs/cvsroot/freeside/FS/FS
In directory wavetail.420.am:/tmp/cvs-serv14328
Modified Files:
Tag: FREESIDE_1_9_BRANCH
Upgrade.pm
Log Message:
fix unnecessary warnings on upgrade of remote Pg RADIUS db, RT#9178
Index: Upgrade.pm
===================================================================
RCS file: /home/cvs/cvsroot/freeside/FS/FS/Upgrade.pm,v
retrieving revision 1.31.2.7
retrieving revision 1.31.2.8
diff -u -w -d -r1.31.2.7 -r1.31.2.8
--- Upgrade.pm 28 Jul 2010 02:46:39 -0000 1.31.2.7
+++ Upgrade.pm 28 Jul 2010 02:54:46 -0000 1.31.2.8
@@ -170,7 +170,8 @@
my $str2time = str2time_sql( $dbh->{Driver}->{Name} );
my $group = "UserName";
$group .= ",Realm"
- if ( ref($part_export) =~ /withdomain/ );
+ if ref($part_export) =~ /withdomain/
+ || $dbh->{Driver}->{Name} =~ /^Pg/; #hmm
my $sth_alter = $dbh->prepare(
"ALTER TABLE radacct ADD COLUMN FreesideStatus varchar(32) NULL"
@@ -183,7 +184,10 @@
$sth_update->execute or die $errmsg.$sth_update->errstr;
} else {
my $error = $sth_alter->errstr;
- warn $errmsg.$error unless $error =~ /Duplicate column name/i;
+ warn $errmsg.$error
+ unless $error =~ /Duplicate column name/i #mysql
+ || $error =~ /already exists/i; #Pg
+;
}
} else {
my $error = $dbh->errstr;
@@ -198,7 +202,7 @@
my $error = $sth_index->errstr;
warn $errmsg.$error
unless $error =~ /Duplicate key name/i #mysql
- || $error =~ /relation "freesidestatus" already exists/i; #Pg
+ || $error =~ /already exists/i; #Pg
}
} else {
my $error = $dbh->errstr;
More information about the freeside-commits
mailing list