summaryrefslogtreecommitdiff
path: root/FS/FS/Upgrade.pm
diff options
context:
space:
mode:
authorivan <ivan>2008-05-20 03:52:05 +0000
committerivan <ivan>2008-05-20 03:52:05 +0000
commitf75874410025bf36ba5c9e2ff14b858feeaa0ff5 (patch)
treee8ba9ce1545ad6300588e926a26a83c9c348c3bb /FS/FS/Upgrade.pm
parent8688433f7692a9a0891c91f53fff2420099b327c (diff)
automatically create an index on the new radacct.FreesideStatus column
Diffstat (limited to 'FS/FS/Upgrade.pm')
-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 ae9c763..5c873bf 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)),