X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=27bd81374515ffa1f2a3dc54c7f6d427c3dcb702;hb=3804f9a99c6fc77ae36db0cdedd3ddbcff66f1cd;hp=eea43f00f035d834e38bc0accbd09f0a9de2ce0a;hpb=c6b180c6a3dcd014f781215395bd361f30eae9ed;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index eea43f00f..27bd81374 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -200,7 +200,7 @@ sub dbdef_dist { grep { ! /^(clientapi|access_user)_session/ && ! /^h_/ && ! /^log(_context)?$/ - && ( ! /^queue(_arg)?$/ || ! $opt->{'queue-no_history'} ) + && ( ! /^queue(_arg|_depend|_stat)?$/ || ! $opt->{'queue-no_history'} ) && ! $tables_hashref_torrus->{$_} } $dbdef->tables @@ -662,6 +662,7 @@ sub tables_hashref { 'invoice_terms', 'varchar', 'NULL', $char_d, '', '', #customer balance info at invoice generation time + #(deprecated) 'previous_balance', @money_typen, '', '', #eventually not nullable 'billing_balance', @money_typen, '', '', #eventually not nullable @@ -4175,6 +4176,21 @@ sub tables_hashref { ], }, + 'queue_stat' => { + 'columns' => [ + 'statnum', 'bigserial', '', '', '', '', + 'jobnum', 'bigint', '', '', '', '', + 'job', 'varchar', '', 512, '', '', + 'custnum', 'int', 'NULL', '', '', '', + 'insert_date', @date_type, '', '', + 'start_date', @date_type, '', '', + 'end_date', @date_type, '', '', + ], + 'primary_key' => 'statnum', + 'unique' => [], #[ ['jobnum'] ], + 'index' => [], + }, + 'export_svc' => { 'columns' => [ 'exportsvcnum' => 'serial', '', '', '', '', @@ -6640,13 +6656,23 @@ sub tables_hashref { table => 'export_batch', references => [ 'batchnum' ] }, - { columns => [ 'svcnum' ], - table => 'cust_svc', - references => [ 'svcnum' ] - }, ], }, + # lookup table for states, similar to msa and lata + 'state' => { + 'columns' => [ + 'statenum', 'int', '', '', '', '', + 'country', 'char', '', 2, '', '', + 'state', 'char', '', $char_d, '', '', + 'fips', 'char', '', 3, '', '', + ], + 'primary_key' => 'statenum', + 'unique' => [ [ 'country', 'state' ], ], + 'index' => [], + }, + + # name type nullability length default local #'new_table' => {