From: ivan Date: Sun, 19 Aug 2001 13:50:47 +0000 (+0000) Subject: indices on cust_main ship_last and ship_country X-Git-Tag: freeside_1_4_0pre11~429 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=8c7396531e6bf6f7c6cc4e5d19e2d381442223c5 indices on cust_main ship_last and ship_country --- 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' => { diff --git a/httemplate/docs/upgrade8.html b/httemplate/docs/upgrade8.html index 1a5c998c6..60f8f1593 100644 --- a/httemplate/docs/upgrade8.html +++ b/httemplate/docs/upgrade8.html @@ -129,6 +129,8 @@ ALTER TABLE cust_main ADD COLUMN ship_country char(2) NULL; ALTER TABLE cust_main ADD COLUMN ship_daytime varchar(20) NULL; ALTER TABLE cust_main ADD COLUMN ship_night varchar(20) NULL; ALTER TABLE cust_main ADD COLUMN ship_fax varchar(12) NULL; +CREATE INDEX cust_main1 ON cust_main ( ship_last ); +CREATE INDEX cust_main2 ON cust_main ( ship_company );
  • If you wish to enable customer comments, apply the following change to your database: