Bugzilla – Attachment 161179 Details for
Bug 35687
Upgrade to 23.06.00.013 may fail
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 35687 - Upgrade to 23.06.00.013 may fail
Bug-35687---Upgrade-to-230600013-may-fail.patch (text/plain), 2.00 KB, created by
Marcel de Rooy
on 2024-01-19 10:07:13 UTC
(
hide
)
Description:
Bug 35687 - Upgrade to 23.06.00.013 may fail
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2024-01-19 10:07:13 UTC
Size:
2.00 KB
patch
obsolete
>From 613004bd821fe9701c930a194a6aec4e8e23a30b Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Wed, 3 Jan 2024 14:07:49 +0000 >Subject: [PATCH] Bug 35687 - Upgrade to 23.06.00.013 may fail >Content-Type: text/plain; charset=utf-8 > >There are reports that this update triggers the error Cannot change column 'itemnumber': used in a foreign key constraint 'tmp_holdsqueue_ibfk_1' > >Test Plan: >1) Upgrade to post 23.06.00.013 >2) Note the failure >3) Apply this patch set >4) Run updatedatabase.pl >5) Update should succeed! > >Signed-off-by: Emily Lamancusa <emily.lamancusa@montgomerycountymd.gov> > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > .../data/mysql/atomicupdate/bug_35687.pl | 24 +++++++++++++++++++ > 1 file changed, 24 insertions(+) > create mode 100755 installer/data/mysql/atomicupdate/bug_35687.pl > >diff --git a/installer/data/mysql/atomicupdate/bug_35687.pl b/installer/data/mysql/atomicupdate/bug_35687.pl >new file mode 100755 >index 0000000000..68380c0bb3 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_35687.pl >@@ -0,0 +1,24 @@ >+use Modern::Perl; >+ >+return { >+ bug_number => "35687", >+ description => "Upgrade to 23.06.00.013 may fail, drop fk and recreate after adding the pk to tmp_holdsqueue", >+ up => sub { >+ my ($args) = @_; >+ my ( $dbh, $out ) = @$args{qw(dbh out)}; >+ >+ unless ( primary_key_exists( 'tmp_holdsqueue', 'itemnumber' ) ) { >+ $dbh->do(q{ALTER TABLE tmp_holdsqueue DROP CONSTRAINT `tmp_holdsqueue_ibfk_1`}); >+ $dbh->do(q{ALTER TABLE tmp_holdsqueue ADD PRIMARY KEY (itemnumber)}); >+ $dbh->do( >+ q{ >+ ALTER TABLE tmp_holdsqueue ADD CONSTRAINT `tmp_holdsqueue_ibfk_1` >+ FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) >+ ON DELETE CASCADE ON UPDATE CASCADE >+ } >+ ); >+ } >+ >+ say $out "Set primary key for table 'tmp_holdsqueue' to 'itemnumber'"; >+ }, >+}; >-- >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 35687
:
160461
|
160462
|
161141
|
161142
|
161179
|
161180
|
161221