- 'primary_key' => 'pkgnum',
- 'unique' => [],
- 'index' => [ ['custnum'], ['pkgpart'], [ 'pkgbatch' ], [ 'locationnum' ],
- [ 'usernum' ], [ 'agent_pkgid' ],
- ['order_date'], [ 'start_date' ], ['setup'], ['bill'],
- ['last_bill'], ['susp'], ['adjourn'], ['cancel'],
- ['expire'], ['contract_end'], ['change_date'], ['no_auto'],
- ],
- },
+ 'primary_key' => 'pkgnum',
+ 'unique' => [],
+ 'index' => [ ['custnum'], ['pkgpart'], ['pkgbatch'],
+ ['locationnum'], ['usernum'], ['agent_pkgid'],
+ ['order_date'], [ 'start_date' ], ['setup'], ['bill'],
+ ['last_bill'], ['susp'], ['adjourn'], ['cancel'],
+ ['expire'], ['contract_end'], ['change_date'],
+ ['no_auto'],
+ ],
+ 'foreign_keys' => [
+ { columns => [ 'custnum' ],
+ table => 'cust_main',
+ },
+ { columns => [ 'pkgpart' ],
+ table => 'part_pkg',
+ },
+ { columns => [ 'contactnum' ],
+ table => 'contact',
+ },
+ { columns => [ 'locationnum' ],
+ table => 'cust_location',
+ },
+ { columns => [ 'usernum' ],
+ table => 'access_user',
+ },
+ { columns => [ 'salesnum' ],
+ table => 'sales',
+ },
+ { columns => [ 'uncancel_pkgnum' ],
+ table => 'cust_pkg',
+ references => [ 'pkgnum' ],
+ },
+ { columns => [ 'change_pkgnum' ],
+ table => 'cust_pkg',
+ references => [ 'pkgnum' ],
+ },
+ { columns => [ 'change_pkgpart' ],
+ table => 'part_pkg',
+ references => [ 'pkgpart' ],
+ },
+ { columns => [ 'change_locationnum' ],
+ table => 'cust_location',
+ references => [ 'locationnum' ],
+ },
+ { columns => [ 'change_custnum' ],
+ table => 'cust_main',
+ references => [ 'custnum' ],
+ },
+ { columns => [ 'main_pkgnum' ],
+ table => 'cust_pkg',
+ references => [ 'pkgnum' ],
+ },
+ { columns => [ 'pkglinknum' ],
+ table => 'part_pkg_link',
+ },
+ { columns => [ 'change_to_pkgnum' ],
+ table => 'cust_pkg',
+ references => [ 'pkgnum' ],
+ },
+ ],
+ },