diff options
Diffstat (limited to 'rt/etc/upgrade/3.9.8/content')
-rw-r--r-- | rt/etc/upgrade/3.9.8/content | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/rt/etc/upgrade/3.9.8/content b/rt/etc/upgrade/3.9.8/content new file mode 100644 index 000000000..d759db9cd --- /dev/null +++ b/rt/etc/upgrade/3.9.8/content @@ -0,0 +1,24 @@ +@Initial = sub { + my $dbh = $RT::Handle->dbh; + my $sth = $dbh->table_info( '', undef, undef, "'TABLE'"); + my $found_fm_tables = {}; + while ( my $table = $sth->fetchrow_hashref ) { + my $name = $table->{TABLE_NAME} || $table->{table_name}; + next unless $name =~ /^fm_/i; + $found_fm_tables->{lc $name}++; + } + + 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("We found RTFM tables in your database. Checking for content."); + + 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"); + } +}; |