Bug 13897: Use YAML files for installer data
authorBernardo Gonzalez Kriegel <bgkriegel@gmail.com>
Thu, 28 Nov 2019 22:06:35 +0000 (19:06 -0300)
committerMartin Renvoize <martin.renvoize@ptfs-europe.com>
Mon, 9 Mar 2020 13:49:57 +0000 (13:49 +0000)
commit3edee6db6fa7f5e3c673dfa890e032f90ff234ed
tree32bea4e6eb49dc4e16e003f1dbb9702a666f393e
parent0706922221dcdf9fa8ed7fcf86245c5622f33a3c
Bug 13897: Use YAML files for installer data

This patch modifies C4/Installer.pm to add support
for loading YAML files into database.

As an example of the functionality, optional
auth_val.sql file is replaced by auth_val.yml

The rationale behind this feature is to enable the
translation of the data that is loaded into the
database. That will be addressed in another bug.

But taking into account that goal, translatable
values are declared in the YAML files, to ease
identification by translate script.

Also file description is moved into the yaml
file.

To test:
0) Do a clean install with all optional data,
   then dump authorised_values table, reserve.
1) Apply the patch
2) Do a clean install in English (marc21/unimarc)
3) On optional data check for description of auth_val
   "Some basic default authorised values for ..."
4) Select all optional data
5) Finish installation
6) Dump again authorised_values table and compare with that
   of point '0'.
   No differences should be found.

Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
C4/Installer.pm
installer/data/mysql/en/optional/auth_val.sql [deleted file]
installer/data/mysql/en/optional/auth_val.txt [deleted file]
installer/data/mysql/en/optional/auth_val.yml [new file with mode: 0644]