From 63a9c26fe5d5ec5b2ca1b5c7e61c78b4a26455bc Mon Sep 17 00:00:00 2001 From: Jonathan Druart Date: Fri, 27 Oct 2017 14:07:48 -0300 Subject: [PATCH] Bug 13178: DBRev 17.06.000.025 Signed-off-by: Jonathan Druart --- Koha.pm | 2 +- .../bug_13178_wide_cardnumber.sql | 6 ----- installer/data/mysql/updatedatabase.pl | 22 +++++++++++++++++++ 3 files changed, 23 insertions(+), 7 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql diff --git a/Koha.pm b/Koha.pm index 58595d2fe3..a266569c9c 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.024"; +$VERSION = "17.06.00.025"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql b/installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql deleted file mode 100644 index 7f3e23b9a4..0000000000 --- a/installer/data/mysql/atomicupdate/bug_13178_wide_cardnumber.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE borrowers MODIFY cardnumber varchar(32); -ALTER TABLE borrower_modifications MODIFY cardnumber varchar(32); -ALTER TABLE deletedborrowers MODIFY cardnumber varchar(32); -ALTER TABLE deletedborrowers MODIFY cardnumber varchar(32); -ALTER TABLE pending_offline_operations MODIFY cardnumber varchar(32); -ALTER TABLE tmp_holdsqueue MODIFY cardnumber varchar(32); diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index bbee6b9665..ddbda10d49 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -14926,6 +14926,28 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 2093 - Add system preference OPACUserSummary)\n"; } +$DBversion = '17.06.00.025'; +if( CheckVersion( $DBversion ) ) { + $dbh->do(q{ + ALTER TABLE borrowers MODIFY cardnumber varchar(32); + }); + $dbh->do(q{ + ALTER TABLE borrower_modifications MODIFY cardnumber varchar(32); + }); + $dbh->do(q{ + ALTER TABLE deletedborrowers MODIFY cardnumber varchar(32); + }); + $dbh->do(q{ + ALTER TABLE pending_offline_operations MODIFY cardnumber varchar(32); + }); + $dbh->do(q{ + ALTER TABLE tmp_holdsqueue MODIFY cardnumber varchar(32); + }); + + SetVersion( $DBversion ); + print "Upgrade to $DBversion done (Bug 13178 - Increase cardnumber fields to VARCHAR(32))\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