summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg_reason.pm
diff options
context:
space:
mode:
authorivan <ivan>2009-02-22 19:46:22 +0000
committerivan <ivan>2009-02-22 19:46:22 +0000
commit027756090552715f79cd3a4de08ee73091ad99f0 (patch)
tree7949798ac79a28bab5533fcdaae90fd95ab58f5d /FS/FS/cust_pkg_reason.pm
parent65efe8eb9ee8bb02deb776da0897e25d821b4f65 (diff)
add h_cust_pkg and h_cust_pkg_reason packages, RT#4896
Diffstat (limited to 'FS/FS/cust_pkg_reason.pm')
-rw-r--r--FS/FS/cust_pkg_reason.pm11
1 files changed, 3 insertions, 8 deletions
diff --git a/FS/FS/cust_pkg_reason.pm b/FS/FS/cust_pkg_reason.pm
index 43f83d44d..403751369 100644
--- a/FS/FS/cust_pkg_reason.pm
+++ b/FS/FS/cust_pkg_reason.pm
@@ -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_%',