automatically create an index on the new radacct.FreesideStatus column
authorivan <ivan>
Tue, 20 May 2008 03:52:05 +0000 (03:52 +0000)
committerivan <ivan>
Tue, 20 May 2008 03:52:05 +0000 (03:52 +0000)
FS/FS/Upgrade.pm

index ae9c763..5c873bf 100644 (file)
@@ -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)),