Let say, we have the following DB structure :
Table : "human"
------------------
| id | name |
------------------
| 1 | Joe |
| 2 | Bill |
------------------
Table: "animal"
------------------
| id | name |
------------------
| 1 | Rex |
| 2 | Pepet|
------------------
(And an other table to link pets to humans)
An Yaml export will give this :
--------------------------------
1:
id: 1
name: Joe
2:
id: 2
name: Bill
1:
id: 1
name: Rex
2;
id: 2:
name: Pepet
---------------------------------
This is just unusable !!!
There is a lot of way to have a better Yaml export:
Use same format as XML export
--------------------------------
myDBname:
human:
1:
id: 1
name: Joe
2:
id: 2
name: Bill
animal:
1:
id: 1
name: Rex
2;
id: 2
name: Pepet
---------------------------------
Without DB name:
--------------------------------
human:
1:
id: 1
name: Joe
2:
id: 2
name: Bill
animal:
1:
id: 1
name: Rex
2;
id: 2
name: Pepet
---------------------------------
Flat, but with table name:
--------------------------------
human_1:
id: 1
name: Joe
human_2:
id: 2
name: Bill
animal_1:
id: 1
name: Rex
animal_2;
id: 2
name: Pepet
---------------------------------
Or, at least, using comments:
--------------------------------
# myDBname.human
1:
id: 1
name: Joe
2:
id: 2
name: Bill
# myDBname.animal
1:
id: 1
name: Rex
2;
id: 2:
name: Pepet
---------------------------------
I personnaly prefer the first version...
Logged In: YES
user_id=192186
Originator: NO
Feel free to create patch for the export, it should be pretty easy (you can find code in libraries/export/yaml.php). The current version was contributed by some user and we have no knowledge about YAML in our development team.
Fixed for 3.1.2 by adding comments, thanks to Bryce Thornton.