X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=1828cba8ba4220b0c81205f282d444eccd757a04;hp=4ad9cec149e458d2f467843cad11a13028b11173;hb=7e0eb79c2efc03e27a4e8207b92526a2ac436602;hpb=acc311a412cd8660572eb6de6712a1e0b2768ec1 diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 4ad9cec14..1828cba8b 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -570,6 +570,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 @@ -1879,8 +1880,9 @@ sub tables_hashref { 'index' => [ ['custnum'], ['pkgpart'], [ 'pkgbatch' ], [ 'locationnum' ], [ 'usernum' ], [ 'agent_pkgid' ], ['order_date'], [ 'start_date' ], ['setup'], ['bill'], - ['last_bill'], ['susp'], ['adjourn'], ['cancel'], - ['expire'], ['contract_end'], ['change_date'], + ['last_bill'], ['susp'], ['adjourn'], ['resume'], + ['cancel'], ['expire'], ['contract_end'], + ['change_date'], ['no_auto'], #['contactnum'], ['salesnum'], @@ -2815,7 +2817,7 @@ sub tables_hashref { ], 'primary_key' => 'prepaynum', 'unique' => [ ['identifier'] ], - 'index' => [], + 'index' => [ ['agentnum'] ], }, 'port' => { @@ -2901,6 +2903,21 @@ sub tables_hashref { 'index' => [ [ 'jobnum' ], [ 'depend_jobnum' ] ], }, + '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', '', '', '', '', @@ -3315,6 +3332,18 @@ sub tables_hashref { 'index' => [], }, + 'part_pkg_fcc_option' => { + 'columns' => [ + 'num', 'serial', '', '', '', '', + 'fccoptionname', 'varchar', '', $char_d, '', '', + 'pkgpart', 'int', '', '', '', '', + 'optionvalue', 'varchar', 'NULL', $char_d, '', '', + ], + 'primary_key' => 'num', + 'unique' => [ [ 'fccoptionname', 'pkgpart' ] ], + 'index' => [], + }, + 'rate' => { 'columns' => [ 'ratenum', 'serial', '', '', '', '', @@ -4389,7 +4418,7 @@ sub tables_hashref { 'columns' => [ 'logcontextnum', 'serial', '', '', '', '', 'lognum', 'int', '', '', '', '', - 'context', 'varchar', '', 32, '', '', + 'context', 'varchar', '', $char_d, '', '', ], 'primary_key' => 'logcontextnum', 'unique' => [ [ 'lognum', 'context' ] ], @@ -4459,7 +4488,7 @@ sub tables_hashref { 'mac_addr', 'varchar', 'NULL', 12, '', '', ], 'primary_key' => 'svcnum', - 'unique' => [], + 'unique' => [ ['serialnum'] , ['mac_addr'] ], 'index' => [], }, @@ -4551,7 +4580,7 @@ sub tables_hashref { 'exportnum', 'int', '', '', '', '', '_date', 'int', '', '', '', '', 'status', 'varchar', 'NULL', 32, '', '', - 'statustext', 'varchar', 'NULL', $char_d, '', '', + 'statustext', 'text', 'NULL', '', '', '', ], 'primary_key' => 'batchnum', 'unique' => [], @@ -4569,7 +4598,7 @@ sub tables_hashref { 'itemnum', 'serial', '', '', '', '', 'batchnum', 'int', '', '', '', '', 'svcnum', 'int', '', '', '', '', - 'action', 'varchar', 32, '', '', '', + 'action', 'varchar', '', 32, '', '', 'data', 'text', 'NULL', '', '', '', 'frozen', 'char', 'NULL', 1, '', '', ], @@ -4581,13 +4610,94 @@ 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' => [], + }, + + # eventually link to tower/sector? + 'deploy_zone' => { + 'columns' => [ + 'zonenum', 'serial', '', '', '', '', + 'description', 'char', 'NULL', $char_d, '', '', + 'agentnum', 'int', '', '', '', '', + 'dbaname', 'char', 'NULL', $char_d, '', '', + 'zonetype', 'char', '', 1, '', '', + 'technology', 'int', '', '', '', '', + 'spectrum', 'int', 'NULL', '', '', '', + 'adv_speed_up', 'decimal', '', '10,3', '0', '', + 'adv_speed_down', 'decimal', '', '10,3', '0', '', + 'cir_speed_up', 'decimal', '', '10,3', '0', '', + 'cir_speed_down', 'decimal', '', '10,3', '0', '', + 'is_broadband', 'char', 'NULL', 1, '', '', + 'is_voice', 'char', 'NULL', 1, '', '', + 'is_consumer', 'char', 'NULL', 1, '', '', + 'is_business', 'char', 'NULL', 1, '', '', + 'active_date', @date_type, '', '', + 'expire_date', @date_type, '', '', + ], + 'primary_key' => 'zonenum', + 'unique' => [], + 'index' => [ [ 'agentnum' ] ], + 'foreign_keys' => [ + { columns => [ 'agentnum' ], + table => 'agent', + references => [ 'agentnum' ], + }, + ], + }, + + 'deploy_zone_block' => { + 'columns' => [ + 'blocknum', 'serial', '', '', '', '', + 'zonenum', 'int', '', '', '', '', + 'censusblock', 'char', '', 15, '', '', + 'censusyear', 'char', '', 4, '', '', + ], + 'primary_key' => 'blocknum', + 'unique' => [], + 'index' => [ [ 'zonenum' ] ], + 'foreign_keys' => [ + { columns => [ 'zonenum' ], + table => 'deploy_zone', + references => [ 'zonenum' ], + }, + ], + }, + + 'deploy_zone_vertex' => { + 'columns' => [ + 'vertexnum', 'serial', '', '', '', '', + 'zonenum', 'int', '', '', '', '', + 'latitude', 'decimal', '', '10,7', '', '', + 'longitude', 'decimal', '', '10,7', '', '', + ], + 'primary_key' => 'vertexnum', + 'unique' => [ ], + 'index' => [ ], + 'foreign_keys' => [ + { columns => [ 'zonenum' ], + table => 'deploy_zone', + references => [ 'zonenum' ], }, ], }, + + + + # name type nullability length default local #'new_table' => {