Bug 16122: Add localuse column to items and deleteditems

Signed-off-by: Christopher Brannon <cbrannon@cdalibrary.org>
Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Andrew Fuerste Henry <andrewfh@dubcolib.org>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Signed-off-by: Katrin Fischer <katrin.fischer@bsz-bw.de>
This commit is contained in:
Lucas Gass 2023-04-07 16:30:36 +00:00 committed by Katrin Fischer
parent da2d551847
commit d083206291
Signed by: kfischer
GPG key ID: 0EF6E2C03357A834
2 changed files with 33 additions and 0 deletions

View file

@ -0,0 +1,31 @@
use Modern::Perl;
return {
bug_number => "16122",
description => "Add localuse column to items table and deleted items table",
up => sub {
my ($args) = @_;
my ( $dbh, $out ) = @$args{qw(dbh out)};
if ( !column_exists( 'items', 'localuse' ) ) {
$dbh->do(
q{
ALTER TABLE items
ADD COLUMN localuse smallint(6) NULL DEFAULT NULL
COMMENT "item's local use count"
AFTER renewals
}
);
say $out "Added column 'items.localuse'";
}
if ( !column_exists( 'deleteditems', 'localuse' ) ) {
$dbh->do(
q{
ALTER TABLE deleteditems
ADD COLUMN localuse smallint(6) NULL DEFAULT NULL
COMMENT "deleteditems local use count"
AFTER renewals
}
);
say $out "Added column 'deleteditems.localuse'";
}
},
}

View file

@ -2759,6 +2759,7 @@ CREATE TABLE `deleteditems` (
`coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
`issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out',
`renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
`localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
`reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
`restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
`itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',
@ -4016,6 +4017,7 @@ CREATE TABLE `items` (
`coded_location_qualifier` varchar(10) DEFAULT NULL COMMENT 'coded location qualifier(MARC21 952$f)',
`issues` smallint(6) DEFAULT 0 COMMENT 'number of times this item has been checked out/issued',
`renewals` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been renewed',
`localuse` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been recorded as localuse',
`reserves` smallint(6) DEFAULT NULL COMMENT 'number of times this item has been placed on hold/reserved',
`restricted` tinyint(1) DEFAULT NULL COMMENT 'authorized value defining use restrictions for this item (MARC21 952$5)',
`itemnotes` longtext DEFAULT NULL COMMENT 'public notes on this item (MARC21 952$z)',