2 my $dbh = $RT::Handle->dbh;
3 my $sth = $dbh->table_info( '', undef, undef, "'TABLE'");
4 my $found_fm_tables = {};
5 while ( my $table = $sth->fetchrow_hashref ) {
6 my $name = $table->{TABLE_NAME} || $table->{table_name};
7 next unless $name =~ /^fm_/i;
8 $found_fm_tables->{lc $name}++;
11 return unless %$found_fm_tables;
13 unless ( $found_fm_tables->{fm_topics} && $found_fm_tables->{fm_objecttopics} ) {
14 $RT::Logger->error("You appear to be upgrading from RTFM 2.0 - We don't support upgrading this old of an RTFM yet");
17 $RT::Logger->error("We found RTFM tables in your database. Checking for content.");
19 my $result = $dbh->selectall_arrayref("SELECT count(*) AS articlecount FROM FM_Articles", { Slice => {} } );
21 if ($result->[0]{articlecount} > 0) {
22 $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");