From 179596be8883c537c64612578b12425d061895b2 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 2 Feb 2018 14:21:14 -0300 Subject: [PATCH] Bug 20133: Add new column library_groups.ft_hide_patron_info Signed-off-by: Kyle M Hall --- installer/data/mysql/atomicupdate/bug_20133.perl | 10 ++++++++++ installer/data/mysql/kohastructure.sql | 1 + 2 files changed, 11 insertions(+) create mode 100644 installer/data/mysql/atomicupdate/bug_20133.perl diff --git a/installer/data/mysql/atomicupdate/bug_20133.perl b/installer/data/mysql/atomicupdate/bug_20133.perl new file mode 100644 index 0000000..596fb63 --- /dev/null +++ b/installer/data/mysql/atomicupdate/bug_20133.perl @@ -0,0 +1,10 @@ +$DBversion = 'XXX'; # will be replaced by the RM +if( CheckVersion( $DBversion ) ) { + + if( !column_exists( 'library_groups', 'ft_hide_patron_info' ) ) { + $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_hide_patron_info tinyint(1) NOT NULL DEFAULT 0 AFTER description" ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug XXXXX - Add library_groups.ft_hide_patron_info)\n"; +} diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index e1ff298..2c6c922 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -4143,6 +4143,7 @@ CREATE TABLE library_groups ( branchcode VARCHAR(10) NULL DEFAULT NULL, -- The branchcode of a branch belonging to the parent group title VARCHAR(100) NULL DEFAULT NULL, -- Short description of the goup description TEXT NULL DEFAULT NULL, -- Longer explanation of the group, if necessary + ft_hide_patron_info tinyint(1) NOT NULL DEFAULT 0, -- Turn on the feature "Hide patron's info" for this group created_on DATETIME NOT NULL, -- Date and time of creation updated_on DATETIME NULL DEFAULT NULL, -- Date and time of last PRIMARY KEY id ( id ), -- 2.10.2