YAML producer should only give field names from indices
Ed J [Tue, 11 Sep 2018 03:05:37 +0000 (04:05 +0100)]
lib/SQL/Translator/Producer/YAML.pm

index 782ddb1..e419ddd 100644 (file)
@@ -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 } ) : (),
     };