fix upgrade for dangling queue_depend, RT#75117
[freeside.git] / FS / FS / Upgrade.pm
index 27c4b4c..8f751ee 100644 (file)
@@ -553,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)
@@ -562,6 +564,16 @@ 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' => [],
+    'cust_event_fee' => [],
+    'radius_attr' => [],
+    'queue_depend' => [],
+    #update records referencing removed things with their FKs
+    'cust_pkg' => [],
   ;
 
   \%hash;