fix upgrade for cust_bill_pay_batch when a batched payment was deleted by legacy...
[freeside.git] / FS / FS / Upgrade.pm
index 31311e9..19e084a 100644 (file)
@@ -373,6 +373,7 @@ sub upgrade_data {
     'agent_payment_gateway' => [],
 
     #cust_main (tokenizes cards, remove paycvv from history, locations, cust_payby, etc)
+    # (handles payinfo encryption/tokenization across all relevant tables)
     'cust_main' => [],
 
     #contact -> cust_contact / prospect_contact
@@ -558,6 +559,8 @@ sub upgrade_schema {
 sub upgrade_schema_data {
   my %opt = @_;
 
+  #auto-find tables/classes with an _update_schema method?
+
   tie my %hash, 'Tie::IxHash', 
 
     #fix classnum character(1)
@@ -567,6 +570,13 @@ sub upgrade_schema_data {
     #remove possible dangling records
     'password_history' => [],
     'cust_pay_pending' => [],
+    #remove records referencing removed things with their FKs
+    'pkg_referral' => [],
+    'cust_bill_pkg_discount' => [],
+    'cust_msg' => [],
+    'cust_bill_pay_batch' => [],
+    #update records referencing removed things with their FKs
+    'cust_pkg' => [],
   ;
 
   \%hash;