diff --git a/installer/data/mysql/atomicupdate/bug_41983.pl b/installer/data/mysql/atomicupdate/bug_41983.pl new file mode 100755 index 0000000000..3a1bdbef0c --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_41983.pl @@ -0,0 +1,21 @@ +use Modern::Perl; +use Koha::Installer::Output qw(say_warning say_success say_info); + +return { + bug_number => "41983", + description => "Add hold_group_id to tmp_holdsqueue", + up => sub { + my ($args) = @_; + my ( $dbh, $out ) = @$args{qw(dbh out)}; + + if ( !column_exists( 'tmp_holdsqueue', 'hold_group_id' ) ) { + $dbh->do( + q{ + ALTER TABLE tmp_holdsqueue + ADD COLUMN hold_group_id int(11) DEFAULT NULL AFTER notes + } + ); + say_success( $out, "Added hold_group_id to tmp_holdsqueue" ); + } + }, +}; diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 0412f5c454..5b085e8f47 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -6887,6 +6887,7 @@ CREATE TABLE `tmp_holdsqueue` ( `holdingbranch` varchar(10) DEFAULT NULL, `pickbranch` varchar(10) DEFAULT NULL, `notes` mediumtext DEFAULT NULL, + `hold_group_id` int(10) unsigned DEFAULT NULL, `item_level_request` tinyint(4) NOT NULL DEFAULT 0, `timestamp` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'date and time this entry as added/last updated', PRIMARY KEY (`itemnumber`),