address standardization part one, finally checked in from here
[freeside.git] / FS / FS / Upgrade.pm
index 2e4d2b4..fcf28e3 100644 (file)
@@ -49,8 +49,12 @@ sub upgrade {
     eval "use $class;";
     die $@ if $@;
 
-    $class->_upgrade_data(%opt)
-      if $class->can('_upgrade_data');
+    if ( $class->can('_upgrade_data') ) {
+      $class->_upgrade_data(%opt);
+    } else {
+      warn "WARNING: asked for upgrade of $table,".
+           " but FS::$table has no _upgrade_data method\n";
+    }
 
 #    my @records = @{ $data->{$table} };
 #
@@ -80,11 +84,20 @@ sub upgrade_data {
     'reason_type' => [],
     'reason'      => [],
 
+    #need part_pkg before cust_credit...
+    'part_pkg' => [],
+
     #customer credits
     'cust_credit' => [],
 
     #duplicate history records
-    'h_cust_svc' => [],
+    'h_cust_svc'  => [],
+
+    #populate cust_pay.otaker
+    'cust_pay'    => [],
+
+    #populate part_pkg_taxclass for starters
+    'part_pkg_taxclass' => [],
 
   ;