From 0b1829acc96130bad7a2636daa4c0b8b41e4bce9 Mon Sep 17 00:00:00 2001 From: Emmi Takkinen Date: Tue, 7 Sep 2021 09:33:44 +0300 Subject: [PATCH 1/3] Bug 9525: Add ft_local_float_group column This patch adds new ft_local_float_group column to library_groups table. To test: 1. Apply patch and update database 2. Confirm new column is added correctly to the library_groups table Sponsored-by: Koha-Suomi Oy --- .../Bug-9525-Add_ft_local_float_group_column.perl | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 11 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/Bug-9525-Add_ft_local_float_group_column.perl diff --git a/installer/data/mysql/atomicupdate/Bug-9525-Add_ft_local_float_group_column.perl b/installer/data/mysql/atomicupdate/Bug-9525-Add_ft_local_float_group_column.perl new file mode 100644 index 0000000000..a6b549ec7e --- /dev/null +++ b/installer/data/mysql/atomicupdate/Bug-9525-Add_ft_local_float_group_column.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + # you can use $dbh here like: + # $dbh->do( "ALTER TABLE biblio ADD COLUMN badtaste int" ); + + $dbh->do("ALTER TABLE library_groups ADD COLUMN IF NOT EXISTS ft_local_float_group tinyint(1) NOT NULL DEFAULT 0 AFTER ft_local_hold_group"); + + # Always end with this (adjust the bug info) + NewVersion( $DBversion, 9525, "Add option to set group as local float group"); +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 69b3613963..4e89d4d7d0 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3329,6 +3329,7 @@ CREATE TABLE `library_groups` ( `ft_search_groups_opac` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for staff side search groups', `ft_search_groups_staff` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group for opac side search groups', `ft_local_hold_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as pick up location for holds', + `ft_local_float_group` tinyint(1) NOT NULL DEFAULT 0 COMMENT 'Use this group to identify libraries as part of float group', `created_on` timestamp NULL DEFAULT NULL COMMENT 'Date and time of creation', `updated_on` timestamp NOT NULL DEFAULT current_timestamp() ON UPDATE current_timestamp() COMMENT 'Date and time of last', PRIMARY KEY (`id`), -- 2.25.1