Bugzilla – Attachment 167543 Details for
Bug 36330
Fix typo: reseve
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36330: Follow up, change comments in the DB
Bug-36330-Follow-up-change-comments-in-the-DB.patch (text/plain), 2.66 KB, created by
Magnus Enger
on 2024-06-06 13:20:04 UTC
(
hide
)
Description:
Bug 36330: Follow up, change comments in the DB
Filename:
MIME Type:
Creator:
Magnus Enger
Created:
2024-06-06 13:20:04 UTC
Size:
2.66 KB
patch
obsolete
>From 5dbbb229bd6600988dd38d034249d37ed6570705 Mon Sep 17 00:00:00 2001 >From: Magnus Enger <magnus@libriotech.no> >Date: Thu, 6 Jun 2024 15:12:29 +0200 >Subject: [PATCH] Bug 36330: Follow up, change comments in the DB > >This patch updates the comments of course_items.location and >course_items.enabled to say "reserve" instead of "reseve". > >To test in ktd: >- sudo koha-mysql kohadev >- Run: "SHOW CREATE TABLE course_items;" >- Verify the comments of "location" and "enabled" contains > "reseve" instead of "reserve" >- Make a note of the definitions of these two columns >- Run the atomicupdate: "sudo koha-upgrade-schema kohadev" >- Log into the database again and run the same command as above >- Verify the comments now say "reserve" instead of "reseve" >- Make sure the column definitions are otherwise identical to > the ones you saw before the upgrade. Only the spelling of > "reserve" in the comment should be changed. >--- > .../atomicupdate/bug36330-fix-typo-reseve.pl | 27 +++++++++++++++++++ > 1 file changed, 27 insertions(+) > create mode 100644 installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl > >diff --git a/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl b/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl >new file mode 100644 >index 0000000000..b23d7f9e74 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug36330-fix-typo-reseve.pl >@@ -0,0 +1,27 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "36330", >+ description => "Fix typo 'reseve' in COMMENTs for table course_items", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ # Update columns, only changing the COMMENT >+ my $affected1 = $dbh->do(q{ ALTER TABLE course_items MODIFY `location` varchar(80) DEFAULT NULL COMMENT 'new shelving location for the item to have while on reserve (optional)' }); >+ say_info( $out, $affected1 ); >+ if ( $affected1 ) { >+ say_success( $out, "Comment for course_items.location was updated." ); >+ } else { >+ say_failure( $out, "Comment for course_items.location was not updated." ); >+ } >+ my $affected2 = $dbh->do(q{ ALTER TABLE course_items MODIFY `enabled` enum('yes','no') NOT NULL DEFAULT 'no' COMMENT 'if at least one enabled course has this item on reserve, this field will be ''yes'', otherwise it will be ''no''' }); >+ if ( $affected2 ) { >+ say_success( $out, "Comment for course_items.enabled was updated." ); >+ } else { >+ say_failure( $out, "Comment for course_items.enabled was not updated." ); >+ } >+ >+ }, >+}; >-- >2.34.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 36330
:
163655
|
163656
|
163718
|
167543
|
167591
|
167600
|
167663
|
167664