Bugzilla – Attachment 101296 Details for
Bug 24912
Generate SQL from YAML installer files
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 24912: Add the ability to convert yaml installer files to SQL queries
Bug-24912-Add-the-ability-to-convert-yaml-installe.patch (text/plain), 1.47 KB, created by
Jonathan Druart
on 2020-03-20 15:29:12 UTC
(
hide
)
Description:
Bug 24912: Add the ability to convert yaml installer files to SQL queries
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2020-03-20 15:29:12 UTC
Size:
1.47 KB
patch
obsolete
>From ef754de724fad1bf3a42b6deb3e773c8f9b0b9b9 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Fri, 20 Mar 2020 16:28:46 +0100 >Subject: [PATCH] Bug 24912: Add the ability to convert yaml installer files to > SQL queries > >--- > misc/load_yaml.pl | 13 ++++++++++--- > 1 file changed, 10 insertions(+), 3 deletions(-) > >diff --git a/misc/load_yaml.pl b/misc/load_yaml.pl >index b12d88d886..9879b5eb01 100755 >--- a/misc/load_yaml.pl >+++ b/misc/load_yaml.pl >@@ -28,7 +28,7 @@ sub print_usage { > print <<USAGE; > > $basename >- Load file in YAML format into database. >+ Load file in YAML format into database, or convert it to SQL queries > > Usage: > $0 [--file=FILE] >@@ -36,20 +36,22 @@ $0 -h > -h, --help Show this help > -f, --file=FILE File to load. > --load Load the file into the database >+ --convert Convert to SQL > > USAGE > } > > # Getting parameters >-my ( @files, $dump, $load, $help ); >+my ( @files, $dump, $load, $convert, $help ); > > GetOptions( > 'help|h' => \$help, > 'load' => \$load, >+ 'convert' => \$convert, > 'file|f=s@' => \@files, > ) or print_usage, exit 1; > >-if ($help or not @files or not $load) { >+if ($help or not @files or not ($convert or $load)) { > print_usage; > exit; > } >@@ -61,3 +63,8 @@ if ( $load ) { > say $error if $error; > } > } >+if ( $convert ) { >+ for my $f ( @files ) { >+ say $installer->yml2sql($f); >+ } >+} >-- >2.20.1
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 24912
:
101078
|
101079
|
101080
|
101081
|
101295
| 101296