X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FSchema.pm;h=cdb0d28a649e5a3b6ba0465bd512f6fc90ac57ef;hp=54a4680678688fba658fa52cda596f6c99a84695;hb=091e39d6952f3ae61b4993b19643fec6e4a52979;hpb=92c9e14aa28f017837fb94e4da1d9862e30b02f8 diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm index 54a468067..cdb0d28a6 100644 --- a/FS/FS/Schema.pm +++ b/FS/FS/Schema.pm @@ -56,6 +56,7 @@ sub reload_dbdef { warn "[debug]$me re-using cached dbdef for $file\n" if $DEBUG; } $dbdef = $dbdef_cache{$file}; + FS::Record::fk_methods_init(); } =item dbdef @@ -200,6 +201,7 @@ sub dbdef_dist { grep { ! /^(clientapi|access_user)_session/ && ! /^h_/ && ! /^log(_context)?$/ + && ! /^(legacy_cust_history|cacti_page|template_image|access_user_log)$/ && ( ! /^queue(_arg|_depend|_stat)?$/ || ! $opt->{'queue-no_history'} ) && ! $tables_hashref_torrus->{$_} } @@ -732,8 +734,9 @@ sub tables_hashref { #void fields 'void_date', @date_type, '', '', - 'reason', 'varchar', 'NULL', $char_d, '', '', - 'void_usernum', 'int', 'NULL', '', '', '', + 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', + 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'invnum', 'unique' => [ [ 'custnum', 'agent_invid' ] ], #agentnum? huh @@ -747,6 +750,9 @@ sub tables_hashref { { columns => [ 'statementnum' ], table => 'cust_statement', #_void? both? }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, { columns => [ 'void_usernum' ], table => 'access_user', references => [ 'usernum' ], @@ -778,70 +784,43 @@ sub tables_hashref { ], }, - 'cust_statement' => { + 'legacy_cust_history' => { 'columns' => [ - 'statementnum', 'serial', '', '', '', '', - 'custnum', 'int', '', '', '', '', - '_date', @date_type, '', '', + 'legacyhistorynum', 'serial', '', '', '', '', + 'custnum', 'int', '', '', '', '', + 'history_action', 'varchar', '', $char_d, '', '', + 'history_date', @date_type, '', '', + 'history_usernum', 'int', 'NULL', '', '', '', + 'item', 'varchar', 'NULL', $char_d, '', '', + 'description', 'varchar', 'NULL', 2*$char_d, '', '', + 'change_data', 'text', 'NULL', '', '', '', ], - 'primary_key' => 'statementnum', + 'primary_key' => 'legacyhistorynum', 'unique' => [], - 'index' => [ ['custnum'], ['_date'], ], + 'index' => [ ['custnum'], ['history_date'], ], 'foreign_keys' => [ { columns => [ 'custnum' ], table => 'cust_main', }, - ], - }, - - #old "invoice" events, deprecated - 'cust_bill_event' => { - 'columns' => [ - 'eventnum', 'serial', '', '', '', '', - 'invnum', 'int', '', '', '', '', - 'eventpart', 'int', '', '', '', '', - '_date', @date_type, '', '', - 'status', 'varchar', '', $char_d, '', '', - 'statustext', 'text', 'NULL', '', '', '', - ], - 'primary_key' => 'eventnum', - #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ], - 'unique' => [], - 'index' => [ ['invnum'], ['status'], ['eventpart'], - ['statustext'], ['_date'], - ], - 'foreign_keys' => [ - { columns => [ 'invnum' ], - table => 'cust_bill', - }, - { columns => [ 'eventpart' ], - table => 'part_bill_event', + { columns => [ 'history_usernum' ], + table => 'access_user', + references => [ 'usernum' ], }, ], }, - #old "invoice" events, deprecated - 'part_bill_event' => { + 'cust_statement' => { 'columns' => [ - 'eventpart', 'serial', '', '', '', '', - 'freq', 'varchar', 'NULL', $char_d, '', '', - 'payby', 'char', '', 4, '', '', - 'event', 'varchar', '', $char_d, '', '', - 'eventcode', @perl_type, '', '', - 'seconds', 'int', 'NULL', '', '', '', - 'weight', 'int', '', '', '', '', - 'plan', 'varchar', 'NULL', $char_d, '', '', - 'plandata', 'text', 'NULL', '', '', '', - 'reason', 'int', 'NULL', '', '', '', - 'disabled', 'char', 'NULL', 1, '', '', + 'statementnum', 'serial', '', '', '', '', + 'custnum', 'int', '', '', '', '', + '_date', @date_type, '', '', ], - 'primary_key' => 'eventpart', + 'primary_key' => 'statementnum', 'unique' => [], - 'index' => [ ['payby'], ['disabled'], ], + 'index' => [ ['custnum'], ['_date'], ], 'foreign_keys' => [ - { columns => [ 'reason' ], - table => 'reason', - references => [ 'reasonnum' ], + { columns => [ 'custnum' ], + table => 'cust_main', }, ], }, @@ -944,12 +923,13 @@ sub tables_hashref { '_date', @date_type, '', '', 'status', 'varchar', '', $char_d, '', '', 'statustext', 'text', 'NULL', '', '', '', + 'no_action', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'eventnum', #no... there are retries now #'unique' => [ [ 'eventpart', 'invnum' ] ], 'unique' => [], 'index' => [ ['eventpart'], ['tablenum'], ['status'], - ['statustext'], ['_date'], + ['statustext'], ['_date'], ['no_action'], ], 'foreign_keys' => [ { columns => [ 'eventpart' ], @@ -973,9 +953,9 @@ sub tables_hashref { { columns => [ 'eventnum' ], table => 'cust_event', }, - { columns => [ 'billpkgnum' ], - table => 'cust_bill_pkg', - }, + #{ columns => [ 'billpkgnum' ], + # table => 'cust_bill_pkg', + #}, { columns => [ 'feepart' ], table => 'part_fee', }, @@ -1104,17 +1084,31 @@ sub tables_hashref { { columns => [ 'billpkgnum' ], table => 'cust_bill_pkg', }, - { columns => [ 'base_billpkgnum' ], - table => 'cust_bill_pkg', - references => [ 'billpkgnum' ], - }, - { columns => [ 'base_invnum' ], - table => 'cust_bill', - references => [ 'invnum' ], + ], + }, + + 'cust_bill_pkg_fee_void' => { + 'columns' => [ + 'billpkgfeenum', 'serial', '', '', '', '', + 'billpkgnum', 'int', '', '', '', '', + 'base_invnum', 'int', '', '', '', '', + 'base_billpkgnum', 'int', 'NULL', '', '', '', + 'amount', @money_type, '', '', + ], + 'primary_key' => 'billpkgfeenum', + 'unique' => [], + 'index' => [ ['billpkgnum'], + ['base_invnum'], + ['base_billpkgnum'], + ], + 'foreign_keys' => [ + { columns => [ 'billpkgnum' ], + table => 'cust_bill_pkg_void', }, ], }, + 'cust_bill_pkg_tax_location' => { 'columns' => [ 'billpkgtaxlocationnum', 'serial', '', '', '', '', @@ -1145,10 +1139,10 @@ sub tables_hashref { { columns => [ 'locationnum' ], table => 'cust_location', }, - { columns => [ 'taxable_billpkgnum' ], - table => 'cust_bill_pkg', - references => [ 'billpkgnum' ], - }, + #{ columns => [ 'taxable_billpkgnum' ], + # table => 'cust_bill_pkg', + # references => [ 'billpkgnum' ], + #}, ], }, @@ -1163,6 +1157,7 @@ sub tables_hashref { 'amount', @money_type, '', '', 'currency', 'char', 'NULL', 3, '', '', 'taxable_billpkgnum', 'int', 'NULL', '', '', '', + 'taxclass', 'varchar', 'NULL', 10, '', '', ], 'primary_key' => 'billpkgtaxratelocationnum', 'unique' => [], @@ -1176,10 +1171,10 @@ sub tables_hashref { { columns => [ 'taxratelocationnum' ], table => 'tax_rate_location', }, - { columns => [ 'taxable_billpkgnum' ], - table => 'cust_bill_pkg', - references => [ 'billpkgnum' ], - }, + #{ columns => [ 'taxable_billpkgnum' ], + # table => 'cust_bill_pkg', + # references => [ 'billpkgnum' ], + #}, ], }, @@ -1203,10 +1198,12 @@ sub tables_hashref { 'unitsetup', @money_typen, '', '', 'unitrecur', @money_typen, '', '', 'hidden', 'char', 'NULL', 1, '', '', + 'feepart', 'int', 'NULL', '', '', '', #void fields 'void_date', @date_type, '', '', - 'reason', 'varchar', 'NULL', $char_d, '', '', - 'void_usernum', 'int', 'NULL', '', '', '', + 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', + 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'billpkgnum', 'unique' => [], @@ -1217,6 +1214,9 @@ sub tables_hashref { { columns => [ 'invnum' ], table => 'cust_bill_void', }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, #pkgnum 0 and -1 are used for special things #{ columns => [ 'pkgnum' ], # table => 'cust_pkg', @@ -1309,16 +1309,13 @@ sub tables_hashref { { columns => [ 'billpkgnum' ], table => 'cust_bill_pkg_void', }, - { columns => [ 'pkgnum' ], - table => 'cust_pkg', - }, { columns => [ 'locationnum' ], table => 'cust_location', }, - { columns => [ 'taxable_billpkgnum' ], - table => 'cust_bill_pkg_void', - references => [ 'billpkgnum' ], - }, + #{ columns => [ 'taxable_billpkgnum' ], + # table => 'cust_bill_pkg_void', + # references => [ 'billpkgnum' ], + #}, ], }, @@ -1423,6 +1420,7 @@ sub tables_hashref { #void fields 'void_date', @date_type, '', '', 'void_reason', 'varchar', 'NULL', $char_d, '', '', + 'void_reasonnum', 'int', 'NULL', '', '', '', 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'crednum', @@ -1458,6 +1456,10 @@ sub tables_hashref { table => 'cust_pkg', references => [ 'pkgnum' ], }, + { columns => [ 'void_reasonnum' ], + table => 'reason', + references => [ 'reasonnum' ], + }, { columns => [ 'void_usernum' ], table => 'access_user', references => [ 'usernum' ], @@ -1607,21 +1609,6 @@ sub tables_hashref { '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, '', '', @@ -1650,10 +1637,12 @@ sub tables_hashref { 'message_noemail', 'char', 'NULL', 1, '', '', 'bill_locationnum', 'int', 'NULL', '', '', '', 'ship_locationnum', 'int', 'NULL', '', '', '', - 'taxstatusnum', 'char', 'NULL', 32, '', '', + 'taxstatusnum', 'int', 'NULL', '', '', '', 'complimentary', 'char', 'NULL', 1, '', '', 'po_number', 'varchar', 'NULL', $char_d, '', '', 'invoice_attn', 'varchar', 'NULL', $char_d, '', '', + 'invoice_ship_address', 'char', 'NULL', 1, '', '', + 'postal_invoice', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'custnum', 'unique' => [ [ 'agentnum', 'agent_custid' ] ], @@ -1662,7 +1651,6 @@ sub tables_hashref { ['agentnum'], ['refnum'], ['classnum'], ['usernum'], [ 'custbatch' ], [ 'referral_custnum' ], - [ 'payby' ], [ 'paydate' ], [ 'archived' ], [ 'ship_locationnum' ], [ 'bill_locationnum' ], @@ -1751,6 +1739,7 @@ sub tables_hashref { 'classnum', 'int', 'NULL', '', '', '', 'comment', 'varchar', 'NULL', 255, '', '', 'selfservice_access', 'char', 'NULL', 1, '', '', + 'invoice_dest', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'custcontactnum', 'unique' => [ [ 'custnum', 'contactnum' ], ], @@ -1809,6 +1798,7 @@ sub tables_hashref { '_password', 'varchar', 'NULL', $char_d, '', '', '_password_encoding', 'varchar', 'NULL', $char_d, '', '', 'disabled', 'char', 'NULL', 1, '', '', + 'invoice_dest', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'contactnum', 'unique' => [], @@ -1891,6 +1881,7 @@ sub tables_hashref { 'disabled', 'char', 'NULL', 1, '', '', 'custnum', 'int', 'NULL', '', '', '', 'refnum', 'int', 'NULL', '', '', '', + 'taxstatusnum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'prospectnum', 'unique' => [], @@ -1917,6 +1908,8 @@ sub tables_hashref { '_date', @date_type, '', '', 'disabled', 'char', 'NULL', 1, '', '', 'usernum', 'int', 'NULL', '', '', '', + 'close_date', @date_type, '', '', + 'confidence', 'int', 'NULL', '', '', '', #'total', @money_type, '', '', #'quotation_term', 'varchar', 'NULL', $char_d, '', '', ], @@ -1966,13 +1959,32 @@ sub tables_hashref { ], }, + 'quotation_pkg_detail' => { + 'columns' => [ + 'detailnum', 'serial', '', '', '', '', + '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' => [], + 'index' => [ [ 'quotationpkgnum' ] ], + 'foreign_keys' => [ + { columns => [ 'quotationpkgnum' ], + table => 'quotation_pkg', + references => [ 'quotationpkgnum' ], + }, + ], + }, + 'quotation_pkg_discount' => { 'columns' => [ 'quotationpkgdiscountnum', 'serial', '', '', '', '', 'quotationpkgnum', 'int', '', '', '', '', 'discountnum', 'int', '', '', '', '', - 'setup_amount', @money_typen, '', '', - 'recur_amount', @money_typen, '', '', + 'setuprecur', 'varchar', 'NULL', $char_d, '', '', + 'amount', @money_typen, '', '', #'end_date', @date_type, '', '', ], 'primary_key' => 'quotationpkgdiscountnum', @@ -1988,6 +2000,24 @@ sub tables_hashref { ], }, + 'quotation_pkg_tax' => { + 'columns' => [ + 'quotationtaxnum', 'serial', '', '', '', '', + 'quotationpkgnum', 'int', '', '', '', '', + 'itemdesc', 'varchar', '', $char_d, '', '', + 'setup_amount', @money_type, '', '', + 'recur_amount', @money_type, '', '', + ], + 'primary_key' => 'quotationtaxnum', + 'unique' => [], + 'index' => [ [ 'quotationpkgnum' ] ], + 'foreign_keys' => [ + { columns => [ 'quotationpkgnum' ], + table => 'quotation_pkg', + }, + ], + }, + 'cust_location' => { #'location' now that its prospects too, but... 'columns' => [ 'locationnum', 'serial', '', '', '', '', @@ -1996,7 +2026,7 @@ sub tables_hashref { 'locationname', 'varchar', 'NULL', $char_d, '', '', 'address1', 'varchar', '', $char_d, '', '', 'address2', 'varchar', 'NULL', $char_d, '', '', - 'city', 'varchar', '', $char_d, '', '', + 'city', 'varchar', 'NULL', $char_d, '', '', 'county', 'varchar', 'NULL', $char_d, '', '', 'state', 'varchar', 'NULL', $char_d, '', '', 'zip', 'varchar', 'NULL', 10, '', '', @@ -2227,6 +2257,7 @@ sub tables_hashref { 'taxname', 'varchar', 'NULL', $char_d, '', '', 'setuptax', 'char', 'NULL', 1, '', '', # Y = setup tax exempt 'recurtax', 'char', 'NULL', 1, '', '', # Y = recur tax exempt + 'source', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'taxnum', 'unique' => [], @@ -2418,6 +2449,7 @@ sub tables_hashref { 'payunique', 'varchar', 'NULL', $char_d, '', '',#separate paybatch "unique" functions from current usage 'closed', 'char', 'NULL', 1, '', '', 'pkgnum', 'int', 'NULL', '', '', '', #desired pkgnum for pkg-balances + 'no_auto_apply', 'char', 'NULL', 1, '', '', # cash/check deposit info fields 'bank', 'varchar', 'NULL', $char_d, '', '', @@ -2431,7 +2463,7 @@ sub tables_hashref { 'gatewaynum', 'int', 'NULL', '', '', '', # payment_gateway FK 'processor', 'varchar', 'NULL', $char_d, '', '', # module name 'auth', 'varchar', 'NULL', 16, '', '', # CC auth number - 'order_number','varchar', 'NULL', $char_d, '', '', # transaction number + 'order_number','varchar', 'NULL', 256, '', '', # transaction number ], 'primary_key' => 'paynum', #i guess not now, with cust_pay_pending, if we actually make it here, we _do_ want to record it# 'unique' => [ [ 'payunique' ] ], @@ -2485,11 +2517,12 @@ sub tables_hashref { 'gatewaynum', 'int', 'NULL', '', '', '', # payment_gateway FK 'processor', 'varchar', 'NULL', $char_d, '', '', # module name 'auth', 'varchar', 'NULL', 16, '', '', # CC auth number - 'order_number','varchar', 'NULL', $char_d, '', '', # transaction number + 'order_number','varchar', 'NULL', 256, '', '', # transaction number #void fields 'void_date', @date_type, '', '', 'reason', 'varchar', 'NULL', $char_d, '', '', + 'reasonnum', 'int', 'NULL', '', '', '', 'void_usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'paynum', @@ -2511,6 +2544,9 @@ sub tables_hashref { { columns => [ 'gatewaynum' ], table => 'payment_gateway', }, + { columns => [ 'reasonnum' ], + table => 'reason', + }, { columns => [ 'void_usernum' ], table => 'access_user', references => [ 'usernum' ], @@ -2604,6 +2640,7 @@ sub tables_hashref { 'download', @date_type, '', '', 'upload', @date_type, '', '', 'title', 'varchar', 'NULL',255, '', '', + 'processor_id', 'varchar', 'NULL',255, '', '', ], 'primary_key' => 'batchnum', 'unique' => [], @@ -2625,7 +2662,7 @@ sub tables_hashref { 'first', 'varchar', '', $char_d, '', '', 'address1', 'varchar', '', $char_d, '', '', 'address2', 'varchar', 'NULL', $char_d, '', '', - 'city', 'varchar', '', $char_d, '', '', + 'city', 'varchar', 'NULL', $char_d, '', '', 'state', 'varchar', 'NULL', $char_d, '', '', 'zip', 'varchar', 'NULL', 10, '', '', 'country', 'char', '', 2, '', '', @@ -2634,6 +2671,7 @@ sub tables_hashref { #'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, '', '', @@ -2647,9 +2685,9 @@ sub tables_hashref { { columns => [ 'batchnum' ], table => 'pay_batch', }, - { columns => [ 'invnum' ], - table => 'cust_bill', - }, + #{ columns => [ 'invnum' ], + # table => 'cust_bill', + #}, { columns => [ 'custnum' ], table => 'cust_main', }, @@ -2698,7 +2736,6 @@ sub tables_hashref { 'change_custnum', 'int', 'NULL', '', '', '', 'main_pkgnum', 'int', 'NULL', '', '', '', 'pkglinknum', 'int', 'NULL', '', '', '', - 'manual_flag', 'char', 'NULL', 1, '', '', 'no_auto', 'char', 'NULL', 1, '', '', 'quantity', 'int', 'NULL', '', '', '', 'agent_pkgid', 'varchar', 'NULL', $char_d, '', '', @@ -2706,6 +2743,7 @@ sub tables_hashref { 'recur_show_zero', 'char', 'NULL', 1, '', '', 'setup_show_zero', 'char', 'NULL', 1, '', '', 'change_to_pkgnum', 'int', 'NULL', '', '', '', + 'separate_bill', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'pkgnum', 'unique' => [], @@ -2796,11 +2834,11 @@ sub tables_hashref { 'cust_pkg_detail' => { 'columns' => [ - 'pkgdetailnum', 'serial', '', '', '', '', - 'pkgnum', 'int', '', '', '', '', - 'detail', 'varchar', '', $char_d, '', '', - 'detailtype', 'char', '', 1, '', '', # "I"nvoice or "C"omment - 'weight', 'int', '', '', '', '', + 'pkgdetailnum', 'serial', '', '', '', '', + 'pkgnum', 'int', '', '', '', '', + 'detail', 'varchar', '', 2*$char_d, '', '', + 'detailtype', 'char', '', 1, '', '', #"I"nvoice or "C"omment + 'weight', 'int', '', '', '', '', ], 'primary_key' => 'pkgdetailnum', 'unique' => [], @@ -2838,6 +2876,29 @@ sub tables_hashref { ], }, + 'cust_pkg_reason_fee' => { + 'columns' => [ + 'pkgreasonfeenum', 'serial', '', '', '', '', + 'pkgreasonnum', 'int', '', '', '', '', + 'billpkgnum', 'int', 'NULL', '', '', '', + 'feepart', 'int', '', '', '', '', + 'nextbill', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'pkgreasonfeenum', + 'unique' => [ [ 'billpkgnum' ], [ 'pkgreasonnum' ] ], # one-to-one link + 'index' => [ [ 'feepart' ] ], + 'foreign_keys' => [ + { columns => [ 'pkgreasonnum' ], + table => 'cust_pkg_reason', + references => [ 'num' ], + }, + { columns => [ 'feepart' ], + table => 'part_fee', + }, + # can't link billpkgnum, because of voids + ], + }, + 'cust_pkg_discount' => { 'columns' => [ 'pkgdiscountnum', 'serial', '', '', '', '', @@ -2848,6 +2909,7 @@ sub tables_hashref { 'otaker', 'varchar', 'NULL', 32, '', '', 'usernum', 'int', 'NULL', '', '', '', 'disabled', 'char', 'NULL', 1, '', '', + 'setuprecur', 'char', 'NULL', 5, '', '', ], 'primary_key' => 'pkgdiscountnum', 'unique' => [], @@ -3000,6 +3062,7 @@ sub tables_hashref { '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 @@ -3022,6 +3085,10 @@ sub tables_hashref { { columns => [ 'gatewaynum' ], table => 'payment_gateway', }, + { columns => [ 'source_paynum' ], + table => 'cust_pay', + references => [ 'paynum' ], + }, ], }, @@ -3159,6 +3226,10 @@ sub tables_hashref { 'delay_start', 'int', 'NULL', '', '', '', 'start_on_hold', 'char', 'NULL', 1, '', '', 'agent_pkgpartid', 'varchar', 'NULL', 20, '', '', + 'expire_months', 'int', 'NULL', '', '', '', + 'adjourn_months', 'int', 'NULL', '', '', '', + 'contract_end_months','int','NULL', '', '', '', + 'change_to_pkgpart', 'int', 'NULL', '', '', '', ], 'primary_key' => 'pkgpart', 'unique' => [], @@ -3187,6 +3258,10 @@ sub tables_hashref { table => 'part_pkg', references => [ 'pkgpart' ], }, + { columns => [ 'change_to_pkgpart' ], + table => 'part_pkg', + references => [ 'pkgpart' ], + }, ], }, @@ -3496,6 +3571,7 @@ sub tables_hashref { 'primary_svc', 'char', 'NULL', 1, '', '', 'hidden', 'char', 'NULL', 1, '', '', 'bulk_skip', 'char', 'NULL', 1, '', '', + 'provision_hold', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'pkgsvcnum', 'unique' => [ ['pkgpart', 'svcpart'] ], @@ -3515,10 +3591,11 @@ sub tables_hashref { 'refnum', 'serial', '', '', '', '', 'referral', 'varchar', '', $char_d, '', '', 'disabled', 'char', 'NULL', 1, '', '', - 'agentnum', 'int', 'NULL', '', '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'title', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'refnum', - 'unique' => [], + 'unique' => [ ['agentnum', 'title'] ], 'index' => [ ['disabled'], ['agentnum'], ], 'foreign_keys' => [ { columns => [ 'agentnum' ], @@ -3557,6 +3634,7 @@ sub tables_hashref { 'columnlabel', 'varchar', 'NULL', $char_d, '', '', 'columnvalue', 'varchar', 'NULL', 512, '', '', 'columnflag', 'char', 'NULL', 1, '', '', + 'required', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'columnnum', 'unique' => [ [ 'svcpart', 'columnname' ] ], @@ -3579,6 +3657,31 @@ sub tables_hashref { 'index' => [ ['disabled'] ], }, + 'part_svc_link' => { + 'columns' => [ + 'svclinknum', 'serial', '', '', '', '', + #'linkname', 'varchar', 'NULL', $char_d, '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'src_svcpart', 'int', '', '', '', '', + 'dst_svcpart', 'int', '', '', '', '', + 'link_type', 'varchar', '', $char_d, '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'svclinknum', + 'unique' => [ ['agentnum','src_svcpart','dst_svcpart','link_type'] ], + 'index' => [ [ 'src_svcpart' ], [ 'src_svcpart', 'link_type' ], [ 'disabled' ] ], + 'foreign_keys' => [ + { columns => [ 'src_svcpart' ], + table => 'part_svc', + references => [ 'svcpart' ] + }, + { columns => [ 'dst_svcpart' ], + table => 'part_svc', + references => [ 'svcpart' ] + }, + ], + }, + #(this should be renamed to part_pop) 'svc_acct_pop' => { 'columns' => [ @@ -4258,6 +4361,7 @@ sub tables_hashref { 'custnum', 'int', 'NULL', '', '', '', 'secure', 'char', 'NULL', 1, '', '', 'priority', 'int', 'NULL', '', '', '', + 'usernum', 'int', 'NULL', '', '', '', ], 'primary_key' => 'jobnum', 'unique' => [], @@ -4271,6 +4375,9 @@ sub tables_hashref { { columns => [ 'custnum' ], table => 'cust_main', }, + { columns => [ 'usernum' ], + table => 'access_user', + }, ], }, @@ -4348,6 +4455,26 @@ sub tables_hashref { ], }, + 'export_cust_svc' => { + 'columns' => [ + 'exportcustsvcnum', 'serial', '', '', '', '', + 'exportnum', 'int', '', '', '', '', + 'svcnum', 'int', '', '', '', '', + 'remoteid', 'varchar', '', 512, '', '', + ], + 'primary_key' => 'exportcustsvcnum', + 'unique' => [ [ 'exportnum', 'svcnum' ] ], + 'index' => [ [ 'exportnum', 'svcnum' ] ], + 'foreign_keys' => [ + { columns => [ 'exportnum' ], + table => 'part_export', + }, + { columns => [ 'svcnum' ], + table => 'cust_svc', + }, + ], + }, + 'export_device' => { 'columns' => [ 'exportdevicenum' => 'serial', '', '', '', '', @@ -4375,6 +4502,8 @@ sub tables_hashref { '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' => [], @@ -4497,6 +4626,7 @@ sub tables_hashref { #'custnum', 'int', '', '', '', '' 'billpkgnum', 'int', '', '', '', '', 'taxnum', 'int', '', '', '', '', + 'taxtype', 'varchar', 'NULL', $char_d, '', '', 'year', 'int', 'NULL', '', '', '', 'month', 'int', 'NULL', '', '', '', 'creditbillpkgnum', 'int', 'NULL', '', '', '', @@ -4512,16 +4642,13 @@ sub tables_hashref { 'unique' => [], 'index' => [ [ 'taxnum', 'year', 'month' ], [ 'billpkgnum' ], - [ 'taxnum' ], + [ 'taxnum', 'taxtype' ], [ 'creditbillpkgnum' ], ], 'foreign_keys' => [ { columns => [ 'billpkgnum' ], table => 'cust_bill_pkg', }, - { columns => [ 'taxnum' ], - table => 'cust_main_county', - }, { columns => [ 'creditbillpkgnum' ], table => 'cust_credit_bill_pkg', }, @@ -4534,6 +4661,7 @@ sub tables_hashref { #'custnum', 'int', '', '', '', '' 'billpkgnum', 'int', '', '', '', '', 'taxnum', 'int', '', '', '', '', + 'taxtype', 'varchar', 'NULL', $char_d, '', '', 'year', 'int', 'NULL', '', '', '', 'month', 'int', 'NULL', '', '', '', 'creditbillpkgnum', 'int', 'NULL', '', '', '', @@ -4549,7 +4677,7 @@ sub tables_hashref { 'unique' => [], 'index' => [ [ 'taxnum', 'year', 'month' ], [ 'billpkgnum' ], - [ 'taxnum' ], + [ 'taxnum', 'taxtype' ], [ 'creditbillpkgnum' ], ], 'foreign_keys' => [ @@ -4717,9 +4845,16 @@ sub tables_hashref { 'freq_mhz', 'int', 'NULL', '', '', '', 'direction', 'int', 'NULL', '', '', '', 'width', 'int', 'NULL', '', '', '', - #downtilt etc? rfpath has profile files for devices/antennas you upload? 'sector_range', 'decimal', 'NULL', '', '', '', #? - ], + 'downtilt', 'decimal', 'NULL', '', '', '', + 'v_width', 'int', 'NULL', '', '', '', + 'margin', 'decimal', 'NULL', '', '', '', + 'image', 'blob', 'NULL', '', '', '', + 'west', 'decimal', 'NULL', '10,7', '', '', + 'east', 'decimal', 'NULL', '10,7', '', '', + 'south', 'decimal', 'NULL', '10,7', '', '', + 'north', 'decimal', 'NULL', '10,7', '', '', + ], 'primary_key' => 'sectornum', 'unique' => [ [ 'towernum', 'sectorname' ], [ 'ip_addr' ], ], 'index' => [ [ 'towernum' ] ], @@ -5213,16 +5348,17 @@ sub tables_hashref { 'banned_pay' => { 'columns' => [ - 'bannum', 'serial', '', '', '', '', - 'payby', 'char', '', 4, '', '', - 'payinfo', 'varchar', '', 128, '', '', #say, a 512-big digest _hex encoded - #'paymask', 'varchar', 'NULL', $char_d, '', '' - '_date', @date_type, '', '', - 'end_date', @date_type, '', '', - 'otaker', 'varchar', 'NULL', 32, '', '', - 'usernum', 'int', 'NULL', '', '', '', - 'bantype', 'varchar', 'NULL', $char_d, '', '', - 'reason', 'varchar', 'NULL', $char_d, '', '', + 'bannum', 'serial', '', '', '', '', + 'payby', 'char', '', 4, '', '', + 'payinfo', 'varchar', '', 128, '', '', #say, a 512-big digest _hex encoded + 'payinfo_hash', 'varchar', 'NULL', 32, '', '', + #'paymask', 'varchar', 'NULL', $char_d, '', '' + '_date', @date_type, '', '', + 'end_date', @date_type, '', '', + 'otaker', 'varchar', 'NULL', 32, '', '', + 'usernum', 'int', 'NULL', '', '', '', + 'bantype', 'varchar', 'NULL', $char_d, '', '', + 'reason', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'bannum', 'unique' => [], @@ -5375,6 +5511,7 @@ sub tables_hashref { 'rated_ratedetailnum', 'int', 'NULL', '', '', '', 'rated_classnum', 'int', 'NULL', '', '', '', 'rated_ratename', 'varchar', 'NULL', $char_d, '', '', + 'rated_cost', 'decimal', 'NULL', '10,4', '', '', 'carrierid', 'bigint', 'NULL', '', '', '', @@ -5413,6 +5550,7 @@ sub tables_hashref { [ '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. @@ -5670,6 +5808,39 @@ sub tables_hashref { 'index' => [], }, + 'access_user_log' => { + 'columns' => [ + 'lognum', 'serial', '', '', '', '', + 'usernum', 'int', '', '', '', '', + 'path', 'varchar', '', 2*$char_d, '', '', + '_date', @date_type, '', '', + 'render_seconds', 'int', 'NULL', '', '', '', + ], + 'primary_key' => 'lognum', + 'unique' => [], + 'index' => [ ['usernum'], ['path'], ['_date'] ], + }, + + 'access_user_page_pref' => { + 'columns' => [ + 'prefnum' => 'serial', '', '', '', '', + 'usernum' => 'int', '', '', '', '', + 'path' => 'text', '', '', '', '', + 'tablenum' => 'int', 'NULL', '', '', '', + '_date' => @date_type, '', '', + 'prefname' => 'varchar', '', $char_d, '', '', + 'prefvalue' => 'text', '', '', '', '', + ], + 'primary_key' => 'prefnum', + 'unique' => [ [ 'usernum', 'path', 'tablenum', 'prefname' ] ], + 'index' => [], + 'foreign_keys' => [ + { columns => [ 'usernum' ], + table => 'access_user' + }, + ], + }, + 'sched_item' => { 'columns' => [ 'itemnum', 'serial', '', '', '', '', @@ -5720,6 +5891,7 @@ sub tables_hashref { '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, '', '', @@ -5794,6 +5966,7 @@ sub tables_hashref { 'devicepart', 'serial', '', '', '', '', 'devicename', 'varchar', '', $char_d, '', '', 'inventory_classnum', 'int', 'NULL', '', '', '', + 'title', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'devicepart', 'unique' => [ [ 'devicename' ] ], #? @@ -5970,6 +6143,9 @@ sub tables_hashref { 'unsuspend_pkgpart', 'int', 'NULL', '', '', '', 'unsuspend_hold','char', 'NULL', 1, '', '', 'unused_credit', 'char', 'NULL', 1, '', '', + 'feepart', 'int', 'NULL', '', '', '', + 'fee_on_unsuspend','char', 'NULL', 1, '', '', + 'fee_hold', 'char', 'NULL', 1, '', '', ], 'primary_key' => 'reasonnum', 'unique' => [], @@ -6225,8 +6401,11 @@ sub tables_hashref { 'mime_type', 'varchar', '', $char_d, '', '', 'body', 'blob', 'NULL', '', '', '', 'disabled', 'char', 'NULL', 1, '', '', + # migrate these to msg_template_email 'from_addr', 'varchar', 'NULL', 255, '', '', 'bcc_addr', 'varchar', 'NULL', 255, '', '', + # change to not null on v5 + 'msgclass', 'varchar', 'NULL', 16, '', '', ], 'primary_key' => 'msgnum', 'unique' => [ ], @@ -6238,6 +6417,26 @@ sub tables_hashref { ], }, + 'msg_template_http' => { + 'columns' => [ + 'num', 'serial', '', '', '', '', + 'msgnum', 'int', '', '', '', '', + 'prepare_url', 'varchar', 'NULL', 255, '', '', + 'send_url', 'varchar', 'NULL', 255, '', '', + 'username', 'varchar', 'NULL', $char_d, '', '', + 'password', 'varchar', 'NULL', $char_d, '', '', + 'content', 'text', 'NULL', '', '', '', + ], + 'primary_key' => 'num', + 'unique' => [ [ 'msgnum' ], ], + 'index' => [ ], + 'foreign_keys' => [ + { columns => [ 'msgnum' ], + table => 'msg_template', + }, + ], + }, + 'template_content' => { 'columns' => [ 'contentnum', 'serial', '', '', '', '', @@ -6256,6 +6455,19 @@ sub tables_hashref { ], }, + 'template_image' => { + 'columns' => [ + 'imgnum', 'serial', '', '', '', '', + 'name', 'varchar', '', $char_d, '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'mime_type', 'varchar', '', $char_d, '', '', + 'base64', 'text', '', '', '', '', + ], + 'primary_key' => 'imgnum', + 'unique' => [ ], + 'index' => [ ['name'], ['agentnum'] ], + }, + 'cust_msg' => { 'columns' => [ 'custmsgnum', 'serial', '', '', '', '', @@ -6269,6 +6481,7 @@ sub tables_hashref { 'error', 'varchar', 'NULL', 255, '', '', 'status', 'varchar', '',$char_d, '', '', 'msgtype', 'varchar', 'NULL', 16, '', '', + 'preview', 'text', 'NULL', '', '', '', ], 'primary_key' => 'custmsgnum', 'unique' => [ ], @@ -6412,6 +6625,25 @@ sub tables_hashref { ], }, + '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 @@ -6686,6 +6918,74 @@ sub tables_hashref { ], }, + 'svc_fiber' => { + 'columns' => [ + 'svcnum', 'int', '', '', '', '', + 'oltnum', 'int', 'NULL', '', '', '', + 'shelf', 'int', 'NULL', '', '', '', + 'card', 'int', 'NULL', '', '', '', + 'olt_port', 'int', 'NULL', '', '', '', + 'ont_id', 'int', 'NULL', '', '', '', + 'ont_typenum', 'int', 'NULL', '', '', '', + 'ont_serial', 'varchar', 'NULL', $char_d, '', '', + 'ont_port', 'varchar', 'NULL', 16, '', '', + 'circuit_id', 'varchar', 'NULL', $char_d, '', '', + 'vlan', 'int', 'NULL', '', '', '', + 'signal', 'decimal', 'NULL', '10,2', '', '', + 'speed_up', 'int', 'NULL', '', '', '', + 'speed_down', 'int', 'NULL', '', '', '', + 'ont_install','varchar', 'NULL', $char_d, '', '', + ], + 'primary_key' => 'svcnum', + 'unique' => [ ], + 'index' => [ [ 'ont_serial' ] ], + 'foreign_keys' => [ + { columns => [ 'svcnum' ], + table => 'cust_svc', + }, + { columns => [ 'oltnum' ], + table => 'fiber_olt', + }, + { columns => [ 'ont_typenum' ], + table => 'hardware_type', + references => [ 'typenum' ], + }, + ], + }, + + 'fiber_olt' => { + 'columns' => [ + 'oltnum', 'serial', '', '', '', '', + 'oltname', 'varchar', '', $char_d, '', '', + 'sitenum', 'int', 'NULL', '', '', '', + 'serial', 'varchar', '', $char_d, '', '', + 'disabled', 'char', 'NULL', 1, '', '', + ], + 'primary_key' => 'oltnum', + 'unique' => [ ], + 'index' => [ ], + 'foreign_keys' => [ + { columns => [ 'sitenum' ], + table => 'olt_site', + }, + ], + }, + + 'olt_site' => { + 'columns' => [ + 'sitenum', 'serial', '', '', '', '', + 'market', 'varchar', '', $char_d, '', '', + 'site', 'varchar', '', $char_d, '', '', + ], + 'primary_key' => 'sitenum', + 'unique' => [ [ 'market', 'site' ] ], + 'index' => [ ], + }, + + + + + 'vend_main' => { 'columns' => [ 'vendnum', 'serial', '', '', '', '', @@ -6834,6 +7134,8 @@ sub tables_hashref { 'latexsmallfooter', 'text', 'NULL', '', '', '', 'latexreturnaddress', 'text', 'NULL', '', '', '', 'with_latexcoupon', 'char', 'NULL', '1', '', '', + 'htmlwatermark', 'text', 'NULL', '', '', '', + 'latexwatermark', 'text', 'NULL', '', '', '', 'lpr', 'varchar', 'NULL', $char_d, '', '', ], 'primary_key' => 'confnum', @@ -6904,6 +7206,7 @@ sub tables_hashref { 'zonenum', 'serial', '', '', '', '', 'description', 'char', 'NULL', $char_d, '', '', 'agentnum', 'int', '', '', '', '', + 'censusyear', 'char', 'NULL', 4, '', '', 'dbaname', 'char', 'NULL', $char_d, '', '', 'zonetype', 'char', '', 1, '', '', 'technology', 'int', '', '', '', '', @@ -6935,7 +7238,7 @@ sub tables_hashref { 'blocknum', 'serial', '', '', '', '', 'zonenum', 'int', '', '', '', '', 'censusblock', 'char', '', 15, '', '', - 'censusyear', 'char', '', 4, '', '', + 'censusyear', 'char','NULL', 4, '', '', ], 'primary_key' => 'blocknum', 'unique' => [], @@ -6966,9 +7269,129 @@ sub tables_hashref { ], }, + 'cacti_page' => { + 'columns' => [ + 'cacti_pagenum', 'serial', '', '', '', '', + 'exportnum', 'int', 'NULL', '', '', '', + 'svcnum', 'int', 'NULL', '', '', '', + 'graphnum', 'int', 'NULL', '', '', '', + 'imported', @date_type, '', '', + 'content', 'text', 'NULL', '', '', '', + ], + 'primary_key' => 'cacti_pagenum', + 'unique' => [ ], + 'index' => [ ['svcnum'], ['imported'] ], + 'foreign_keys' => [ + { columns => [ 'svcnum' ], + table => 'cust_svc', + references => [ 'svcnum' ], + }, + { columns => [ 'exportnum' ], + table => 'part_export', + references => [ 'exportnum' ], + }, + ], + }, + 'report_batch' => { + 'columns' => [ + 'reportbatchnum', 'serial', '', '', '', '', + 'reportname', 'varchar', '', 255, '', '', + 'agentnum', 'int', 'NULL', '', '', '', + 'send_date', @date_type, '', '', + 'sdate', @date_type, '', '', + 'edate', @date_type, '', '', + 'usernum', 'int', 'NULL', '', '', '', + 'msgnum', 'int', 'NULL', '', '', '', + # add report params here as necessary + ], + 'primary_key' => 'reportbatchnum', + 'unique' => [], + 'index' => [], + 'foreign_keys' => [ + { columns => [ 'agentnum' ], + table => 'agent', + references => [ 'agentnum' ], + }, + { columns => [ 'usernum' ], + table => 'access_user', + references => [ 'usernum' ], + }, + { columns => [ 'msgnum' ], + table => 'msg_template', + references => [ 'msgnum' ], + }, + ], + }, + 'password_history' => { + 'columns' => [ + 'passwordnum', 'serial', '', '', '', '', + '_password', 'varchar', 'NULL', $char_d, '', '', + 'encryption_method', 'varchar', 'NULL', $char_d, '', '', + 'created', @date_type, '', '', + # each table that needs password history gets a column here, and + # an entry in foreign_keys. + 'svc_acct__svcnum', 'int', 'NULL', '', '', '', + 'svc_dsl__svcnum', 'int', 'NULL', '', '', '', + 'svc_alarm__svcnum', 'int', 'NULL', '', '', '', + 'agent__agentnum', 'int', 'NULL', '', '', '', + 'contact__contactnum', 'int', 'NULL', '', '', '', + 'access_user__usernum', 'int', 'NULL', '', '', '', + ], + 'primary_key' => 'passwordnum', + 'unique' => [], + 'index' => [], + 'foreign_keys' => [ + { columns => [ 'svc_acct__svcnum' ], + table => 'svc_acct', + references => [ 'svcnum' ], + }, + { columns => [ 'svc_dsl__svcnum' ], + table => 'svc_dsl', + references => [ 'svcnum' ], + }, + { columns => [ 'svc_alarm__svcnum' ], + table => 'svc_alarm', + references => [ 'svcnum' ], + }, + { columns => [ 'agent__agentnum' ], + table => 'agent', + references => [ 'agentnum' ], + }, + { columns => [ 'contact__contactnum' ], + table => 'contact', + references => [ 'contactnum' ], + }, + { columns => [ 'access_user__usernum' ], + table => 'access_user', + references => [ 'usernum' ], + }, + ], + }, + 'webservice_log' => { + 'columns' => [ + 'webservicelognum', 'serial', '', '', '', '', #big? hubrus + 'svcnum', 'int', 'NULL', '', '', '', #just in case + 'custnum', 'int', '', '', '', '', + 'method', 'varchar', '', $char_d, '', '', + 'quantity', 'int', '', '', '', '', #i.e. pages + '_date', @date_type, '', '', + 'status', 'varchar', 'NULL', $char_d, '', '', + 'rated_price', 'decimal', 'NULL', '10,2', '', '', + ], + 'primary_key' => 'webservicelognum', + 'unique' => [], + 'index' => [ ['custnum'], ['status'] ], + 'foreign_keys' => [ + { columns => [ 'custnum' ], + table => 'cust_main', + }, + #no FK on svcnum... we don't want to purge these on + # service deletion + ], + }, # name type nullability length default local