X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=33d0fd6d85d22473a01cf04a973a370b765ece8a;hp=c11fd05f1da513aed5f35efdc54fec0709ba4153;hb=a5a4afbb77bbdffc25ae94d10b645b0bcc76e859;hpb=369cc8545df88dd4e717ccd8f6aa8719bc4308b3 diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index c11fd05f1..33d0fd6d8 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -226,13 +226,15 @@ sub dbdef_dist { sub tables_hashref { - my($char_d) = 80; #default maxlength for text fields + my $char_d = 80; #default maxlength for text fields #my(@date_type) = ( 'timestamp', '', '' ); - my(@date_type) = ( 'int', 'NULL', '' ); - my(@perl_type) = ( 'text', 'NULL', '' ); + my @date_type = ( 'int', 'NULL', '' ); + my @perl_type = ( 'text', 'NULL', '' ); my @money_type = ( 'decimal', '', '10,2' ); + my $username_len = 32; #usernamemax config file + return { 'agent' => { @@ -245,6 +247,7 @@ sub tables_hashref { 'disabled', 'char', 'NULL', 1, 'username', 'varchar', 'NULL', $char_d, '_password','varchar', 'NULL', $char_d, + 'ticketing_queueid', 'int', 'NULL', '', ], 'primary_key' => 'agentnum', 'unique' => [], @@ -304,6 +307,7 @@ sub tables_hashref { 'part_bill_event' => { 'columns' => [ 'eventpart', 'serial', '', '', + 'freq', 'varchar', 'NULL', $char_d, 'payby', 'char', '', 4, 'event', 'varchar', '', $char_d, 'eventcode', @perl_type, @@ -331,7 +335,7 @@ sub tables_hashref { ], 'primary_key' => 'billpkgnum', 'unique' => [], - 'index' => [ ['invnum'] ], + 'index' => [ ['invnum'], [ 'pkgnum' ] ], }, 'cust_bill_pkg_detail' => { @@ -430,6 +434,7 @@ sub tables_hashref { #'index' => [ ['last'], ['company'] ], 'index' => [ ['last'], [ 'company' ], [ 'referral_custnum' ], [ 'daytime' ], [ 'night' ], [ 'fax' ], [ 'refnum' ], + [ 'county' ], [ 'state' ], [ 'country' ] ], }, @@ -462,7 +467,7 @@ sub tables_hashref { 'primary_key' => 'taxnum', 'unique' => [], # 'unique' => [ ['taxnum'], ['state', 'county'] ], - 'index' => [], + 'index' => [ [ 'county' ], [ 'state' ], [ 'country' ] ], }, 'cust_pay' => { @@ -558,7 +563,7 @@ sub tables_hashref { ], 'primary_key' => 'pkgnum', 'unique' => [], - 'index' => [ ['custnum'] ], + 'index' => [ ['custnum'], ['pkgpart'] ], }, 'cust_refund' => { @@ -621,6 +626,7 @@ sub tables_hashref { 'plandata', 'text', 'NULL', '', 'disabled', 'char', 'NULL', 1, 'taxclass', 'varchar', 'NULL', $char_d, + 'classnum', 'int', 'NULL', '', ], 'primary_key' => 'pkgpart', 'unique' => [], @@ -972,6 +978,24 @@ sub tables_hashref { 'index' => [], }, + 'cust_tax_exempt_pkg' => { + 'columns' => [ + 'exemptpkgnum', 'serial', '', '', + #'custnum', 'int', '', '', + 'billpkgnum', 'int', '', '', + 'taxnum', 'int', '', '', + 'year', 'int', '', '', + 'month', 'int', '', '', + 'amount', @money_type, + ], + 'primary_key' => 'exemptpkgnum', + 'unique' => [], + 'index' => [ [ 'taxnum', 'year', 'month' ], + [ 'billpkgnum' ], + [ 'taxnum' ] + ], + }, + 'router' => { 'columns' => [ 'routernum', 'serial', '', '', @@ -1119,7 +1143,7 @@ sub tables_hashref { ], 'primary_key' => 'ratedetailnum', 'unique' => [ [ 'ratenum', 'orig_regionnum', 'dest_regionnum' ] ], - 'index' => [], + 'index' => [ [ 'ratenum', 'dest_regionnum' ] ], }, 'rate_region' => { @@ -1255,6 +1279,16 @@ sub tables_hashref { 'index' => [ [ 'disabled' ] ], }, + 'pkg_class' => { + 'columns' => [ + 'classnum', 'serial', '', '', + 'classname', 'varchar', '', $char_d, + ], + 'primary_key' => 'classnum', + 'unique' => [], + 'index' => [], + }, + }; }