Bugzilla – Attachment 58137 Details for
Bug 17762
Ability to translate notices
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 17762: Remove FK on message_transports
Bug-17762-Remove-FK-on-messagetransports.patch (text/plain), 2.26 KB, created by
Jonathan Druart
on 2016-12-12 17:02:23 UTC
(
hide
)
Description:
Bug 17762: Remove FK on message_transports
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2016-12-12 17:02:23 UTC
Size:
2.26 KB
patch
obsolete
>From 95488f189aceb31173041410349b334ddea85977 Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Dec 2016 15:20:24 +0100 >Subject: [PATCH] Bug 17762: Remove FK on message_transports > >I don't really understand where does come from this foreign key but at first glance it does not make sense. > >Note that it seems we could also remove message_transports.branchcode > >Sponsored-by: Orex Digital >--- > installer/data/mysql/atomicupdate/bug_xxxxx.perl | 3 +++ > installer/data/mysql/kohastructure.sql | 1 - > 2 files changed, 3 insertions(+), 1 deletion(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_xxxxx.perl b/installer/data/mysql/atomicupdate/bug_xxxxx.perl >index 22583e9..43d3c26 100644 >--- a/installer/data/mysql/atomicupdate/bug_xxxxx.perl >+++ b/installer/data/mysql/atomicupdate/bug_xxxxx.perl >@@ -10,6 +10,9 @@ if( CheckVersion( $DBversion ) ) { > $dbh->do( "ALTER TABLE deletedborrowers ADD COLUMN lang VARCHAR(25) NOT NULL DEFAULT 'default' AFTER lastseen" ); > } > >+ # Add test on existene of this key >+ ALTER TABLE message_transports DROP FOREIGN KEY message_transports_ibfk_3; >+ > $dbh->do( "INSERT IGNORE INTO systempreferences (variable,value,options,explanation,type) > VALUES ('TranslateNotices', '0', NULL, 'Allow notices to be translated', 'YesNo') "); > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index a2878bc..6eccb53 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2579,7 +2579,6 @@ CREATE TABLE `message_transports` ( > KEY `letter_module` (`letter_module`,`letter_code`), > CONSTRAINT `message_transports_ibfk_1` FOREIGN KEY (`message_attribute_id`) REFERENCES `message_attributes` (`message_attribute_id`) ON DELETE CASCADE ON UPDATE CASCADE, > CONSTRAINT `message_transports_ibfk_2` FOREIGN KEY (`message_transport_type`) REFERENCES `message_transport_types` (`message_transport_type`) ON DELETE CASCADE ON UPDATE CASCADE, >- CONSTRAINT `message_transports_ibfk_3` FOREIGN KEY (`letter_module`, `letter_code`, `branchcode`) REFERENCES `letter` (`module`, `code`, `branchcode`) ON DELETE CASCADE ON UPDATE CASCADE > ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; > > -- >-- >2.9.3
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 17762
:
58133
|
58134
|
58135
|
58136
|
58137
|
58138
|
58139
|
58140
|
58141
|
58525
|
59452
|
59453
|
59454
|
59455
|
59456
|
59457
|
59458
|
59459
|
59460
|
59461
|
61614
|
61615
|
61616
|
61617
|
61618
|
61619
|
61620
|
61621
|
61622
|
61623
|
61624
|
63199
|
63200
|
63201
|
63202
|
63203
|
63204
|
63205
|
63206
|
63207
|
63208
|
63209
|
63210
|
63211