From: Justin Hunter Date: Thu, 3 Dec 2009 15:38:58 +0000 (-0800) Subject: fixes for MySQL producer ->options X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=5590bc43c44cc253c284420cc35314d97f6e54cc;p=dbsrgits%2FSQL-Translator-2.0-ish.git fixes for MySQL producer ->options --- diff --git a/lib/SQL/Translator/Producer/SQL/MySQL.pm b/lib/SQL/Translator/Producer/SQL/MySQL.pm index fddb8c0..c1691e3 100644 --- a/lib/SQL/Translator/Producer/SQL/MySQL.pm +++ b/lib/SQL/Translator/Producer/SQL/MySQL.pm @@ -131,8 +131,8 @@ role SQL::Translator::Producer::SQL::MySQL { for my $meth (qw/table reference_table/) { my $table = $schema->get_table($c->$meth) || next; # This normalizes the types to ENGINE and returns the value if its there - next if $extra_to_options->($table, 'mysql_table_type', ['ENGINE', 'TYPE']); - $table->options({ 'ENGINE' => 'InnoDB' }); + next if $extra_to_options->($table, 'mysql_table_type', ['ENGINE', 'TYPE']); +# $table->options( [ { ENGINE => 'InnoDB' } ] ); } } # foreach constraints @@ -338,7 +338,7 @@ role SQL::Translator::Producer::SQL::MySQL { my $collate = $table->extra->{'mysql_collate'}; my $union = undef; - for my $t1_option_ref ($table->_options) { + for my $t1_option_ref ($table->options) { my($key, $value) = %{$t1_option_ref}; $table_type_defined = 1 if uc $key eq 'ENGINE' or uc $key eq 'TYPE';