From 8a36435835fffe4b113d737c1d38acd55eff921f Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Mon, 10 May 2021 12:45:32 +0000 Subject: [PATCH] Bug 26995: DBRev 20.12.00.048 Signed-off-by: Jonathan Druart Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_26995.perl | 23 ------------------- installer/data/mysql/updatedatabase.pl | 23 +++++++++++++++++++ 3 files changed, 24 insertions(+), 24 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_26995.perl diff --git a/Koha.pm b/Koha.pm index 0b6eff4c8b..636ca9027e 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.12.00.047"; +$VERSION = "20.12.00.048"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_26995.perl b/installer/data/mysql/atomicupdate/bug_26995.perl deleted file mode 100644 index 1a3ea15ea3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_26995.perl +++ /dev/null @@ -1,23 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - if ( column_exists( 'borrowers', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE borrowers DROP COLUMN relationship - }); - } - - if ( column_exists( 'deletedborrowers', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE deletedborrowers DROP COLUMN relationship - }); - } - - if ( column_exists( 'borrower_modifications', 'relationship' ) ) { - $dbh->do(q{ - ALTER TABLE borrower_modifications DROP COLUMN relationship - }); - } - - # Always end with this (adjust the bug info) - NewVersion( $DBversion, 26995, "Drop column relationship from borrower tables"); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index c584806144..e479fde3ae 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -24227,6 +24227,29 @@ if( CheckVersion( $DBversion ) ) { NewVersion( $DBversion, 23215, "Remove core PayPal support in favor of the use of plugins" ); } +$DBversion = '20.12.00.048'; +if( CheckVersion( $DBversion ) ) { + if ( column_exists( 'borrowers', 'relationship' ) ) { + $dbh->do(q{ + ALTER TABLE borrowers DROP COLUMN relationship + }); + } + + if ( column_exists( 'deletedborrowers', 'relationship' ) ) { + $dbh->do(q{ + ALTER TABLE deletedborrowers DROP COLUMN relationship + }); + } + + if ( column_exists( 'borrower_modifications', 'relationship' ) ) { + $dbh->do(q{ + ALTER TABLE borrower_modifications DROP COLUMN relationship + }); + } + + NewVersion( $DBversion, 26995, "Drop column relationship from borrower tables"); +} + # 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