X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=bin%2Ffs-setup;h=45cb07f477e93054ba888ed1ff066921b138c9ca;hb=26a45c49727ef4505a2f1875aa7dd04be9bbdceb;hp=01e08f77de8aaae39ce4efa20c9cb37dd91e596f;hpb=20bb426a02c0ea54d8feaea7c5da51735ab70293;p=freeside.git diff --git a/bin/fs-setup b/bin/fs-setup index 01e08f77d..45cb07f47 100755 --- a/bin/fs-setup +++ b/bin/fs-setup @@ -1,6 +1,6 @@ #!/usr/bin/perl -Tw # -# $Id: fs-setup,v 1.84 2002-03-22 18:56:32 ivan Exp $ +# $Id: fs-setup,v 1.95 2002-06-28 20:23:54 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' => [ [] ], @@ -742,9 +748,9 @@ sub tables_hash_hack { 'npa', 'char', '', 3, 'nxx', 'char', '', 3, ], - 'primary_key' => 'popnum', + 'primary_key' => 'localnum', 'unique' => [ [] ], - 'index' => [ [ 'npa', 'nxx' ] ], + 'index' => [ [ 'npa', 'nxx' ], [ 'popnum' ] ], }, 'svc_acct' => { @@ -752,6 +758,7 @@ sub tables_hash_hack { 'svcnum', 'int', '', '', 'username', 'varchar', '', $username_len, #unique (& remove dup code) '_password', 'varchar', '', 50, #13 for encryped pw's plus ' *SUSPENDED* (mp5 passwords can be 34) + 'sec_phrase', 'varchar', 'NULL', $char_d, 'popnum', 'int', 'NULL', '', 'uid', 'int', 'NULL', '', 'gid', 'int', 'NULL', '', @@ -764,7 +771,7 @@ sub tables_hash_hack { 'domsvc', 'int', '', '', ], 'primary_key' => 'svcnum', - 'unique' => [ [ 'username', 'domsvc' ] ], + #'unique' => [ [ 'username', 'domsvc' ] ], 'index' => [ ['username'], ['domsvc'] ], }, @@ -926,10 +933,32 @@ 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' ] ], + }, + 'part_export' => { 'columns' => [ 'exportnum', 'int', '', '', - 'svcpart', 'int', '', '', + #'svcpart', 'int', '', '', 'machine', 'varchar', '', $char_d, 'exporttype', 'varchar', '', $char_d, 'nodomain', 'char', 'NULL', 1, @@ -962,6 +991,34 @@ sub tables_hash_hack { 'index' => [ [ 'svcnum' ], [ 'groupname' ] ], }, + 'msgcat' => { + 'columns' => [ + 'msgnum', 'int', '', '', + 'msgcode', 'varchar', '', $char_d, + 'locale', 'varchar', '', 16, + 'msg', 'text', '', '', + ], + 'primary_key' => 'msgnum', + 'unique' => [ [ 'msgcode', 'locale' ] ], + '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;