warn "[debug]$me re-using cached dbdef for $file\n" if $DEBUG;
}
$dbdef = $dbdef_cache{$file};
+ FS::Record::fk_methods_init();
}
=item dbdef
'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', '', '', '',
'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' => [],
'pbxsvc', 'int', 'NULL', '', '', '',
'domsvc', 'int', 'NULL', '', '', '',
'locationnum', 'int', 'NULL', '', '', '',
+ 'forward_svcnum', 'int', 'NULL', '', '', '',
'forwarddst', 'varchar', 'NULL', 15, '', '',
'email', 'varchar', 'NULL', 255, '', '',
'lnp_status', 'varchar', 'NULL', $char_d, '', '',
],
},
+ 'log_email' => {
+ 'columns' => [
+ 'logemailnum', 'serial', '', '', '', '',
+ 'context', 'varchar', 'NULL', $char_d, '', '',
+ 'min_level', 'int', 'NULL', '', '', '',
+ 'msgnum', 'int', '', '', '', '',
+ 'to_addr', 'varchar', 'NULL', 255, '', '',
+ ],
+ 'primary_key' => 'logemailnum',
+ 'unique' => [],
+ 'index' => [ ['context'], ['min_level'] ],
+ 'foreign_keys' => [
+ { columns => [ 'msgnum' ],
+ table => 'msg_template',
+ references => [ 'msgnum' ],
+ },
+ ],
+ },
+
'svc_alarm' => {
'columns' => [
# name type null length default local