X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=8d4f5d1c9cd2b4c27cccc5ebfc24838371a8fa0a;hb=c0affcda31028d9c1df1ed4d581fc9df7fde4581;hp=946cf7f6d9da6c8d560d28c92e0d95b103177b2d;hpb=0b94e40c533288be69a4fe60da36a385d31eff7f;p=freeside.git diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 946cf7f6d..8d4f5d1c9 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -378,8 +378,9 @@ sub tables_hashref { 'custnum', 'int', '', '', '', '', '_date', @date_type, '', '', 'otaker', 'varchar', '', 32, '', '', - 'filename', 'varchar', '', 32, '', '', - 'mime_type', 'varchar', '', 32, '', '', + 'filename', 'varchar', '', 255, '', '', + 'mime_type', 'varchar', '', $char_d, '', '', + 'title', 'varchar', 'NULL', $char_d, '', '', 'body', 'blob', 'NULL', '', '', '', 'disabled', @date_type, '', '', ], @@ -573,7 +574,9 @@ sub tables_hashref { 'amount', 'decimal', 'NULL', '10,4', '', '', 'format', 'char', 'NULL', 1, '', '', 'classnum', 'int', 'NULL', '', '', '', + 'duration', 'int', 'NULL', '', 0, '', 'phonenum', 'varchar', 'NULL', 15, '', '', + 'regionname', 'varchar', 'NULL', $char_d, '', '', 'detail', 'varchar', '', 255, '', '', ], 'primary_key' => 'detailnum', @@ -664,6 +667,8 @@ sub tables_hashref { 'creditbillpkgnum', 'serial', '', '', '', '', 'creditbillnum', 'int', '', '', '', '', 'billpkgnum', 'int', '', '', '', '', + 'billpkgtaxlocationnum', 'int', 'NULL', '', '', '', + 'billpkgtaxratelocationnum', 'int', 'NULL', '', '', '', 'amount', @money_type, '', '', 'setuprecur', 'varchar', '', $char_d, '', '', 'sdate', @date_type, '', '', @@ -671,7 +676,11 @@ sub tables_hashref { ], 'primary_key' => 'creditbillpkgnum', 'unique' => [], - 'index' => [ [ 'creditbillnum' ], [ 'billpkgnum' ], ], + 'index' => [ [ 'creditbillnum' ], + [ 'billpkgnum' ], + [ 'billpkgtaxlocationnum' ], + [ 'billpkgtaxratelocationnum' ], + ], }, 'cust_main' => { @@ -679,6 +688,7 @@ sub tables_hashref { 'custnum', 'serial', '', '', '', '', 'agentnum', 'int', '', '', '', '', 'agent_custid', 'varchar', 'NULL', $char_d, '', '', + 'classnum', 'int', 'NULL', '', '', '', 'custbatch', 'varchar', 'NULL', $char_d, '', '', # 'titlenum', 'int', 'NULL', '', '', '', 'last', 'varchar', '', $char_d, '', '', @@ -746,7 +756,8 @@ sub tables_hashref { 'unique' => [ [ 'agentnum', 'agent_custid' ] ], #'index' => [ ['last'], ['company'] ], 'index' => [ - [ 'agentnum' ], [ 'refnum' ], [ 'custbatch' ], + [ 'agentnum' ], [ 'refnum' ], [ 'classnum' ], + [ 'custbatch' ], [ 'referral_custnum' ], [ 'payby' ], [ 'paydate' ], [ 'archived' ], @@ -835,6 +846,30 @@ sub tables_hashref { 'index' => [ [ 'custnum' ], [ '_date' ], ], }, + 'cust_category' => { + 'columns' => [ + 'categorynum', 'serial', '', '', '', '', + 'categoryname', 'varchar', '', $char_d, '', '', + 'weight', 'int', 'NULL', '', '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'categorynum', + 'unique' => [], + 'index' => [ ['disabled'] ], + }, + + 'cust_class' => { + 'columns' => [ + 'classnum', 'serial', '', '', '', '', + 'classname', 'varchar', '', $char_d, '', '', + 'categorynum', 'int', 'NULL', '', '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'classnum', + 'unique' => [], + 'index' => [ ['disabled'] ], + }, + 'cust_main_exemption' => { 'columns' => [ 'exemptionnum', 'serial', '', '', '', '', @@ -913,6 +948,8 @@ sub tables_hashref { 'passflag', 'char', 'NULL', 1, '', '', # Y = required to list as line item, N = Prohibited 'setuptax', 'char', 'NULL', 1, '', '', # Y = setup tax exempt 'recurtax', 'char', 'NULL', 1, '', '', # Y = recur tax exempt + 'inoutcity', 'char', 'NULL', 1, '', '', # '', 'I', or 'O' + 'inoutlocal', 'char', 'NULL', 1, '', '', # '', 'I', or 'O' 'manual', 'char', 'NULL', 1, '', '', # Y = manually edited 'disabled', 'char', 'NULL', 1, '', '', # Y = tax disabled ], @@ -1076,6 +1113,8 @@ sub tables_hashref { 'billpaypkgnum', 'serial', '', '', '', '', 'billpaynum', 'int', '', '', '', '', 'billpkgnum', 'int', '', '', '', '', + 'billpkgtaxlocationnum', 'int', 'NULL', '', '', '', + 'billpkgtaxratelocationnum', 'int', 'NULL', '', '', '', 'amount', @money_type, '', '', 'setuprecur', 'varchar', '', $char_d, '', '', 'sdate', @date_type, '', '', @@ -1274,6 +1313,7 @@ sub tables_hashref { 'custom', 'char', 'NULL', 1, '', '', 'taxclass', 'varchar', 'NULL', $char_d, '', '', 'classnum', 'int', 'NULL', '', '', '', + 'addon_classnum','int', 'NULL', '', '', '', 'taxproductnum', 'int', 'NULL', '', '', '', 'setup_cost', @money_typen, '', '', 'recur_cost', @money_typen, '', '', @@ -1284,7 +1324,9 @@ sub tables_hashref { ], 'primary_key' => 'pkgpart', 'unique' => [], - 'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'agentnum' ], ], + 'index' => [ [ 'promo_code' ], [ 'disabled' ], [ 'classnum' ], + [ 'agentnum' ], + ], }, 'part_pkg_link' => { @@ -1643,7 +1685,7 @@ sub tables_hashref { 'queue' => { 'columns' => [ 'jobnum', 'serial', '', '', '', '', - 'job', 'text', '', '', '', '', + 'job', 'varchar', '', 512, '', '', '_date', 'int', '', '', '', '', 'status', 'varchar', '', $char_d, '', '', 'statustext', 'text', 'NULL', '', '', '', @@ -1966,14 +2008,16 @@ sub tables_hashref { ], 'primary_key' => 'prefixnum', 'unique' => [], - 'index' => [ [ 'countrycode' ], [ 'regionnum' ] ], + 'index' => [ [ 'countrycode' ], [ 'npa' ], [ 'regionnum' ] ], }, 'usage_class' => { 'columns' => [ - 'classnum', 'serial', '', '', '', '', - 'classname', 'varchar', '', $char_d, '', '', - 'disabled', 'char', 'NULL', 1, '', '', + 'classnum', 'serial', '', '', '', '', + 'weight', 'int', 'NULL', '', '', '', + 'classname', 'varchar', '', $char_d, '', '', + 'format', 'varchar', 'NULL', $char_d, '', '', + 'disabled', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'classnum', 'unique' => [], @@ -2086,6 +2130,7 @@ sub tables_hashref { 'categorynum', 'serial', '', '', '', '', 'categoryname', 'varchar', '', $char_d, '', '', 'weight', 'int', 'NULL', '', '', '', + 'condense', 'char', 'NULL', 1, '', '', 'disabled', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'categorynum', @@ -2149,6 +2194,8 @@ sub tables_hashref { ### # fields for unitel/RSLCOM/convergent that don't map well to asterisk # defaults + # though these are now used elsewhere: + # charged_party, upstream_price, rated_price, carrierid ### #cdr_type: Usage = 1, S&E = 7, OC&C = 8 @@ -2191,19 +2238,36 @@ sub tables_hashref { #NULL, done (or something) 'freesiderewritestatus', 'varchar', 'NULL', 32, '', '', + #an indexed place to put big numbers + 'cdrid', 'bigint', 'NULL', '', '', '', + + #old 'cdrbatch', 'varchar', 'NULL', 255, '', '', + #new + 'cdrbatchnum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'acctid', 'unique' => [], 'index' => [ [ 'calldate' ], [ 'src' ], [ 'dst' ], [ 'dcontext' ], [ 'charged_party' ], - [ 'accountcode' ], [ 'carrierid' ], + [ 'accountcode' ], [ 'carrierid' ], [ 'cdrid' ], [ 'freesidestatus' ], [ 'freesiderewritestatus' ], - [ 'cdrbatch' ], + [ 'cdrbatch' ], [ 'cdrbatchnum' ], ], }, + 'cdr_batch' => { + 'columns' => [ + 'cdrbatchnum', 'serial', '', '', '', '', + 'cdrbatch', 'varchar', 'NULL', 255, '', '', + '_date', @date_type, '', '', + ], + 'primary_key' => 'cdrbatchnum', + 'unique' => [ [ 'cdrbatch' ] ], + 'index' => [], + }, + 'cdr_termination' => { 'columns' => [ 'cdrtermnum', 'bigserial', '', '', '', '',