From 25655c3bc56338ac5327745a9d3f2e378d37e8da 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: Jonathan Druart --- 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 0000000000..596fb630ca --- /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 d23364145f..9ee4a29d26 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 TIMESTAMP NULL, -- Date and time of creation updated_on TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- Date and time of last PRIMARY KEY id ( id ), -- 2.11.0