'rate' => {
'columns' => [
- 'ratenum', 'serial', '', '', '', '',
- 'ratename', 'varchar', '',$char_d, '', '',
- 'agentnum', 'int', 'NULL', '', '', '',
- 'default_detailnum', 'int', 'NULL', '', '', '',
+ 'ratenum', 'serial', '', '', '', '',
+ 'ratename', 'varchar', '', $char_d, '', '',
+ 'agentnum', 'int', 'NULL', '', '', '',
+ 'default_detailnum', 'int', 'NULL', '', '', '',
+ 'agent_rateid', 'varchar', 'NULL', $char_d, '', '',
],
'primary_key' => 'ratenum',
- 'unique' => [],
+ 'unique' => [ ['agentnum','agent_rateid'], ],
'index' => [],
'foreign_keys' => [
{ columns => [ 'agentnum' ],
'regionnum', 'serial', '', '', '', '',
'regionname', 'varchar', '', $char_d, '', '',
'exact_match', 'char', 'NULL', 1, '', '',
+ 'agent_regionid', 'varchar', 'NULL', $char_d, '', '',
],
'primary_key' => 'regionnum',
'unique' => [],
- 'index' => [],
+ 'index' => [ ['agent_regionid'] ],
},
'rate_prefix' => {
# FK to cust_bill_pkg_detail; having a value here absolutely means
# that the CDR appears on an invoice
'detailnum', 'bigint', 'NULL', '', '', '',
+
+ #for mediation/deduplication
+ 'sipcallid', 'varchar', 'NULL', 255, '', '',
],
'primary_key' => 'acctid',
'unique' => [],
[ 'freesidestatus' ], [ 'freesiderewritestatus' ],
[ 'cdrbatchnum' ],
[ 'src_ip_addr' ], [ 'dst_ip_addr' ], [ 'dst_term' ],
- [ 'detailnum' ],
+ [ 'detailnum' ], [ 'sipcallid' ],
],
#no FKs on cdr table... choosing not to throw errors no matter what's
# thrown in here. better to have the data.
'is_business', 'char', 'NULL', 1, '', '',
'active_date', @date_type, '', '',
'expire_date', @date_type, '', '',
+ 'disabled', 'char', 'NULL', 1, '', '',
],
'primary_key' => 'zonenum',
'unique' => [],