# necessary because of the evil OR username for older data, be really nice if everything was just migrated to usernum and we could drop username
# This will not be helpful to mysql, but postgres smartly does a bitmap across both indexes, mysql will just use one
- $h_indices{"h_${table}_username"} =
+ $h_indices{"h_${table}_user"} =
DBIx::DBSchema::Index->new({
- 'name' => "h_${table}_username",
+ 'name' => "h_${table}_user",
'unique' => 0,
- 'columns' => [ 'history_username'],
+ 'columns' => [ 'history_user'],
});
}
'add_date', @date_type, '', '',
'disabled', 'char', 'NULL', 1, '', '',
'custnum', 'int', 'NULL', '', '', '',
+ 'refnum', 'int', 'NULL', '', '', '',
],
'primary_key' => 'prospectnum',
'unique' => [],
- 'index' => [ [ 'company' ], [ 'agentnum' ], [ 'disabled' ] ],
+ 'index' => [ ['company'], ['agentnum'], ['disabled'], ['refnum'] ],
'foreign_keys' => [
{ columns => [ 'agentnum' ],
table => 'agent',
{ columns => [ 'custnum' ],
table => 'cust_main',
},
+ { columns => [ 'refnum' ],
+ table => 'part_referral',
+ },
],
},
'successor', 'int', 'NULL', '', '', '',
'family_pkgpart','int', 'NULL', '', '', '',
'delay_start', 'int', 'NULL', '', '', '',
+ 'start_on_hold', 'char', 'NULL', 1, '', '',
'agent_pkgpartid', 'varchar', 'NULL', 20, '', '',
],
'primary_key' => 'pkgpart',
'svc_alarm' => {
'columns' => [
- 'svcnum', 'int', '', '', '', '',
- 'alarmsystemnum', 'int', '', '', '', '',
- 'alarmtypenum', 'int', '', '', '', '',
- 'alarmstationnum', 'int', '', '', '', '',
- 'acctnum', 'varchar', '', $char_d, '', '',
- '_password', 'varchar', '', $char_d, '', '',
- 'location', 'varchar', 'NULL', $char_d, '', '',
+# name type null length default local
+ 'svcnum', 'int', '', '', '', '',
+ 'alarmsystemnum', 'int', '', '', '', '',
+ 'alarmtypenum', 'int', '', '', '', '',
+ 'alarmstationnum', 'int', '', '', '', '',
+ 'acctnum', 'varchar', '', $char_d, '', '',
+ '_password', 'varchar', '', $char_d, '', '',
+ 'location', 'varchar', 'NULL', $char_d, '', '',
+ 'cs_receiver', 'int', 'NULL', '', '', '',
+ 'cs_phonenum', 'varchar', 'NULL', $char_d, '', '',
+ 'serialnum', 'varchar', 'NULL', $char_d, '', '',
#installer (rep)
],
'primary_key' => 'svcnum',