Bugzilla – Attachment 163019 Details for
Bug 32729
Deleting an item removes the itemnumber from old_issues when it probably should not
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 32729: Drop constraint to items.itemnumber from old_issues-table
Bug-32729-Drop-constraint-to-itemsitemnumber-from-.patch (text/plain), 2.06 KB, created by
Lari Strand
on 2024-03-11 10:11:09 UTC
(
hide
)
Description:
Bug 32729: Drop constraint to items.itemnumber from old_issues-table
Filename:
MIME Type:
Creator:
Lari Strand
Created:
2024-03-11 10:11:09 UTC
Size:
2.06 KB
patch
obsolete
>From 8dc5c206274af4afc43b6b5c0189c7a7738477c3 Mon Sep 17 00:00:00 2001 >From: lmstrand <lmstrand@gmail.com> >Date: Mon, 11 Mar 2024 12:05:06 +0200 >Subject: [PATCH] Bug 32729: Drop constraint to items.itemnumber from > old_issues-table > >--- > installer/data/mysql/atomicupdate/bug_32729.pl | 14 ++++++++++++++ > installer/data/mysql/kohastructure.sql | 1 - > 2 files changed, 14 insertions(+), 1 deletion(-) > create mode 100755 installer/data/mysql/atomicupdate/bug_32729.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_32729.pl b/installer/data/mysql/atomicupdate/bug_32729.pl >new file mode 100755 >index 0000000000..a681bd331e >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_32729.pl >@@ -0,0 +1,14 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "32729", >+ description => "Drop constraint to items.itemnumber from old_issues-table", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ $dbh->do(q{ALTER TABLE old_issues DROP CONSTRAINT IF EXISTS old_issues_ibfk_2;}); >+ >+ say $out "Dropped constraint old_issues_ibfk_2 from old_issues"; >+ }, >+}; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 16310f0f44..87a9fa49eb 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -4867,7 +4867,6 @@ CREATE TABLE `old_issues` ( > KEY `old_bordate` (`borrowernumber`,`timestamp`), > KEY `old_issues_ibfk_borrowers_borrowernumber` (`issuer_id`), > CONSTRAINT `old_issues_ibfk_1` FOREIGN KEY (`borrowernumber`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE SET NULL, >- CONSTRAINT `old_issues_ibfk_2` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE SET NULL ON UPDATE SET NULL, > CONSTRAINT `old_issues_ibfk_borrowers_borrowernumber` FOREIGN KEY (`issuer_id`) REFERENCES `borrowers` (`borrowernumber`) ON DELETE SET NULL ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci; > /*!40101 SET character_set_client = @saved_cs_client */; >-- >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 32729
:
163019
|
163939