From: ivan Date: Tue, 20 May 2008 03:52:06 +0000 (+0000) Subject: automatically create an index on the new radacct.FreesideStatus column X-Git-Tag: freeside_1_7_4rc1~347 X-Git-Url: http://git.freeside.biz/gitweb/?a=commitdiff_plain;h=c6a3896a049e3375f85c44e9a43d37e59bc1dbf9;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)),