Bugzilla – Attachment 59585 Details for
Bug 18000
Add --tablename option to misc/devel/update_dbix_class_files.pl script
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 18000 - Add --tablename option to misc/devel/update_dbix_class_files.pl script
Bug-18000---Add---tablename-option-to-miscdevelupd.patch (text/plain), 1.41 KB, created by
Alex Arnaud
on 2017-01-26 14:39:25 UTC
(
hide
)
Description:
Bug 18000 - Add --tablename option to misc/devel/update_dbix_class_files.pl script
Filename:
MIME Type:
Creator:
Alex Arnaud
Created:
2017-01-26 14:39:25 UTC
Size:
1.41 KB
patch
obsolete
>From a41001f08473ce3038f51749135830ac031e60fb Mon Sep 17 00:00:00 2001 >From: Alex Arnaud <alex.arnaud@biblibre.com> >Date: Thu, 26 Jan 2017 14:37:23 +0000 >Subject: [PATCH] Bug 18000 - Add --tablename option to > misc/devel/update_dbix_class_files.pl script > >--- > misc/devel/update_dbix_class_files.pl | 8 +++++++- > 1 file changed, 7 insertions(+), 1 deletion(-) > >diff --git a/misc/devel/update_dbix_class_files.pl b/misc/devel/update_dbix_class_files.pl >index a291cef..033e676 100755 >--- a/misc/devel/update_dbix_class_files.pl >+++ b/misc/devel/update_dbix_class_files.pl >@@ -32,6 +32,7 @@ my $db_port = '3306'; > my $db_name; > my $db_user; > my $db_passwd; >+my $tablename; > my $help; > > GetOptions( >@@ -42,6 +43,7 @@ GetOptions( > "db_name=s" => \$db_name, > "db_user=s" => \$db_user, > "db_passwd=s" => \$db_passwd, >+ "tablename=s" => \$tablename, > "h|help" => \$help > ); > >@@ -52,10 +54,14 @@ if (! defined $db_name ) { > print "Error: \'db_name\' parameter is mandatory.\n"; > pod2usage(1); > } else { >+ my $options = { debug => 1, dump_directory => $path, preserve_case => 1 }; >+ if ($tablename) { >+ $options->{constraint} = qr/\A$tablename\z/ >+ } > > make_schema_at( > "Koha::Schema", >- { debug => 1, dump_directory => $path, preserve_case => 1 }, >+ $options, > ["DBI:$db_driver:dbname=$db_name;host=$db_host;port=$db_port",$db_user, $db_passwd ] > ); > } >-- >2.7.4
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 18000
:
59584
|
59585
|
60919