Bugzilla – Attachment 147232 Details for
Bug 33053
Tables item_groups and recalls have a biblio_id column with a default of 0
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 33053: Remove default value for tables item_groups and recalls
Bug-33053-Remove-default-value-for-tables-itemgrou.patch (text/plain), 3.21 KB, created by
Kyle M Hall (khall)
on 2023-02-23 13:34:55 UTC
(
hide
)
Description:
Bug 33053: Remove default value for tables item_groups and recalls
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2023-02-23 13:34:55 UTC
Size:
3.21 KB
patch
obsolete
>From 81cb70d7deebcdc02a01c8677ca15b19d5978257 Mon Sep 17 00:00:00 2001 >From: Kyle Hall <kyle@bywatersolutions.com> >Date: Thu, 23 Feb 2023 08:31:46 -0500 >Subject: [PATCH] Bug 33053: Remove default value for tables item_groups and > recalls > >These default biblio_ids of 0 are harmless but incorrect. The default values should be removed. > >Test Plan: >1) Apply this patch >2) prove t/db_dependent/Koha/Biblio.t >3) prove t/db_dependent/Koha/Recalls.t >--- > installer/data/mysql/atomicupdate/bug_33053.pl | 16 ++++++++++++++++ > installer/data/mysql/kohastructure.sql | 4 ++-- > 2 files changed, 18 insertions(+), 2 deletions(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_33053.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_33053.pl b/installer/data/mysql/atomicupdate/bug_33053.pl >new file mode 100755 >index 0000000000..8a74194aaf >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_33053.pl >@@ -0,0 +1,16 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "33053", >+ description => "Remove default from biblio_id for item_groups and recalls tables", >+ up => sub { >+ my ($args) = @_; >+ my ($dbh, $out) = @$args{qw(dbh out)}; >+ $dbh->do(q{ >+ ALTER TABLE item_groups CHANGE COLUMN `biblio_id` `biblio_id` int(11) NOT NULL COMMENT 'id for the bibliographic record the group belongs to'` >+ }); >+ $dbh->do(q{ >+ ALTER TABLE recalls CHANGE COLUMN `biblio_id` `biblio_id` int(11) NOT NULL COMMENT 'Identifier for bibliographic record that has been recalled' >+ }); >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 03d6cbebc9..7bd1fb90da 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3561,7 +3561,7 @@ DROP TABLE IF EXISTS `item_groups`; > /*!40101 SET character_set_client = utf8 */; > CREATE TABLE `item_groups` ( > `item_group_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'id for the items group', >- `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'id for the bibliographic record the group belongs to', >+ `biblio_id` int(11) NOT NULL COMMENT 'id for the bibliographic record the group belongs to', > `display_order` int(4) NOT NULL DEFAULT 0 COMMENT 'The ''sort order'' for item_groups', > `description` mediumtext DEFAULT NULL COMMENT 'A group description', > `created_on` timestamp NULL DEFAULT NULL COMMENT 'Time and date the group was created', >@@ -4841,7 +4841,7 @@ CREATE TABLE `recalls` ( > `recall_id` int(11) NOT NULL AUTO_INCREMENT COMMENT 'Unique identifier for this recall', > `patron_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Identifier for patron who requested recall', > `created_date` datetime DEFAULT NULL COMMENT 'Date the recall was requested', >- `biblio_id` int(11) NOT NULL DEFAULT 0 COMMENT 'Identifier for bibliographic record that has been recalled', >+ `biblio_id` int(11) NOT NULL COMMENT 'Identifier for bibliographic record that has been recalled', > `pickup_library_id` varchar(10) DEFAULT NULL COMMENT 'Identifier for recall pickup library', > `completed_date` datetime DEFAULT NULL COMMENT 'Date the recall is completed (fulfilled, cancelled or expired)', > `notes` mediumtext DEFAULT NULL COMMENT 'Notes related to the recall', >-- >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 33053
:
147232
|
149075
|
150355
|
150356
|
151094