From 0c752b367cca3d577b2c2b87901ee18c49940cea Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Mon, 16 May 2016 17:09:53 +0000 Subject: [PATCH] Bug 16402: Update DB rev (3.22.06.004) Signed-off-by: Julian Maurice --- Koha.pm | 2 +- installer/data/mysql/atomicupdate/bug_16402.sql | 14 -------------- installer/data/mysql/updatedatabase.pl | 12 ++++++++++++ 3 files changed, 13 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_16402.sql diff --git a/Koha.pm b/Koha.pm index 27f93cb896..020370689d 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 = "3.22.06.003"; +$VERSION = "3.22.06.004"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_16402.sql b/installer/data/mysql/atomicupdate/bug_16402.sql deleted file mode 100644 index 44f13d1b3e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_16402.sql +++ /dev/null @@ -1,14 +0,0 @@ -ALTER TABLE letter MODIFY COLUMN branchcode varchar(10) NOT NULL DEFAULT ''; -ALTER TABLE permissions MODIFY COLUMN code varchar(64) NOT NULL DEFAULT ''; - --- $DBversion = "3.23.00.XXX"; --- if(CheckVersion($DBversion)) { --- $dbh->do(q{ --- ALTER TABLE letter MODIFY COLUMN branchcode varchar(10) NOT NULL DEFAULT '' --- }); --- $dbh->do(q{ --- ALTER TABLE permissions MODIFY COLUMN code varchar(64) NOT NULL DEFAULT ''; --- }); --- print "Upgrade to $DBversion done (Bug 16402: Fix DB structure to work on MySQL 5.7)\n"; --- SetVersion($DBversion); --- } diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 87d2e14f2c..215172672b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -11604,6 +11604,18 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.22.06.004"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE letter MODIFY COLUMN branchcode varchar(10) NOT NULL DEFAULT '' + }); + $dbh->do(q{ + ALTER TABLE permissions MODIFY COLUMN code varchar(64) NOT NULL DEFAULT ''; + }); + print "Upgrade to $DBversion done (Bug 16402: Fix DB structure to work on MySQL 5.7)\n"; + SetVersion($DBversion); +} + # DEVELOPER PROCESS, search for anything to execute in the db_update directory # SEE bug 13068 -- 2.39.5