Bugzilla – Attachment 163072 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.73 KB, created by
Lucas Gass (lukeg)
on 2024-03-11 23:37:34 UTC
(
hide
)
Description:
Bug 16122: Add localuse column to items and deleteditems
Filename:
MIME Type:
Creator:
Lucas Gass (lukeg)
Created:
2024-03-11 23:37:34 UTC
Size:
3.73 KB
patch
obsolete
>From a9f60341cabee1d5083066f69804d91f190f21ca 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> >Signed-off-by: Andrew Fuerste-Henry <andrewfh@dubcolib.org> >--- > .../atomicupdate/bug_16122_atomicupdate.pl | 31 +++++++++++++++++++ > installer/data/mysql/kohastructure.sql | 2 ++ > 2 files changed, 33 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..4d63b2a0fa >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16122_atomicupdate.pl >@@ -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'"; >+ } >+ }, >+ } >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 16310f0f44..0906c5be16 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -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)', >-- >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