Only create views for mysql on v5 and up
Ash Berlin [Tue, 19 Aug 2008 15:37:13 +0000 (15:37 +0000)]
lib/SQL/Translator/Producer/MySQL.pm

index 7cf24c0..0e2917d 100644 (file)
@@ -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
                                          });
+      }
     }