From 90fea78bc15642798d9f7e9540c6f7f09258ff47 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 9 Feb 2018 15:42:03 -0300 Subject: [PATCH] Bug 20157: DBRev 17.12.00.011 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_20157.perl | 12 ------------ installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 3 files changed, 14 insertions(+), 13 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_20157.perl diff --git a/Koha.pm b/Koha.pm index 1042792cda..cecdeb8ea8 100644 --- a/Koha.pm +++ b/Koha.pm @@ -29,7 +29,7 @@ use vars qw{ $VERSION }; # - #4 : the developer version. The 4th number is the database subversion. # used by developers when the database changes. updatedatabase take care of the changes itself # and is automatically called by Auth.pm when needed. -$VERSION = "17.12.00.010"; +$VERSION = "17.12.00.011"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_20157.perl b/installer/data/mysql/atomicupdate/bug_20157.perl deleted file mode 100644 index 351548663e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_20157.perl +++ /dev/null @@ -1,12 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - if( !column_exists( 'library_groups', 'ft_search_groups_opac' ) ) { - $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_opac tinyint(1) NOT NULL DEFAULT 0 AFTER ft_hide_patron_info" ); - $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_staff tinyint(1) NOT NULL DEFAULT 0 AFTER ft_search_groups_opac" ); - $dbh->do( "UPDATE library_groups SET ft_search_groups_staff = 1 AND ft_search_groups_opac = 1 WHERE title = '__SEARCH_GROUPS__'" ); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 20157 - Use group 'features' to decide which groups to use for group searching functionality)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 61fc8455d0..bae69380b3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -15311,6 +15311,19 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 20133 - Add library_groups.ft_hide_patron_info)\n"; } +$DBversion = '17.12.00.011'; +if( CheckVersion( $DBversion ) ) { + + if( !column_exists( 'library_groups', 'ft_search_groups_opac' ) ) { + $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_opac tinyint(1) NOT NULL DEFAULT 0 AFTER ft_hide_patron_info" ); + $dbh->do( "ALTER TABLE library_groups ADD COLUMN ft_search_groups_staff tinyint(1) NOT NULL DEFAULT 0 AFTER ft_search_groups_opac" ); + $dbh->do( "UPDATE library_groups SET ft_search_groups_staff = 1 AND ft_search_groups_opac = 1 WHERE title = '__SEARCH_GROUPS__'" ); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 20157 - Use group 'features' to decide which groups to use for group searching functionality)\n"; +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. -- 2.39.5