Bugzilla – Attachment 149263 Details for
Bug 32334
Sync comments in database with schema
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32334: (QA follow-up) Force mutual exclusiveness of cmdline flags
Bug-32334-QA-follow-up-Force-mutual-exclusiveness-.patch (text/plain), 2.08 KB, created by
Jonathan Druart
on 2023-04-07 11:49:10 UTC
(
hide
)
Description:
Bug 32334: (QA follow-up) Force mutual exclusiveness of cmdline flags
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2023-04-07 11:49:10 UTC
Size:
2.08 KB
patch
obsolete
>From 1d9f7fa7baff15558072adef96e004e0c6da07a4 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Thu, 9 Feb 2023 15:29:39 +0000 >Subject: [PATCH] Bug 32334: (QA follow-up) Force mutual exclusiveness of > cmdline flags > >Test plan: >Run sync_db_comments.pl --clear --renumber > >Signed-off-by: David Nind <david@davidnind.com> > >Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >--- > misc/maintenance/sync_db_comments.pl | 9 +++++---- > 1 file changed, 5 insertions(+), 4 deletions(-) > >diff --git a/misc/maintenance/sync_db_comments.pl b/misc/maintenance/sync_db_comments.pl >index 6fbd2e6d52a..ffeb930e96e 100755 >--- a/misc/maintenance/sync_db_comments.pl >+++ b/misc/maintenance/sync_db_comments.pl >@@ -42,10 +42,12 @@ GetOptions( > my $commenter = Koha::Database::Commenter->new({ database => delete $cmd_args->{database}, dbh => C4::Context->dbh }); > if( $cmd_args->{help} ) { > pod2usage( -verbose => 2 ); >-} elsif( delete $cmd_args->{clear} ) { # clear overrules reset >+} elsif( ($cmd_args->{clear}||0) + ($cmd_args->{renumber}||0) + ($cmd_args->{reset}||0) > 1 ) { >+ print "You cannot pass the clear, renumber and reset flags together\n"; >+} elsif( delete $cmd_args->{clear} ) { > alert_dry_run( $cmd_args->{dry_run} ); > $commenter->clear( $cmd_args ); >-} elsif( delete $cmd_args->{reset} ) { # reset overrules renumber >+} elsif( delete $cmd_args->{reset} ) { > alert_dry_run( $cmd_args->{dry_run} ); > $commenter->reset_to_schema( $cmd_args ); > } elsif( delete $cmd_args->{renumber} ) { >@@ -106,8 +108,7 @@ misc/maintenance/sync_db_comments.pl > The script is just a wrapper around the module Koha::Database::Commenter. > A test script is provided in t/db_dependent/Koha/Database/Commenter.t. > >- The flags -clear, -reset and -renumber are mutually exclusive. Clear ignores >- the other two, reset ignores renumber. >+ The flags -clear, -reset and -renumber are mutually exclusive. > > The renumber option has been helpful in verifying that the alter table > operations work on the complete Koha database. It is not recommended to run >-- >2.25.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 32334
:
144391
|
144392
|
144393
|
144394
|
146712
|
146713
|
146714
|
146715
|
146716
|
146717
|
146718
|
146719
|
146720
|
148266
|
148299
|
148335
|
148338
|
148339
|
148340
|
148341
|
148342
|
148343
|
148344
|
148345
|
148346
|
148347
|
148348
|
149259
|
149260
|
149261
|
149262
| 149263 |
149264
|
149265
|
149266
|
149267
|
149268
|
149269
|
149270