fix upgrade for cust_bill_pay_batch when a batched payment was deleted by legacy...
[freeside.git] / FS / FS / Upgrade.pm
index 41349a5..db99372 100644 (file)
@@ -367,6 +367,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
@@ -552,6 +553,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)
@@ -561,6 +564,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;