Bug 3624 : Follow up patch, to catch any installs that still have the missing columns
This commit is contained in:
parent
306871578e
commit
3f8bb003cc
|
|
@ -4051,6 +4051,25 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
# due to a mismatch in kohastructure.sql some koha will have missing columns in aqbasketgroup
|
||||
# this attempts to fix that
|
||||
$DBversion = '3.03.00.023';
|
||||
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
|
||||
my $sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aqbasketgroups' AND COLUMN_NAME = 'billingplace'");
|
||||
$sth->execute;
|
||||
$dbh->do("ALTER TABLE aqbasketgroups ADD billingplace VARCHAR(10)") if ! $sth->fetchrow_hashref;
|
||||
$sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aqbasketgroups' AND COLUMN_NAME = 'deliveryplace'");
|
||||
$sth->execute;
|
||||
$dbh->do("ALTER TABLE aqbasketgroups ADD deliveryplace VARCHAR(10)") if ! $sth->fetchrow_hashref;
|
||||
$sth = $dbh->prepare("SELECT * FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'aqbasketgroups' AND COLUMN_NAME = 'deliverycomment'");
|
||||
$sth->execute;
|
||||
$dbh->do("ALTER TABLE aqbasketgroups ADD deliverycomment VARCHAR(255)") if ! $sth->fetchrow_hashref;
|
||||
print "Upgrade to $DBversion done (Reconcile aqbasketgroups)\n";
|
||||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
|
||||
|
||||
=head1 FUNCTIONS
|
||||
|
||||
=head2 DropAllForeignKeys($table)
|
||||
|
|
|
|||
|
|
@ -16,7 +16,7 @@ the kohaversion is divided in 4 parts :
|
|||
use strict;
|
||||
|
||||
sub kohaversion {
|
||||
our $VERSION = '3.03.00.022';
|
||||
our $VERSION = '3.03.00.023';
|
||||
# version needs to be set this way
|
||||
# so that it can be picked up by Makefile.PL
|
||||
# during install
|
||||
|
|
|
|||
Loading…
Reference in New Issue