Bug 14053: DBRev 3.21.00.007

Signed-off-by: Tomas Cohen Arazi <tomascohen@gmail.com>
This commit is contained in:
Tomas Cohen Arazi 2015-06-08 10:48:23 -03:00
parent a6017d87f1
commit a215c79cc9
7 changed files with 32 additions and 21 deletions

View File

@ -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;

View File

@ -1,3 +0,0 @@
ALTER IGNORE TABLE `aqbasket`
ADD KEY `authorisedby` (`authorisedby`)
;

View File

@ -1,3 +0,0 @@
ALTER IGNORE TABLE `aqbooksellers`
ADD KEY `name` (`name`(255))
;

View File

@ -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`)
;

View File

@ -1,3 +0,0 @@
ALTER IGNORE TABLE `aqbudgets_planning`
ADD KEY `budget_period_id` (`budget_period_id`)
;

View File

@ -1,4 +0,0 @@
ALTER IGNORE TABLE `aqorders`
ADD KEY `parent_ordernumber` (`parent_ordernumber`),
ADD KEY `orderstatus` (`orderstatus`)
;

View File

@ -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.