Bug 12446: DBRev 22.06.00.004
Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io>
This commit is contained in:
parent
d78c0e4730
commit
d1fbd8b3c6
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 = "22.06.00.003";
|
||||
$VERSION = "22.06.00.004";
|
||||
|
||||
sub version {
|
||||
return $VERSION;
|
||||
|
|
|
|||
|
|
@ -1,10 +0,0 @@
|
|||
$DBversion = 'XXX'; # will be replaced by the RM
|
||||
if( CheckVersion( $DBversion ) ) {
|
||||
if ( !column_exists( 'categories', 'canbeguarantee') ){
|
||||
$dbh->do("ALTER TABLE categories ADD COLUMN `canbeguarantee` tinyint(1) NOT NULL default '0' AFTER `checkprevcheckout`");
|
||||
$dbh->do("UPDATE categories SET canbeguarantee = 1 WHERE category_type = 'P' OR category_type = 'C'");
|
||||
}
|
||||
|
||||
SetVersion( $DBversion );
|
||||
print "Upgrade to $DBversion done (Bug 12446 - Ability to allow guarantor relationship for all patron category types)\n";
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
use Modern::Perl;
|
||||
|
||||
return {
|
||||
bug_number => "12446",
|
||||
description => "Ability to allow guarantor relationship for all patron category types",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh) = @$args{qw(dbh)};
|
||||
|
||||
unless ( column_exists( 'categories', 'canbeguarantee' ) ) {
|
||||
$dbh->do(q{
|
||||
ALTER TABLE categories
|
||||
ADD COLUMN `canbeguarantee` tinyint(1) NOT NULL default '0' AFTER `checkprevcheckout`
|
||||
});
|
||||
}
|
||||
|
||||
$dbh->do(q{
|
||||
UPDATE categories
|
||||
SET canbeguarantee = 1
|
||||
WHERE category_type = 'P' OR category_type = 'C'
|
||||
});
|
||||
},
|
||||
};
|
||||
Loading…
Reference in New Issue