From: Ed J Date: Tue, 11 Sep 2018 03:05:37 +0000 (+0100) Subject: YAML producer should only give field names from indices X-Git-Tag: v1.61~8 X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=4a06a63f38d6ff6436e9b18bbec405faa7d092a5;p=dbsrgits%2FSQL-Translator.git YAML producer should only give field names from indices --- diff --git a/lib/SQL/Translator/Producer/YAML.pm b/lib/SQL/Translator/Producer/YAML.pm index 782ddb1..e419ddd 100644 --- a/lib/SQL/Translator/Producer/YAML.pm +++ b/lib/SQL/Translator/Producer/YAML.pm @@ -173,7 +173,7 @@ sub view_index { return { 'name' => scalar $index->name, 'type' => scalar $index->type, - 'fields' => scalar $index->fields, + 'fields' => [ map { ref($_) ? $_->name : $_ } $index->fields ], 'options' => scalar $index->options, keys %{$index->extra} ? ('extra' => { $index->extra } ) : (), };