Bug 24986: DBRev 19.05.12.001
Signed-off-by: Aleisha Amohia <aleishaamohia@hotmail.com>
(cherry picked from commit 7efb135dfb)
Signed-off-by: Victor Grousset/tuxayo <victor@tuxayo.net>
This commit is contained in:
parent
38f8ab82ae
commit
9fa242b019
2
Koha.pm
2
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 = "19.05.12.000";
|
||||
$VERSION = "19.05.12.001";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,23 +0,0 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
for my $f (qw( streetnumber streettype zipcode mobile B_streetnumber B_streettype B_zipcode ) ) {
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE borrowers MODIFY $f TINYTEXT DEFAULT NULL
|
||||
|);
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE deletedborrowers MODIFY $f TINYTEXT DEFAULT NULL
|
||||
|);
|
||||
}
|
||||
for my $f ( qw( B_address altcontactfirstname altcontactsurname altcontactaddress1 altcontactaddress2 altcontactaddress3 altcontactzipcode altcontactphone ) ) {
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE borrowers MODIFY $f MEDIUMTEXT DEFAULT NULL
|
||||
|);
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE deletedborrowers MODIFY $f MEDIUMTEXT DEFAULT NULL
|
||||
|);
|
||||
}
|
||||
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 24986 - Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT)\n";
|
||||
}
|
||||
|
|
@ -19100,6 +19100,30 @@ if ( CheckVersion($DBversion) ) {
|
|||
SetVersion ($DBversion);
|
||||
}
|
||||
|
||||
$DBversion = '19.05.12.001';
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
|
||||
for my $f (qw( streetnumber streettype zipcode mobile B_streetnumber B_streettype B_zipcode ) ) {
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE borrowers MODIFY $f TINYTEXT DEFAULT NULL
|
||||
|);
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE deletedborrowers MODIFY $f TINYTEXT DEFAULT NULL
|
||||
|);
|
||||
}
|
||||
for my $f ( qw( B_address altcontactfirstname altcontactsurname altcontactaddress1 altcontactaddress2 altcontactaddress3 altcontactzipcode altcontactphone ) ) {
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE borrowers MODIFY $f MEDIUMTEXT DEFAULT NULL
|
||||
|);
|
||||
$dbh->do(qq|
|
||||
ALTER TABLE deletedborrowers MODIFY $f MEDIUMTEXT DEFAULT NULL
|
||||
|);
|
||||
}
|
||||
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 24986 - Switch borrowers address related fields to TINYTEXT or MEDIUMTEXT)\n";
|
||||
}
|
||||
|
||||
# SEE bug 13068
|
||||
# if there is anything in the atomicupdate, read and execute it.
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue