table is required for Indx
Justin Hunter [Sun, 23 Aug 2009 21:37:19 +0000 (14:37 -0700)]
lib/SQL/Translator/Parser/DDL/MySQL.pm

index 4e8ce74..0a73ac1 100644 (file)
@@ -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);
                 }