X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=rt%2Fetc%2Fupgrade%2F3.9.8%2Fcontent;h=e9a1a324d129aff74bc3ed63f6a7c18633002f39;hp=d759db9cd87216e330d20ea2eda4d1e0e0e249d2;hb=9aee669886202be7035e6c6049fc71bc99dd3013;hpb=6587f6ba7d047ddc1686c080090afe7d53365bd4 diff --git a/rt/etc/upgrade/3.9.8/content b/rt/etc/upgrade/3.9.8/content index d759db9cd..e9a1a324d 100644 --- a/rt/etc/upgrade/3.9.8/content +++ b/rt/etc/upgrade/3.9.8/content @@ -1,9 +1,9 @@ -@Initial = sub { - my $dbh = $RT::Handle->dbh; - my $sth = $dbh->table_info( '', undef, undef, "'TABLE'"); +use strict; +use warnings; + +our @Initial = sub { my $found_fm_tables = {}; - while ( my $table = $sth->fetchrow_hashref ) { - my $name = $table->{TABLE_NAME} || $table->{table_name}; + foreach my $name ( $RT::Handle->_TableNames ) { next unless $name =~ /^fm_/i; $found_fm_tables->{lc $name}++; } @@ -11,14 +11,15 @@ return unless %$found_fm_tables; unless ( $found_fm_tables->{fm_topics} && $found_fm_tables->{fm_objecttopics} ) { - $RT::Logger->error("You appear to be upgrading from RTFM 2.0 - We don't support upgrading this old of an RTFM yet"); + RT->Logger->error("You appear to be upgrading from RTFM 2.0 - We don't support upgrading this old of an RTFM yet"); } - $RT::Logger->error("We found RTFM tables in your database. Checking for content."); + RT->Logger->error("We found RTFM tables in your database. Checking for content."); + my $dbh = $RT::Handle->dbh; my $result = $dbh->selectall_arrayref("SELECT count(*) AS articlecount FROM FM_Articles", { Slice => {} } ); if ($result->[0]{articlecount} > 0) { - $RT::Logger->error("You appear to have RTFM Articles. You can upgrade using the etc/upgrade/upgrade-articles script. Read more about it in UPGRADING"); + RT->Logger->error("You appear to have RTFM Articles. You can upgrade using the /opt/rt4/etc/upgrade/upgrade-articles script. Read more about it in docs/UPGRADING-4.0"); } };