Bugzilla – Attachment 135779 Details for
Bug 30899
Upgrade sometimes fails at "Upgrade to 21.11.05.004"
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 30899: [MASTER 22.12] Correct dbrev 211200041
Bug-30899-MASTER-2212-Correct-dbrev-211200041.patch (text/plain), 2.10 KB, created by
Marcel de Rooy
on 2022-06-07 14:25:57 UTC
(
hide
)
Description:
Bug 30899: [MASTER 22.12] Correct dbrev 211200041
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2022-06-07 14:25:57 UTC
Size:
2.10 KB
patch
obsolete
>From bc864b46cf3d25bedc60f11cffb64198c306d935 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 7 Jun 2022 14:11:23 +0000 >Subject: [PATCH] Bug 30899: [MASTER 22.12] Correct dbrev 211200041 >Content-Type: text/plain; charset=utf-8 > >Replace DROP CONSTRAINT by DROP FOREIGN KEY. > >Note: It seems that we do not need a new dbrev for master. A developer >could follow test plan below to correct if really needed. > >Test plan: > >NOTE: When you check show create table, verify that you see an index for category_code and a foreign key called borrower_attribute_types_ibfk_1. > >[1] cp installer/data/mysql/db_revs/211200041.pl installer/data/mysql/atomicupdate/ >[2] run updatedatabase; check show create table >[3] alter table borrower_attribute_types drop foreign key borrower_attribute_types_ibfk_1; alter table borrower_attribute_types drop index category_code; RUN updatedatabase again; check show create table >[4] alter table borrower_attribute_types drop foreign key borrower_attribute_types_ibfk_1; ALTER TABLE borrower_attribute_types ADD CONSTRAINT category_code_fk FOREIGN KEY (category_code) REFERENCES categories(categorycode); RUN updatedatabase again; check show create table >[5] rm installer/data/atomicupdate/211200041.pl >--- > installer/data/mysql/db_revs/211200041.pl | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > >diff --git a/installer/data/mysql/db_revs/211200041.pl b/installer/data/mysql/db_revs/211200041.pl >index b9c2f73eb5..eb0431b180 100755 >--- a/installer/data/mysql/db_revs/211200041.pl >+++ b/installer/data/mysql/db_revs/211200041.pl >@@ -8,7 +8,7 @@ return { > my ($dbh, $out) = @$args{qw(dbh out)}; > > if( foreign_key_exists('borrower_attribute_types', 'category_code_fk') ) { >- $dbh->do( q|ALTER TABLE borrower_attribute_types DROP CONSTRAINT category_code_fk| ); >+ $dbh->do( q|ALTER TABLE borrower_attribute_types DROP FOREIGN KEY category_code_fk| ); > if( index_exists('borrower_attribute_types', 'category_code_fk') ) { > $dbh->do( q|ALTER TABLE borrower_attribute_types DROP INDEX category_code_fk| ); > } >-- >2.20.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 30899
:
135779
|
135780
|
135783
|
135790