diff options
author | ivan <ivan> | 2008-05-20 03:52:05 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-05-20 03:52:05 +0000 |
commit | f75874410025bf36ba5c9e2ff14b858feeaa0ff5 (patch) | |
tree | e8ba9ce1545ad6300588e926a26a83c9c348c3bb /FS/FS/Upgrade.pm | |
parent | 8688433f7692a9a0891c91f53fff2420099b327c (diff) |
automatically create an index on the new radacct.FreesideStatus column
Diffstat (limited to 'FS/FS/Upgrade.pm')
-rw-r--r-- | FS/FS/Upgrade.pm | 7 |
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)), |