Bugzilla – Attachment 50723 Details for
Bug 16354
Fix FK constraints for edifact_messages table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 16354 - TestBuilder.t fails due to key constraints
Bug-16354---TestBuildert-fails-due-to-key-constrai.patch (text/plain), 2.43 KB, created by
Kyle M Hall (khall)
on 2016-04-26 15:46:44 UTC
(
hide
)
Description:
Bug 16354 - TestBuilder.t fails due to key constraints
Filename:
MIME Type:
Creator:
Kyle M Hall (khall)
Created:
2016-04-26 15:46:44 UTC
Size:
2.43 KB
patch
obsolete
>From 3ffd9a4780f8ae329a243a9722e185896b7d10b7 Mon Sep 17 00:00:00 2001 >From: Kyle M Hall <kyle@bywatersolutions.com> >Date: Tue, 26 Apr 2016 15:45:38 +0000 >Subject: [PATCH] Bug 16354 - TestBuilder.t fails due to key constraints > >Test Plan: >1) prove t/db_dependent/TestBuilder.t >2) Note failure >3) Apply this patch >4) prove t/db_dependent/TestBuilder.t >5) Tests should now pass! >--- > installer/data/mysql/atomicupdate/bug_16354.sql | 9 +++++++++ > installer/data/mysql/kohastructure.sql | 6 +++--- > 2 files changed, 12 insertions(+), 3 deletions(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_16354.sql > >diff --git a/installer/data/mysql/atomicupdate/bug_16354.sql b/installer/data/mysql/atomicupdate/bug_16354.sql >new file mode 100644 >index 0000000..768bd1d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_16354.sql >@@ -0,0 +1,9 @@ >+ALTER TABLE edifact_messages >+ DROP FOREIGN KEY emfk_vendor, >+ DROP FOREIGN KEY emfk_edi_acct, >+ DROP FOREIGN KEY emfk_basketno; >+ >+ALTER TABLE edifact_messages >+ ADD CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ) ON DELETE CASCADE ON UPDATE CASCADE, >+ ADD CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ) ON DELETE CASCADE ON UPDATE CASCADE, >+ ADD CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) ON DELETE CASCADE ON UPDATE CASCADE; >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 242755d..0111c09 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -3223,9 +3223,9 @@ CREATE TABLE IF NOT EXISTS edifact_messages ( > KEY vendorid ( vendor_id), > KEY ediacct (edi_acct), > KEY basketno ( basketno), >- CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ), >- CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ), >- CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) >+ CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ) ON DELETE CASCADE ON UPDATE CASCADE, >+ CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- >-- >2.1.4
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 16354
:
50723
|
50735
|
50763