Changeset 2092

Show
Ignore:
Timestamp:
04/25/08 01:58:58 (22 months ago)
Author:
fumiakiy
Message:

Double check to see if the current schema has _meta column for the class in question.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • branches/release-36/lib/MT/Upgrade.pm

    r2056 r2092  
    10321032    my $meta_col = $dbd->db_column_name($class->datasource, 
    10331033        $param{meta_column} || 'meta'); 
     1034 
     1035    my $ddl = $driver->dbd->ddl_class; 
     1036    my $db_defs = $ddl->column_defs($class); 
     1037    return 0 unless $db_defs && exists($db_defs->{$meta_col}); 
     1038 
    10341039    my $id_col = $dbd->db_column_name($class->datasource, 'id'); 
    10351040    $stmt->add_where( $meta_col => { not_null => 1 } );