[Koha-bugs] [Bug 24912] Generate SQL from YAML installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 Katrin Fischer changed: What|Removed |Added Summary|Generate sql from yaml |Generate SQL from YAML |installer files |installer files --- Comment #10 from Katrin Fischer --- Is this one still needed now that we already moved all the installers to YAML? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 Ere Maijala changed: What|Removed |Added CC||ere.maij...@helsinki.fi -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #9 from Jonathan Druart --- Created attachment 101296 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101296=edit Bug 24912: Add the ability to convert yaml installer files to SQL queries -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 Jonathan Druart changed: What|Removed |Added Attachment #101078|0 |1 is obsolete|| Attachment #101079|0 |1 is obsolete|| Attachment #101080|0 |1 is obsolete|| Attachment #101081|0 |1 is obsolete|| --- Comment #8 from Jonathan Druart --- Created attachment 101295 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101295=edit Bug 24912: Add a new yml2sql sub to C4::Installer It will allow us to generate sql code from the yml files -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 Bernardo Gonzalez Kriegel changed: What|Removed |Added CC||bgkrie...@gmail.com --- Comment #7 from Bernardo Gonzalez Kriegel --- (In reply to Jonathan Druart from comment #6) > Bernardo, I have no idea how to fix that, but having the datatype in the yml > sounds wrong to me. > We could retrieve it from the DBIC schema, but that will make the process > heavier (time) Jonathan, yeah, sounds wrong but inevitable I think. I was faced with the same problem a couple of years ago, when I wrote a script to build sql from xml. I was thinking now in something like tables: - marc_tag_structure: translatable: [ liblibrarian, libopac ] numeric: [ repeatable, mandatory ] multiline: [] rows: - tagfield: "999" liblibrarian: "SYSTEM CONTROL NUMBERS (KOHA)" libopac: "SYSTEM CONTROL NUMBERS (KOHA)" repeatable: 1 mandatory: 0 authorised_value: "" frameworkcode: "" added 'numeric' to list those fields. That will be ignored everywhere except for yml2sub Anyway, I liked your other modifications to Bug 24883. Could you consider to re-add your patches except yml2sql sub? Let that sub live here until we found a clean way to make it works. -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #6 from Jonathan Druart --- Bernardo, I have no idea how to fix that, but having the datatype in the yml sounds wrong to me. We could retrieve it from the DBIC schema, but that will make the process heavier (time) -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #5 from Jonathan Druart --- From bug 24883 comment 13: """ Now, the conversion part. The problem here is that all values are printed as strings, producing INSERT INTO marc_tag_structure ( `authorised_value`,`frameworkcode`,`liblibrarian`,`libopac`,`mandatory`,`repeatable`,`tagfield` ) VALUES ('', '', 'LEADER', 'LEADER', '1', '0', '000'), instead of ('', '', 'LEADER', 'LEADER', 1, 0, '000'), A file like this will fail to load with strict mode. This could be fixed if we declare on each table which fields are numeric, and take that into account when doing the conversion. What do you think? """ -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #4 from Jonathan Druart --- Created attachment 101081 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101081=edit Bug 24912: Move new sub from load_yaml.pl Use the sub from C4::Installer to avoid dup of code. Also add an option to convert the yml file to SQL queries Note: We are going to modify the script and so will do more stuffs. We may want to rename it, maybe installer_utilities.pl, misc/installer/yaml_utility.pl, any suggestions? -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #3 from Jonathan Druart --- Created attachment 101080 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101080=edit Bug 24912: Add a new yml2sql sub to C4::Installer It will allow us to generate sql code from the yml files -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #2 from Jonathan Druart --- Created attachment 101079 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101079=edit Bug 24912: Move to a flat array with all values to an array of arrayref For the following SQL query: INSERT INTO cities(city_name, city_country) VALUES ('Madrid', 'Spain'), ('Buenos Aires', 'Argentina'); We move from: [ 'Madrid', 'Spain', 'Buenos Aires', 'Argentina' ] to: [ [ 'Madrid', 'Spain' ], [ 'Buenos Aires', 'Argentina' ] ] Which make more sense to split, build and construct the queries -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/
[Koha-bugs] [Bug 24912] Generate sql from yaml installer files
https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=24912 --- Comment #1 from Jonathan Druart --- Created attachment 101078 --> https://bugs.koha-community.org/bugzilla3/attachment.cgi?id=101078=edit Bug 24912: Centralize code to load YAML installer files to a sub -- You are receiving this mail because: You are watching all bug changes. ___ Koha-bugs mailing list Koha-bugs@lists.koha-community.org https://lists.koha-community.org/cgi-bin/mailman/listinfo/koha-bugs website : http://www.koha-community.org/ git : http://git.koha-community.org/ bugs : http://bugs.koha-community.org/