blob: e9a1a324d129aff74bc3ed63f6a7c18633002f39 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
use strict;
use warnings;
our @Initial = sub {
my $found_fm_tables = {};
foreach my $name ( $RT::Handle->_TableNames ) {
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 $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 /opt/rt4/etc/upgrade/upgrade-articles script. Read more about it in docs/UPGRADING-4.0");
}
};
|