warn "[debug]$me re-using cached dbdef for $file\n" if $DEBUG;
}
$dbdef = $dbdef_cache{$file};
+ FS::Record::fk_methods_init();
}
=item dbdef
'ship_mobile', 'varchar', 'NULL', 12, '', '',
'currency', 'char', 'NULL', 3, '', '',
- #deprecated, info moved to cust_payby
- 'payby', 'char', 'NULL', 4, '', '',
- 'payinfo', 'varchar', 'NULL', 512, '', '',
- 'paycvv', 'varchar', 'NULL', 512, '', '',
- 'paymask', 'varchar', 'NULL', $char_d, '', '',
- #'paydate', @date_type, '', '',
- 'paydate', 'varchar', 'NULL', 10, '', '',
- 'paystart_month', 'int', 'NULL', '', '', '',
- 'paystart_year', 'int', 'NULL', '', '', '',
- 'payissue', 'varchar', 'NULL', 2, '', '',
- 'payname', 'varchar', 'NULL', 2*$char_d, '', '',
- 'paystate', 'varchar', 'NULL', $char_d, '', '',
- 'paytype', 'varchar', 'NULL', $char_d, '', '',
- 'payip', 'varchar', 'NULL', 15, '', '',
-
'geocode', 'varchar', 'NULL', 20, '', '',
'censustract', 'varchar', 'NULL', 20, '', '', # 7 to save space?
'censusyear', 'char', 'NULL', 4, '', '',
['agentnum'], ['refnum'], ['classnum'], ['usernum'],
[ 'custbatch' ],
[ 'referral_custnum' ],
- [ 'payby' ], [ 'paydate' ],
[ 'archived' ],
[ 'ship_locationnum' ],
[ 'bill_locationnum' ],
'classnum', 'int', 'NULL', '', '', '',
'comment', 'varchar', 'NULL', 255, '', '',
'selfservice_access', 'char', 'NULL', 1, '', '',
+ 'invoice_dest', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'custcontactnum',
'unique' => [ [ 'custnum', 'contactnum' ], ],
'quotationpkgnum', 'int', '', '', '', '',
'format', 'char', 'NULL', 1, '', '', # not used for anything
'detail', 'varchar', '', 255, '', '',
+ 'copy_on_order', 'char', 'NULL', 1, '', '', # 'Y' to copy when ordering
],
'primary_key' => 'detailnum',
'unique' => [],
#'exp', @date_type, '', '',
'exp', 'varchar', 'NULL', 11, '', '',
'payname', 'varchar', 'NULL', $char_d, '', '',
+ 'paytype', 'varchar', 'NULL', $char_d, '', '',
'amount', @money_type, '', '',
'currency', 'char', 'NULL', 3, '', '',
'status', 'varchar', 'NULL', $char_d, '', '',
'paymask', 'varchar', 'NULL', $char_d, '', '',
'paybatch', 'varchar', 'NULL', $char_d, '', '',
'closed', 'char', 'NULL', 1, '', '',
+ 'source_paynum', 'int', 'NULL', '', '', '', # link to cust_payby, to prevent unapply of gateway-generated refunds
# credit card/EFT fields (formerly in paybatch)
'gatewaynum', 'int', 'NULL', '', '', '', # payment_gateway FK
'processor', 'varchar', 'NULL', $char_d, '', '', # module name
{ columns => [ 'gatewaynum' ],
table => 'payment_gateway',
},
+ { columns => [ 'source_paynum' ],
+ table => 'cust_pay',
+ references => [ 'paynum' ],
+ },
],
},
'exporttype', 'varchar', '', $char_d, '', '',
'nodomain', 'char', 'NULL', 1, '', '',
'default_machine','int', 'NULL', '', '', '',
+ 'no_suspend', 'char', 'NULL', 1, '', '',
+ # could also have 'no_insert', 'no_replace', etc.
],
'primary_key' => 'exportnum',
'unique' => [],
'rated_ratedetailnum', 'int', 'NULL', '', '', '',
'rated_classnum', 'int', 'NULL', '', '', '',
'rated_ratename', 'varchar', 'NULL', $char_d, '', '',
+ 'rated_cost', 'decimal', 'NULL', '10,4', '', '',
'carrierid', 'bigint', 'NULL', '', '', '',
[ 'freesidestatus' ], [ 'freesiderewritestatus' ],
[ 'cdrbatch' ], [ 'cdrbatchnum' ],
[ 'src_ip_addr' ], [ 'dst_ip_addr' ], [ 'dst_term' ],
+ [ 'detailnum' ],
],
#no FKs on cdr table... choosing not to throw errors no matter what's
# thrown in here. better to have the data.
'access_user_log' => {
'columns' => [
- 'lognum', 'serial', '', '', '', '',
- 'usernum', 'int', '', '', '', '',
- 'path', 'varchar', '', 2*$char_d, '', '',
- '_date', @date_type, '', '',
+ 'lognum', 'serial', '', '', '', '',
+ 'usernum', 'int', '', '', '', '',
+ 'path', 'varchar', '', 2*$char_d, '', '',
+ '_date', @date_type, '', '',
+ 'render_seconds', 'int', 'NULL', '', '', '',
],
'primary_key' => 'lognum',
'unique' => [],