[Rt-commit] rt branch, 4.0/articles-upgrade-script, created. rt-4.0.0-236-g8074858

Kevin Falcone falcone at bestpractical.com
Tue May 10 18:20:55 EDT 2011


The branch, 4.0/articles-upgrade-script has been created
        at  807485804f985cfe5b46d271b0930f39e58d07b6 (commit)

- Log -----------------------------------------------------------------
commit 807485804f985cfe5b46d271b0930f39e58d07b6
Author: Kevin Falcone <falcone at bestpractical.com>
Date:   Tue May 10 18:20:14 2011 -0400

    Check that we actually found FM_ tables before doing anything about it
    
    Work around oracle and pg choosing to lc() everything like we do in the
    upgrade-articles script

diff --git a/etc/upgrade/3.9.8/content b/etc/upgrade/3.9.8/content
index 6726a8e..d759db9 100644
--- a/etc/upgrade/3.9.8/content
+++ b/etc/upgrade/3.9.8/content
@@ -1,13 +1,15 @@
 @Initial = sub {
     my $dbh = $RT::Handle->dbh;
     my $sth = $dbh->table_info( '', undef, undef, "'TABLE'");
-    my $found_fm_tables;
+    my $found_fm_tables = {};
     while ( my $table = $sth->fetchrow_hashref ) {
-        my $name = $table->{TABLE_NAME};
+        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");
     }

-----------------------------------------------------------------------


More information about the Rt-commit mailing list