From a215c79cc9ce512eb2994ebfe4bdd07c79fef871 Mon Sep 17 00:00:00 2001 From: Tomas Cohen Arazi Date: Mon, 8 Jun 2015 10:48:23 -0300 Subject: [PATCH] Bug 14053: DBRev 3.21.00.007 Signed-off-by: Tomas Cohen Arazi --- Koha.pm | 2 +- .../bug_14053-add_keys_aqbasket.sql | 3 -- .../bug_14053-add_keys_aqbooksellers.sql | 3 -- .../bug_14053-add_keys_aqbudgets.sql | 7 ----- .../bug_14053-add_keys_aqbudgets_planning.sql | 3 -- .../bug_14053-add_keys_aqorders.sql | 4 --- installer/data/mysql/updatedatabase.pl | 31 +++++++++++++++++++ 7 files changed, 32 insertions(+), 21 deletions(-) delete mode 100644 installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbasket.sql delete mode 100644 installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbooksellers.sql delete mode 100644 installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets.sql delete mode 100644 installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets_planning.sql delete mode 100644 installer/data/mysql/atomicupdate/bug_14053-add_keys_aqorders.sql diff --git a/Koha.pm b/Koha.pm index 55730eb87b..695e28eb4d 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.006"; +$VERSION = "3.21.00.007"; sub version { return $VERSION; diff --git a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbasket.sql b/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbasket.sql deleted file mode 100644 index 82c65e378e..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbasket.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER IGNORE TABLE `aqbasket` - ADD KEY `authorisedby` (`authorisedby`) -; \ No newline at end of file diff --git a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbooksellers.sql b/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbooksellers.sql deleted file mode 100644 index f70175dc60..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbooksellers.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER IGNORE TABLE `aqbooksellers` - ADD KEY `name` (`name`(255)) -; diff --git a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets.sql b/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets.sql deleted file mode 100644 index 03c91509bd..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets.sql +++ /dev/null @@ -1,7 +0,0 @@ -ALTER IGNORE TABLE `aqbudgets` - ADD KEY `budget_parent_id` (`budget_parent_id`), - ADD KEY `budget_code` (`budget_code`), - ADD KEY `budget_branchcode` (`budget_branchcode`), - ADD KEY `budget_period_id` (`budget_period_id`), - ADD KEY `budget_owner_id` (`budget_owner_id`) -; \ No newline at end of file diff --git a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets_planning.sql b/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets_planning.sql deleted file mode 100644 index 3c1b2b637b..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqbudgets_planning.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER IGNORE TABLE `aqbudgets_planning` - ADD KEY `budget_period_id` (`budget_period_id`) -; \ No newline at end of file diff --git a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqorders.sql b/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqorders.sql deleted file mode 100644 index ff8a5857de..0000000000 --- a/installer/data/mysql/atomicupdate/bug_14053-add_keys_aqorders.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER IGNORE TABLE `aqorders` - ADD KEY `parent_ordernumber` (`parent_ordernumber`), - ADD KEY `orderstatus` (`orderstatus`) -; \ No newline at end of file diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 34c2d741fa..a5587c6ab3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -10554,6 +10554,37 @@ if ( CheckVersion($DBversion) ) { SetVersion($DBversion); } +$DBversion = "3.21.00.007"; +if ( CheckVersion($DBversion) ) { + $dbh->do(q| + ALTER IGNORE TABLE aqbasket + ADD KEY authorisedby (authorisedby) + |); + $dbh->do(q| + ALTER IGNORE TABLE aqbooksellers + ADD KEY name (name(255)) + |); + $dbh->do(q| + ALTER IGNORE TABLE aqbudgets + ADD KEY budget_parent_id (budget_parent_id), + ADD KEY budget_code (budget_code), + ADD KEY budget_branchcode (budget_branchcode), + ADD KEY budget_period_id (budget_period_id), + ADD KEY budget_owner_id (budget_owner_id) + |); + $dbh->do(q| + ALTER IGNORE TABLE aqbudgets_planning + ADD KEY budget_period_id (budget_period_id) + |); + $dbh->do(q| + ALTER IGNORE TABLE aqorders + ADD KEY parent_ordernumber (parent_ordernumber), + ADD KEY orderstatus (orderstatus) + |); + print "Upgrade to $DBversion done (Bug 14053: Acquisition db tables are missing indexes)\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.2