From 355209872d2be8c70c36b9cba6cd0f143c1af759 Mon Sep 17 00:00:00 2001
From: Emmi Takkinen <emmi.takkinen@koha-suomi.fi>
Date: Tue, 7 Sep 2021 09:33:44 +0300
Subject: [PATCH] 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
Signed-off-by: Lisette Scheer <lisettePalouse+Koha@gmail.com>
---
.../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 3f524aec6a..f3b33e19b6 100644
--- a/installer/data/mysql/kohastructure.sql
+++ b/installer/data/mysql/kohastructure.sql
@@ -3494,6 +3494,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.30.2