X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;ds=sidebyside;f=rt%2Fetc%2Fupgrade%2F3.9.8%2Fcontent;h=24242fda2d32830f9ccb0235878bdd9444020954;hb=b8988e1d3ac75af63c85e8563e57701030315a9e;hp=db717cd95f4c1c46dba875dbb974a615831d8923;hpb=7f029e082712dceafb9152820746da79a50f2275;p=freeside.git diff --git a/rt/etc/upgrade/3.9.8/content b/rt/etc/upgrade/3.9.8/content index db717cd95..24242fda2 100644 --- a/rt/etc/upgrade/3.9.8/content +++ b/rt/etc/upgrade/3.9.8/content @@ -1,9 +1,6 @@ @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}; + foreach my $name ( $RT::Handle->_TableNames ) { next unless $name =~ /^fm_/i; $found_fm_tables->{lc $name}++; } @@ -16,6 +13,7 @@ $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) {