Bug 30648: Add deleted_biblionumber column for reserves
Signed-off-by: Anneli Österman <anneli.osterman@koha-suomi.fi>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
(cherry picked from commit e289a87111)
Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>
This commit is contained in:
parent
e1c2cf1b6b
commit
d157ef3f7a
|
|
@ -0,0 +1,31 @@
|
|||
use Modern::Perl;
|
||||
use Koha::Installer::Output qw(say_warning say_failure say_success say_info);
|
||||
|
||||
return {
|
||||
bug_number => "30648",
|
||||
description => "Store biblionumber of deleted record in old reserves",
|
||||
up => sub {
|
||||
my ($args) = @_;
|
||||
my ($dbh, $out) = @$args{qw(dbh out)};
|
||||
if ( !column_exists( 'reserves', 'deleted_biblionumber' ) ) {
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE `reserves`
|
||||
ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber
|
||||
}
|
||||
);
|
||||
}
|
||||
say $out "Added column 'reserves.deleted_biblionumber'";
|
||||
if ( !column_exists( 'old_reserves', 'deleted_biblionumber' ) ) {
|
||||
|
||||
$dbh->do(
|
||||
q{
|
||||
ALTER TABLE `old_reserves`
|
||||
ADD COLUMN `deleted_biblionumber` int(11) NULL DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)' AFTER biblionumber
|
||||
}
|
||||
);
|
||||
}
|
||||
say $out "Added column 'old_reserves.deleted_biblionumber'";
|
||||
},
|
||||
};
|
||||
|
|
@ -4916,6 +4916,7 @@ CREATE TABLE `old_reserves` (
|
|||
`borrowernumber` int(11) DEFAULT NULL COMMENT 'foreign key from the borrowers table defining which patron this hold is for',
|
||||
`reservedate` date DEFAULT NULL COMMENT 'the date the hold was places',
|
||||
`biblionumber` int(11) DEFAULT NULL COMMENT 'foreign key from the biblio table defining which bib record this hold is on',
|
||||
`deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)',
|
||||
`item_group_id` int(11) DEFAULT NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold',
|
||||
`branchcode` varchar(10) DEFAULT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at',
|
||||
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at',
|
||||
|
|
@ -5485,6 +5486,7 @@ CREATE TABLE `reserves` (
|
|||
`borrowernumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the borrowers table defining which patron this hold is for',
|
||||
`reservedate` date DEFAULT NULL COMMENT 'the date the hold was placed',
|
||||
`biblionumber` int(11) NOT NULL DEFAULT 0 COMMENT 'foreign key from the biblio table defining which bib record this hold is on',
|
||||
`deleted_biblionumber` int(11) DEFAULT NULL COMMENT 'links the reserve to the deleted bibliographic record (deletedbiblio.biblionumber)',
|
||||
`item_group_id` int(11) DEFAULT NULL COMMENT 'foreign key from the item_groups table defining if this is an item group level hold',
|
||||
`branchcode` varchar(10) NOT NULL COMMENT 'foreign key from the branches table defining which branch the patron wishes to pick this hold up at',
|
||||
`desk_id` int(11) DEFAULT NULL COMMENT 'foreign key from the desks table defining which desk the patron should pick this hold up at',
|
||||
|
|
|
|||
Loading…
Reference in New Issue