From c70d6e647ac7f9c37c07d8ba3bf97acb2477c48f Mon Sep 17 00:00:00 2001 From: Martin Renvoize Date: Fri, 16 Jan 2026 08:00:07 +0000 Subject: [PATCH] Bug 41649: Add sip_magnetic field to itemtypes table This patch adds the new sip_magnetic boolean flag field to the itemtypes table to allow flagging the itemtype as magnetic for sip responses. --- .../data/mysql/atomicupdate/bug_41649.pl | 23 +++++++++++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 24 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_41649.pl diff --git a/installer/data/mysql/atomicupdate/bug_41649.pl b/installer/data/mysql/atomicupdate/bug_41649.pl new file mode 100644 index 00000000000..eec8489faa6 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41649.pl @@ -0,0 +1,23 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41649", + description => "Add sip_magnetic column to itemtypes table for SIP media handling", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + # Add sip_magnetic column to itemtypes table + $dbh->do( + q{ + ALTER TABLE itemtypes + ADD COLUMN sip_magnetic TINYINT(1) NOT NULL DEFAULT 0 + COMMENT 'Indicates if items of this type are magnetic media for SIP' + AFTER sip_media_type + } + ); + + say_success( $out, "Added column 'itemtypes.sip_magnetic'" ); + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e65b2af7ca4..67c0eec61fe 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4308,6 +4308,7 @@ CREATE TABLE `itemtypes` ( `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''', `sip_media_type` varchar(3) DEFAULT NULL COMMENT 'SIP2 protocol media type for this itemtype', + `sip_magnetic` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Indicates if items of this type are magnetic media for SIP', `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', `automatic_checkin` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'If automatic checkin is enabled for items of this type', -- 2.52.0