From 2fb5f3624ee87ab8179909a4ad80b1aba76becc0 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 20 Jul 2020 16:05:38 +0200 Subject: [PATCH] Bug 22844: DBRev 20.06.00.007 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_22844.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 13 +++++++++++++ 3 files changed, 14 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_22844.perl diff --git a/Koha.pm b/Koha.pm index 59bf9c7115..4fbd35d4ab 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 = "20.06.00.006"; +$VERSION = "20.06.00.007"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_22844.perl b/installer/data/mysql/atomicupdate/bug_22844.perl deleted file mode 100644 index 4b1d12f19c..0000000000 --- a/installer/data/mysql/atomicupdate/bug_22844.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - if( !column_exists( 'borrower_attribute_types', 'mandatory' ) ) { - $dbh->do(q| - ALTER TABLE borrower_attribute_types - ADD COLUMN mandatory TINYINT(1) NOT NULL DEFAULT 0 - AFTER keep_for_pseudonymization - |); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug XXXXX - Add borrower_attribute_types.mandatory)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 418ec0835a..dde53c97f2 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -22316,6 +22316,19 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 24151, "Add pseudonymized_transactions tables and sysprefs for Pseudonymization" ); } +$DBversion = '20.06.00.007'; +if( CheckVersion( $DBversion ) ) { + if( !column_exists( 'borrower_attribute_types', 'mandatory' ) ) { + $dbh->do(q| + ALTER TABLE borrower_attribute_types + ADD COLUMN mandatory TINYINT(1) NOT NULL DEFAULT 0 + AFTER keep_for_pseudonymization + |); + } + + NewVersion( $DBversion, 22844, "Add borrower_attribute_types.mandatory" ); +} + # SEE bug 13068 # if there is anything in the atomicupdate, read and execute it. my $update_dir = C4::Context->config('intranetdir') . '/installer/data/mysql/atomicupdate/'; -- 2.39.5