131183b0bf
This patch adds 3 features: 1) Display description of YAML files at install time for frameworks, and fixes it's encoding. 2) Enable use of multiline values, field required 3) Process SQL statements declared in YAML files With this features we can process files with the following generic YAML strucure: --- description: - "File description" tables: - table_name: translatable: [ title, content ] multiline: [ content ] rows: - title: "Example title" content: - "Content:" - "" - "This is the content." id: 1 value: ~ sql_statements: - "UPDATE table_name SET value ='empty' WHERE value IS NULL" ... * file description is now inside the YAML, can have multiple lines. This attribute is expected in all YAML files. * translatable attribute in table declare fields that can be translated * multiline attribute in table declare fields that can have multiple lines of content, they are joined using '\r\n' before insert into database. This is useful to express fields like 'news' content, and to simplify it's translation. '\r\n' is used for correct display in Windows clients. * sql_statements allows to add multiple SQL sentences, not insertions normally, that are executed in order. This features are not needed for the example file of this patch, but will be used in new bugs. To test: 1) Use the same test plan of first patch. 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> |
||
---|---|---|
.. | ||
auth_val.yml | ||
csv_profiles.sql | ||
csv_profiles.txt | ||
marc21_holdings_coded_values.sql | ||
marc21_holdings_coded_values.txt | ||
marc21_relatorterms.sql | ||
marc21_relatorterms.txt | ||
parameters.sql | ||
parameters.txt | ||
patron_atributes.sql | ||
patron_atributes.txt | ||
patron_categories.sql | ||
patron_categories.txt | ||
sample_creator_data.sql | ||
sample_creator_data.txt | ||
sample_itemtypes.sql | ||
sample_itemtypes.txt | ||
sample_libraries.sql | ||
sample_libraries.txt | ||
sample_libraries_holidays.sql | ||
sample_libraries_holidays.txt | ||
sample_news.sql | ||
sample_news.txt | ||
sample_patrons.sql | ||
sample_patrons.txt | ||
sample_quotes.sql | ||
sample_quotes.txt | ||
sample_z3950_servers.sql | ||
sample_z3950_servers.txt |