merge webpay support in with autoselection of old realtime_bop and realtime_refund_bop
[freeside.git] / FS / FS / cust_pkg_reason.pm
index 43f83d4..4037513 100644 (file)
@@ -134,6 +134,9 @@ sub reasontext {
 #
 # Used by FS::Upgrade to migrate to a new database.
 
+use FS::h_cust_pkg;
+use FS::h_cust_pkg_reason;
+
 sub _upgrade_data { # class method
   my ($class, %opts) = @_;
 
@@ -143,11 +146,6 @@ sub _upgrade_data { # class method
   my $count = 0;
   my @unmigrated = qsearch('cust_pkg_reason', { 'action' => '' } ); 
   foreach ( @unmigrated ) {
-    # we could create h_cust_pkg_reason and h_cust_pkg_reason packages
-    @FS::h_cust_pkg::ISA = qw( FS::h_Common FS::cust_pkg );
-    sub FS::h_cust_pkg::table { 'h_cust_pkg' };
-    @FS::h_cust_pkg_reason::ISA = qw( FS::h_Common FS::cust_pkg_reason );
-    sub FS::h_cust_pkg_reason::table { 'h_cust_pkg_reason' };
 
     my @history_cust_pkg_reason = qsearch( 'h_cust_pkg_reason', { $_->hash } );
     
@@ -227,9 +225,6 @@ sub _upgrade_data { # class method
                                extra_sql => $extra_sql,
                             }); 
     foreach ( @unmigrated ) {
-      # we could create h_cust_pkg_reason and h_cust_pkg_reason packages
-      @FS::h_cust_pkg::ISA = qw( FS::h_Common FS::cust_pkg );
-      sub FS::h_cust_pkg::table { 'h_cust_pkg' };
 
       my %action_value = ( op    => 'LIKE',
                            value => 'replace_%',