SHOW TABLES and SHOW CREATE TABLE return views too, and Parser::MySQL
handles them just fine, so just pass them on.
* Fix Pg DBI parser test (Dagfinn Ilmari Mannsåker)
* Remove spurious warnings (Matt Phillips, Wallace Reis)
* Fix MySQL producer for columns with scalar ref in 'ON UPDATE' (Wallace Reis)
+ * Fix handling of views in MySQL DBI parser
0.11018 2013-10-31 🎃
my $sth = $dbh->prepare("show create table $table_name");
$sth->execute;
my $table = $sth->fetchrow_hashref;
- $create .= $table->{'create table'} . ";\n\n";
+ $create .= ($table->{'create table'} || $table->{'create view'}) . ";\n\n";
}
SQL::Translator::Parser::MySQL::parse( $tr, $create );