From f75874410025bf36ba5c9e2ff14b858feeaa0ff5 Mon Sep 17 00:00:00 2001 From: ivan Date: Tue, 20 May 2008 03:52:05 +0000 Subject: [PATCH] automatically create an index on the new radacct.FreesideStatus column --- FS/FS/Upgrade.pm | 7 +++++++ 1 file changed, 7 insertions(+) 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)), -- 2.11.0