diff options
author | ivan <ivan> | 2001-08-19 13:50:47 +0000 |
---|---|---|
committer | ivan <ivan> | 2001-08-19 13:50:47 +0000 |
commit | 8c7396531e6bf6f7c6cc4e5d19e2d381442223c5 (patch) | |
tree | 5f566ec79715c8864bcbb9385d1a9f5e413cd3e8 /bin | |
parent | b400f5e930df471ad42906ae118f0f3b00cec512 (diff) |
indices on cust_main ship_last and ship_country
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/fs-setup | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/bin/fs-setup b/bin/fs-setup index ec8b75089..7056347e6 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -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' => { |