From: Ash Berlin Date: Tue, 19 Aug 2008 15:37:13 +0000 (+0000) Subject: Only create views for mysql on v5 and up X-Git-Tag: v0.11008~305 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=83ddfeac2378091ad7e2c9fc44cf87ba7f9bc4e4;p=dbsrgits%2FSQL-Translator.git Only create views for mysql on v5 and up --- diff --git a/lib/SQL/Translator/Producer/MySQL.pm b/lib/SQL/Translator/Producer/MySQL.pm index 7cf24c0..0e2917d 100644 --- a/lib/SQL/Translator/Producer/MySQL.pm +++ b/lib/SQL/Translator/Producer/MySQL.pm @@ -286,8 +286,8 @@ sub produce { }); } - for my $view ( $schema->get_views ) { -# print $view->name, "\n"; + if ($mysql_version > 5.0) { + for my $view ( $schema->get_views ) { push @table_defs, create_view($view, { add_replace_view => $add_drop_table, show_warnings => $show_warnings, @@ -297,6 +297,7 @@ sub produce { max_id_length => $max_id_length, mysql_version => $mysql_version }); + } }