diff options
author | ivan <ivan> | 2008-05-20 03:52:06 +0000 |
---|---|---|
committer | ivan <ivan> | 2008-05-20 03:52:06 +0000 |
commit | c6a3896a049e3375f85c44e9a43d37e59bc1dbf9 (patch) | |
tree | b2372389baf94f453586288862e71e9d0f1fe149 | |
parent | 5f55cf0ba46d389d17fcbb21bd2808d35cd56f72 (diff) |
automatically create an index on the new radacct.FreesideStatus column
-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 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)), |