no need to be y1.9k complient
[freeside.git] / bin / fs-setup
index ec8b750..7056347 100755 (executable)
@@ -1,6 +1,6 @@
 #!/usr/bin/perl -Tw
 #
-# $Id: fs-setup,v 1.42 2001-08-13 00:19:02 ivan Exp $
+# $Id: fs-setup,v 1.43 2001-08-19 13:50:47 ivan Exp $
 
 #to delay loading dbdef until we're ready
 BEGIN { $FS::Record::setup_hack = 1; }
@@ -92,10 +92,11 @@ my($dbdef) = new DBIx::DBSchema ( map {
   );
 } (keys %tables) );
 
-#remove ship_ from cust_main
-unless ($ship) {
-  my $cust_main = $dbdef->table('cust_main');
+my $cust_main = $dbdef->table('cust_main');
+unless ($ship) { #remove ship_ from cust_main
   $cust_main->delcolumn($_) foreach ( grep /^ship_/, $cust_main->columns );
+} else { #add indices on ship_last and ship_company
+  push @{$cust_main->index->lol_ref}, ( ['ship_last'], ['ship_company'] ) 
 }
 
 #add radius attributes to svc_acct
@@ -363,7 +364,7 @@ sub tables_hash_hack {
       'primary_key' => 'custnum',
       'unique' => [ [] ],
       #'index' => [ ['last'], ['company'] ],
-      'index' => [ ['last'], ],
+      'index' => [ ['last'], [ 'company' ] ],
     },
 
     'cust_main_invoice' => {