From: ivan Date: Tue, 20 May 2008 03:52:05 +0000 (+0000) Subject: automatically create an index on the new radacct.FreesideStatus column X-Git-Tag: root_of_webpay_support~637 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=f75874410025bf36ba5c9e2ff14b858feeaa0ff5;p=freeside.git automatically create an index on the new radacct.FreesideStatus column --- diff --git a/FS/FS/Upgrade.pm b/FS/FS/Upgrade.pm index ae9c7637c..5c873bfed 100644 --- a/FS/FS/Upgrade.pm +++ b/FS/FS/Upgrade.pm @@ -132,6 +132,13 @@ sub upgrade_sqlradius { $sth_update->execute or die $sth_update->errstr; } + my $sth_index = $dbh->prepare( + "CREATE INDEX FreesideStatus ON radacct ( FreesideStatus )" + ); + if ( $sth_index ) { + $sth_index->execute; + } + my $sth = $dbh->prepare("SELECT UserName, Realm, $str2time max(AcctStartTime)),