X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=bin%2Ffs-setup;h=558a5fdd9532bbe818c82d691df1a72281004b60;hp=535408891e93d0ba6f3889637579c3ab2ad62e65;hb=a973be68d5dc5947a343e7cb886307e903706240;hpb=a7c1b602f88c177db34477ed4cdc1f72603f8995 diff --git a/bin/fs-setup b/bin/fs-setup index 535408891..558a5fdd9 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.87 2002-04-11 22:05:31 ivan Exp $ +# $Id: fs-setup,v 1.92 2002-05-31 22:37:06 ivan Exp $ #to delay loading dbdef until we're ready BEGIN { $FS::Record::setup_hack = 1; } @@ -162,7 +162,9 @@ foreach $attribute (@check_attributes) { #create history tables (false laziness w/create-history-tables) foreach my $table ( grep { ! /^h_/ } $dbdef->tables ) { - my $tableobj = $dbdef->table($table); + my $tableobj = $dbdef->table($table) + or die "unknown table $table"; + my $h_tableobj = DBIx::DBSchema::Table->new( { name => "h_$table", primary_key => 'historynum', @@ -382,7 +384,8 @@ sub tables_hash_hack { 'statustext', 'text', 'NULL', '', ], 'primary_key' => 'eventnum', - 'unique' => [ [ 'eventpart', 'invnum' ] ], + #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ], + 'unique' => [], 'index' => [ ['invnum'], ['status'] ], }, @@ -515,6 +518,8 @@ sub tables_hash_hack { 'state', 'varchar', 'NULL', $char_d, 'county', 'varchar', 'NULL', $char_d, 'country', 'char', '', 2, + 'taxclass', 'varchar', 'NULL', $char_d, + 'exempt_amount', @money_type, 'tax', 'real', '', '', #tax % ], 'primary_key' => 'taxnum', @@ -565,7 +570,7 @@ sub tables_hash_hack { 'address1', 'varchar', '', $char_d, 'address2', 'varchar', 'NULL', $char_d, 'city', 'varchar', '', $char_d, - 'state', 'varchar', '', $char_d, + 'state', 'varchar', 'NULL', $char_d, 'zip', 'varchar', '', 10, 'country', 'char', '', 2, # 'trancode', 'int', '', '', @@ -656,6 +661,7 @@ sub tables_hash_hack { 'plan', 'varchar', 'NULL', $char_d, 'plandata', 'text', 'NULL', '', 'disabled', 'char', 'NULL', 1, + 'taxclass', 'varchar', 'NULL', $char_d, ], 'primary_key' => 'pkgpart', 'unique' => [ [] ], @@ -927,12 +933,23 @@ sub tables_hash_hack { 'index' => [ [ 'jobnum' ] ], }, + 'queue_depend' => { + 'columns' => [ + 'dependnum', 'int', '', '', + 'jobnum', 'int', '', '', + 'depend_jobnum', 'int', '', '', + ], + 'primary_key' => 'dependnum', + 'unique' => [], + 'index' => [ [ 'jobnum' ], [ 'depend_jobnum' ] ], + }, + 'export_svc' => { 'columns' => [ 'exportsvcnum' => 'int', '', '', 'exportnum' => 'int', '', '', 'svcpart' => 'int', '', '', - ] + ], 'primary_key' => 'exportsvcnum', 'unique' => [ [ 'exportnum', 'svcpart' ] ], 'index' => [ [ 'exportnum' ], [ 'svcpart' ] ], @@ -986,6 +1003,22 @@ sub tables_hash_hack { 'index' => [], }, + 'cust_tax_exempt' => { + 'columns' => [ + 'exemptnum', 'int', '', '', + 'custnum', 'int', '', '', + 'taxnum', 'int', '', '', + 'year', 'int', '', '', + 'month', 'int', '', '', + 'amount', @money_type, + ], + 'primary_key' => 'exemptnum', + 'unique' => [ [ 'custnum', 'taxnum', 'year', 'month' ] ], + 'index' => [], + }, + + + ); %tables;