use namespace::clean;
use DBIx::Class::Schema::Loader::Table ();
-our $VERSION = '0.07015';
+our $VERSION = '0.07017';
__PACKAGE__->mk_group_accessors('simple', qw/
_disable_pk_detection
my $comments_table = $table->clone;
$comments_table->name($self->table_comments_table);
- my ($comment) = try { $dbh->selectrow_array(<<"EOF") };
+ my ($comment) =
+ (exists $self->_tables->{$comments_table->sql_name} || undef)
+ && try { $dbh->selectrow_array(<<"EOF") };
SELECT comment_text
FROM @{[ $comments_table->sql_name ]}
WHERE table_name = @{[ $dbh->quote($table->name) ]}
my $comments_table = $table->clone;
$comments_table->name($self->column_comments_table);
- my ($comment) = try { $dbh->selectrow_array(<<"EOF") };
+ my ($comment) =
+ (exists $self->_tables->{$comments_table->sql_name} || undef)
+ && try { $dbh->selectrow_array(<<"EOF") };
SELECT comment_text
FROM @{[ $comments_table->sql_name ]}
WHERE table_name = @{[ $dbh->quote($table->name) ]}