Bugzilla – Attachment 141599 Details for
Bug 31673
DB update of bug 31086 fails: Cannot change column 'branchcode': used in a foreign key constraint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31673: (QA follow-up) Check if FK exists before attempt to remove
Bug-31673-QA-follow-up-Check-if-FK-exists-before-a.patch (text/plain), 1.11 KB, created by
Tomás Cohen Arazi (tcohen)
on 2022-10-11 12:09:40 UTC
(
hide
)
Description:
Bug 31673: (QA follow-up) Check if FK exists before attempt to remove
Filename:
MIME Type:
Creator:
Tomás Cohen Arazi (tcohen)
Created:
2022-10-11 12:09:40 UTC
Size:
1.11 KB
patch
obsolete
>From 1c83bd06387a42554f89a21820297970d1377fb4 Mon Sep 17 00:00:00 2001 >From: Tomas Cohen Arazi <tomascohen@theke.io> >Date: Tue, 11 Oct 2022 09:08:56 -0300 >Subject: [PATCH] Bug 31673: (QA follow-up) Check if FK exists before attempt > to remove > >Signed-off-by: Tomas Cohen Arazi <tomascohen@theke.io> >--- > installer/data/mysql/db_revs/220600020.pl | 9 ++++++--- > 1 file changed, 6 insertions(+), 3 deletions(-) > >diff --git a/installer/data/mysql/db_revs/220600020.pl b/installer/data/mysql/db_revs/220600020.pl >index b0232044101..e8999a10de9 100755 >--- a/installer/data/mysql/db_revs/220600020.pl >+++ b/installer/data/mysql/db_revs/220600020.pl >@@ -32,9 +32,12 @@ return { > }); > > # Remove FOREIGN KEY CONSTRAINT >- $dbh->do(q{ >- ALTER TABLE reserves DROP FOREIGN KEY reserves_ibfk_4; >- }); >+ if ( foreign_key_exists( 'reserves', 'reserves_ibfk_4' ) ) { >+ $dbh->do(q{ >+ ALTER TABLE reserves DROP FOREIGN KEY reserves_ibfk_4; >+ }); >+ } >+ > # Set the NOT NULL configuration > $dbh->do(q{ > ALTER TABLE reserves >-- >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 31673
:
141336
|
141512
| 141599