summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorivan <ivan>2008-05-20 03:52:06 +0000
committerivan <ivan>2008-05-20 03:52:06 +0000
commitc6a3896a049e3375f85c44e9a43d37e59bc1dbf9 (patch)
treeb2372389baf94f453586288862e71e9d0f1fe149
parent5f55cf0ba46d389d17fcbb21bd2808d35cd56f72 (diff)
automatically create an index on the new radacct.FreesideStatus column
-rw-r--r--FS/FS/Upgrade.pm7
1 files changed, 7 insertions, 0 deletions
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)),