Bugzilla – Attachment 141723 Details for
Bug 31716
Enlarge the size of the authorised_value column in authorised_values
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 31716: Prevent issues with foreign key
Bug-31716-Prevent-issues-with-foreign-key.patch (text/plain), 1.62 KB, created by
Nick Clemens (kidclamp)
on 2022-10-12 11:22:53 UTC
(
hide
)
Description:
Bug 31716: Prevent issues with foreign key
Filename:
MIME Type:
Creator:
Nick Clemens (kidclamp)
Created:
2022-10-12 11:22:53 UTC
Size:
1.62 KB
patch
obsolete
>From 1bdf1d28a7b17dd4903d0cd6184e557dda302cf6 Mon Sep 17 00:00:00 2001 >From: Nick Clemens <nick@bywatersolutions.com> >Date: Wed, 12 Oct 2022 11:17:09 +0000 >Subject: [PATCH] Bug 31716: Prevent issues with foreign key > >VARCHAR is now allowed to be 65535 bytes max, as opposed to 255 - when testing this, >however, I received errors about latering a column with a foreign key. Adding this to the update >to avoid problems like bug 31673. >--- > .../data/mysql/atomicupdate/bug_31716_enlarge_av_column.pl | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_31716_enlarge_av_column.pl b/installer/data/mysql/atomicupdate/bug_31716_enlarge_av_column.pl >index 3e00083bb1..191bc94e3a 100755 >--- a/installer/data/mysql/atomicupdate/bug_31716_enlarge_av_column.pl >+++ b/installer/data/mysql/atomicupdate/bug_31716_enlarge_av_column.pl >@@ -7,10 +7,15 @@ return { > my ($args) = @_; > my ($dbh, $out) = @$args{qw(dbh out)}; > # Do you stuffs here >+ $dbh->do(q{ >+ ALTER TABLE illrequests DROP FOREIGN KEY illrequests_safk; >+ }); > $dbh->do(q{ > ALTER TABLE authorised_values MODIFY COLUMN authorised_value varchar(255) COLLATE utf8mb4_unicode_ci NOT NULL DEFAULT '' COMMENT 'code use to identify the authorized value'; > }); >- # Print useful stuff here >+ $dbh->do(q{ >+ ALTER TABLE illrequests ADD CONSTRAINT `illrequests_safk` FOREIGN KEY (`status_alias`) REFERENCES `authorised_values` (`authorised_value`) ON DELETE SET NULL ON UPDATE CASCADE >+ }); > say $out "Column enlarged"; > }, > }; >-- >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 31716
:
141520
|
141521
|
141722
|
141723
|
141724
|
141904
|
141905
|
141906