Bugzilla – Attachment 163087 Details for
Bug 36101
Deleting an item removes the itemnumber from old_reserves when it should not
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 36101: Drop constraint to items.itemnumber from old_reserves-table
Bug-36101-Drop-constraint-to-itemsitemnumber-from-.patch (text/plain), 2.25 KB, created by
Lari Strand
on 2024-03-12 09:55:35 UTC
(
hide
)
Description:
Bug 36101: Drop constraint to items.itemnumber from old_reserves-table
Filename:
MIME Type:
Creator:
Lari Strand
Created:
2024-03-12 09:55:35 UTC
Size:
2.25 KB
patch
obsolete
>From 5b4940b45db698775a38627ceb519e8b4973c66f Mon Sep 17 00:00:00 2001 >From: lmstrand <lmstrand@gmail.com> >Date: Tue, 12 Mar 2024 11:49:30 +0200 >Subject: [PATCH] Bug 36101: Drop constraint to items.itemnumber from > old_reserves-table > >--- > installer/data/mysql/atomicupdate/bug_36101.pl | 15 +++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 - > 2 files changed, 15 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_36101.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_36101.pl b/installer/data/mysql/atomicupdate/bug_36101.pl >new file mode 100644 >index 0000000000..50478a45e7 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_36101.pl >@@ -0,0 +1,15 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "36101", >+ description => "Drop constraint to items.itemnumber from old_reserves-table", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ALTER TABLE old_reserves DROP CONSTRAINT IF EXISTS old_reserves_ibfk_3;}); >+ >+ say $out "Dropped constraint old_reserves_ibfk_3 from old_reserves"; >+ >+ }, >+}; >\ No newline at end of file >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 16310f0f44..95b90d1115 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4914,7 +4914,6 @@ CREATE TABLE `old_reserves` ( > KEY `old_reserves_ibfk_ig` (`item_group_id`), > CONSTRAINT `old_reserves_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_2` FOREIGN KEY (`biblionumber`) REFERENCES `biblio` (`biblionumber`) ON DELETE SET NULL ON UPDATE SET NULL, >- CONSTRAINT `old_reserves_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_4` FOREIGN KEY (`itemtype`) REFERENCES `itemtypes` (`itemtype`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_reserves_ibfk_ig` FOREIGN KEY (`item_group_id`) REFERENCES `item_groups` (`item_group_id`) ON DELETE SET NULL ON UPDATE SET NULL > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; >-- >2.34.1
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 36101
:
163087
|
163119
|
163120