From 4270d24338f40f2e59e0814019dac9830fa09553 Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Tue, 19 Sep 2017 13:03:50 -0300 Subject: [PATCH] Bug 6758: DBRev 17.05.00.008 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../data/mysql/atomicupdate/bug_6758.perl | 24 ------------------- installer/data/mysql/updatedatabase.pl | 24 +++++++++++++++++++ 3 files changed, 25 insertions(+), 25 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_6758.perl diff --git a/Koha.pm b/Koha.pm index 120b13a378..ebd1571ae2 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.06.00.007"; +$VERSION = "17.06.00.008"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_6758.perl b/installer/data/mysql/atomicupdate/bug_6758.perl deleted file mode 100644 index c7bf74b48b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_6758.perl +++ /dev/null @@ -1,24 +0,0 @@ -$DBversion = 'XXX'; # will be replaced by the RM -if( CheckVersion( $DBversion ) ) { - - unless ( column_exists( 'borrowers', 'date_renewed' ) ) { - $dbh->do(q{ - ALTER TABLE borrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry; - }); - } - - unless ( column_exists( 'deletedborrowers', 'date_renewed' ) ) { - $dbh->do(q{ - ALTER TABLE deletedborrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry; - }); - } - - unless ( column_exists( 'borrower_modifications', 'date_renewed' ) ) { - $dbh->do(q{ - ALTER TABLE borrower_modifications ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry; - }); - } - - SetVersion( $DBversion ); - print "Upgrade to $DBversion done (Bug 6758 - Capture membership renewal date for reporting purposes)\n"; -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 4a3b773283..3d72785710 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14637,6 +14637,30 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 10132 - MARCOrgCode on branch level (branches.marcorgcode))\n"; } +$DBversion = '17.06.00.008'; +if( CheckVersion( $DBversion ) ) { + unless ( column_exists( 'borrowers', 'date_renewed' ) ) { + $dbh->do(q{ + ALTER TABLE borrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry; + }); + } + + unless ( column_exists( 'deletedborrowers', 'date_renewed' ) ) { + $dbh->do(q{ + ALTER TABLE deletedborrowers ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry; + }); + } + + unless ( column_exists( 'borrower_modifications', 'date_renewed' ) ) { + $dbh->do(q{ + ALTER TABLE borrower_modifications ADD COLUMN date_renewed DATE NULL DEFAULT NULL AFTER dateexpiry; + }); + } + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 6758 - Capture membership renewal date for reporting purposes (borrowers.date_renewed))\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