From: Justin Hunter Date: Sun, 23 Aug 2009 21:37:19 +0000 (-0700) Subject: table is required for Indx X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=ec2351fe2594b4566b822d20efb56d9e9978fdb2;p=dbsrgits%2FSQL-Translator-2.0-ish.git table is required for Indx --- diff --git a/lib/SQL/Translator/Parser/DDL/MySQL.pm b/lib/SQL/Translator/Parser/DDL/MySQL.pm index 4e8ce74..0a73ac1 100644 --- a/lib/SQL/Translator/Parser/DDL/MySQL.pm +++ b/lib/SQL/Translator/Parser/DDL/MySQL.pm @@ -82,7 +82,7 @@ role SQL::Translator::Parser::DDL::MySQL { $field->extra(\%extra); if ( $fdata->{has_index} ) { - my $index = Index->new({ name => '', type => 'NORMAL' }); + my $index = Index->new({ name => '', type => 'NORMAL', table => $table }); $index->add_column($table->get_column($fdata->{name})); $table->add_index($index); }