Release 0.07039
[dbsrgits/DBIx-Class-Schema-Loader.git] / lib / DBIx / Class / Schema / Loader / DBI / DB2.pm
index 18fef50..ba9ddaf 100644 (file)
@@ -13,7 +13,7 @@ use namespace::clean;
 
 use DBIx::Class::Schema::Loader::Table ();
 
-our $VERSION = '0.07034_02';
+our $VERSION = '0.07039';
 
 =head1 NAME
 
@@ -152,11 +152,14 @@ EOF
 }
 
 
-# DBD::DB2 doesn't follow the DBI API for ->tables
+# DBD::DB2 doesn't follow the DBI API for ->tables (pre 1.85), but since its
+# backwards compatible we don't change it.
+# DBD::DB2 1.85 and beyond default TABLE_NAME to '', previously defaulted to
+# '%'. so we supply it.
 sub _dbh_tables {
     my ($self, $schema) = @_;
 
-    return $self->dbh->tables($schema ? { TABLE_SCHEM => $schema } : undef);
+    return $self->dbh->tables($schema ? { TABLE_SCHEM => $schema, TABLE_NAME => '%' } : undef);
 }
 
 sub _columns_info_for {