Bugzilla – Attachment 158466 Details for
Bug 16122
Item record needs to keep local use count
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16122: Add localuse column to items and deleteditems
Bug-16122-Add-localuse-column-to-items-and-deleted.patch (text/plain), 3.57 KB, created by
Katrin Fischer
on 2023-11-05 13:01:22 UTC
(
hide
)
Description:
Bug 16122: Add localuse column to items and deleteditems
Filename:
MIME Type:
Creator:
Katrin Fischer
Created:
2023-11-05 13:01:22 UTC
Size:
3.57 KB
patch
obsolete
>From 46ab8924a55d0eaaef70fe14ca51c081e9cce28b Mon Sep 17 00:00:00 2001 >From: Lucas Gass <lucas@bywatersolutions.com> >Date: Fri, 7 Apr 2023 16:30:36 +0000 >Subject: [PATCH] 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> >--- > .../atomicupdate/bug_16122_atomicupdate.pl | 27 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 29 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_16122_atomicupdate.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_16122_atomicupdate.pl b/installer/data/mysql/atomicupdate/bug_16122_atomicupdate.pl >new file mode 100755 >index 0000000000..b423ae618d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16122_atomicupdate.pl >@@ -0,0 +1,27 @@ >+use Modern::Perl; >+return { >+ bug_number => "16122", >+ description => "Add localuser column to 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'"; >+ } >+ }, >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 652f3da727..aa7c64b5c2 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2756,6 +2756,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)', >@@ -3983,6 +3984,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)', >-- >2.30.2
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
|
Splinter Review
Attachments on
bug 16122
:
149281
|
149282
|
149283
|
149284
|
150231
|
150232
|
150233
|
150234
|
150235
|
150236
|
150623
|
150693
|
153193
|
153196
|
153197
|
153198
|
153199
|
153200
|
158466
|
158467
|
158468
|
158469
|
158470
|
158471
|
161001
|
161002
|
161003
|
161004
|
161005
|
161006
|
161144
|
161145
|
161146
|
161147
|
161148
|
161149
|
161150
|
161151
|
161153
|
161154
|
161155
|
161156
|
161157
|
161158
|
161159
|
161160
|
163072
|
163073
|
163074
|
163075
|
163076
|
163077
|
163243
|
163244
|
163245
|
163246
|
163247
|
163248
|
163296
|
163297
|
163298
|
163299
|
163300
|
163301
|
163302
|
163303
|
165313
|
165314
|
165315
|
165316
|
165317
|
165318
|
165319
|
165320