Bugzilla – Attachment 170114 Details for
Bug 32485
Add itemtype checkout message
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32485: DB Updates
Bug-32485-DB-Updates.patch (text/plain), 3.02 KB, created by
Sam Lau
on 2024-08-06 20:12:41 UTC
(
hide
)
Description:
Bug 32485: DB Updates
Filename:
MIME Type:
Creator:
Sam Lau
Created:
2024-08-06 20:12:41 UTC
Size:
3.02 KB
patch
obsolete
>From e42348dd7b8240d4d5a969dc7bdcdb3a89389ac3 Mon Sep 17 00:00:00 2001 >From: Sam Lau <samalau@gmail.com> >Date: Tue, 6 Aug 2024 19:16:43 +0000 >Subject: [PATCH] Bug 32485: DB Updates > >Add new 'checkoutmsg' and 'checkoutmsgtype' columns to 'itemtypes' >--- > .../data/mysql/atomicupdate/bug_32485.pl | 27 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 29 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_32485.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_32485.pl b/installer/data/mysql/atomicupdate/bug_32485.pl >new file mode 100755 >index 0000000000..73b8aca1ab >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32485.pl >@@ -0,0 +1,27 @@ >+use Modern::Perl; >+use Koha::Installer::Output qw(say_warning say_failure say_success say_info); >+ >+return { >+ bug_number => "32485", >+ description => "Add new 'checkoutmsg' and 'checkoutmsgtype' columns to 'itemtypes'", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ if ( !column_exists( 'itemtypes', 'checkoutmsg' ) ) { >+ $dbh->do( >+ "ALTER TABLE itemtypes ADD COLUMN checkoutmsg VARCHAR(255) NULL DEFAULT NULL COMMENT 'message that is displayed when an item with the given item type is checked out' AFTER checkinmsgtype" >+ ); >+ } >+ >+ say $out "Added column 'itemtypes.checkoutmsg'"; >+ >+ if ( !column_exists( 'itemtypes', 'checkoutmsgtype' ) ) { >+ $dbh->do( >+ "ALTER TABLE itemtypes ADD COLUMN checkoutmsgtype CHAR(16) DEFAULT 'message' NOT NULL COMMENT 'Type (CSS class) for the checkoutmsg, can be ''alert'' or ''message''' AFTER checkoutmsg" >+ ); >+ } >+ >+ say $out "Added column 'itemtypes.checkoutmsgtype'"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 07b1e78e1f..0a27c1a909 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4133,6 +4133,8 @@ CREATE TABLE `itemtypes` ( > `summary` mediumtext DEFAULT NULL COMMENT 'information from the summary field, may include HTML', > `checkinmsg` varchar(255) DEFAULT NULL COMMENT 'message that is displayed when an item with the given item type is checked in', > `checkinmsgtype` char(16) NOT NULL DEFAULT 'message' COMMENT 'type (CSS class) for the checkinmsg, can be ''alert'' or ''message''', >+ `checkoutmsg` varchar(255) DEFAULT NULL COMMENT 'message that is displayed when an item with the given item type is checked out', >+ `checkoutmsgtype` char(16) NOT NULL DEFAULT 'message' COMMENT 'type (CSS class) for the checkoutmsg, can be ''alert'' or ''message''', > `sip_media_type` varchar(3) DEFAULT NULL COMMENT 'SIP2 protocol media type for this itemtype', > `hideinopac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Hide the item type from the search options in OPAC', > `searchcategory` varchar(80) DEFAULT NULL COMMENT 'Group this item type with others with the same value on OPAC search options', >-- >2.39.2
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 32485
:
170113
| 170114 |
170115
|
170116
|
170503