From 1bf5fb920bc34f44706e837dd1b7441381146eb3 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Wed, 26 Aug 2015 10:37:17 -0300 Subject: [PATCH] Bug 9809: DBRev 3.21.00.19 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../bug_9809-drop_table_reserveconstraints.sql | 5 ----- installer/data/mysql/updatedatabase.pl | 15 +++++++++++++++ 3 files changed, 16 insertions(+), 6 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_9809-drop_table_reserveconstraints.sql diff --git a/Koha.pm b/Koha.pm index e4a317f9dc..58604d02a2 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.21.00.018"; +$VERSION = "3.21.00.019"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_9809-drop_table_reserveconstraints.sql b/installer/data/mysql/atomicupdate/bug_9809-drop_table_reserveconstraints.sql deleted file mode 100644 index 7d00f0d1c3..0000000000 --- a/installer/data/mysql/atomicupdate/bug_9809-drop_table_reserveconstraints.sql +++ /dev/null @@ -1,5 +0,0 @@ -DROP TABLE IF EXISTS reserveconstraints; - -ALTER TABLE reserves DROP constrainttype; - -ALTER TABLE old_reserves DROP constrainttype; diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 10809a16b2..3317c3c16e 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10761,6 +10761,21 @@ if ( CheckVersion($DBversion) ) { SetVersion ($DBversion); } +$DBversion = "3.21.00.019"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q{ + ALTER TABLE reserves DROP constrainttype + }); + $dbh->do(q{ + ALTER TABLE old_reserves DROP constrainttype + }); + $dbh->do(q{ + DROP TABLE IF EXISTS reserveconstraints + }); + print "Upgrade to $DBversion done (Bug 9809: Get rid of reserveconstraints)\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