From 9fe4f3b2bac53afe4844a42ec71da0640aeaeb97 Mon Sep 17 00:00:00 2001 From: Kyle M Hall Date: Fri, 20 Jan 2017 14:00:47 +0000 Subject: [PATCH] Bug 17813 - DBRev 16.12.00.006 Signed-off-by: Kyle M Hall --- Koha.pm | 2 +- .../bug_17813_borrower_attributes_pk.perl | 14 -------------- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 15 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.perl diff --git a/Koha.pm b/Koha.pm index 9c085931aa..8e399d6ace 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 = "16.12.00.005"; +$VERSION = "16.12.00.006"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.perl b/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.perl deleted file mode 100644 index bb0e5f8a37..0000000000 --- a/installer/data/mysql/atomicupdate/bug_17813_borrower_attributes_pk.perl +++ /dev/null @@ -1,14 +0,0 @@ -$DBversion = "16.12.00.XXX"; -if ( CheckVersion($DBversion) ) { - unless ( column_exists( 'borrower_attributes', 'id' ) - and index_exists( 'borrower_attributes', 'PRIMARY' ) ) - { - $dbh->do(q{ - ALTER TABLE `borrower_attributes` - ADD `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST - }); - } - - print "Upgrade to $DBversion done (Bug 17813: Table borrower_attributes needs a primary key\n"; - SetVersion($DBversion); -} diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 3472b7e848..0fdbded29f 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -13846,6 +13846,21 @@ if( CheckVersion( $DBversion ) ) { print "Upgrade to $DBversion done (Bug 17913 - AuthorityMergeMode)\n"; } +$DBversion = "16.12.00.006"; +if ( CheckVersion($DBversion) ) { + unless ( column_exists( 'borrower_attributes', 'id' ) + and index_exists( 'borrower_attributes', 'PRIMARY' ) ) + { + $dbh->do(q{ + ALTER TABLE `borrower_attributes` + ADD `id` int(11) NOT NULL AUTO_INCREMENT PRIMARY KEY FIRST + }); + } + + print "Upgrade to $DBversion done (Bug 17813: Table borrower_attributes needs a primary key\n"; + SetVersion($DBversion); +} + # 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