Bugzilla – Attachment 61618 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: Add lang to the PK of letter
Bug-17762-Add-lang-to-the-PK-of-letter.patch (text/plain), 2.31 KB, created by
Jonathan Druart
on 2017-03-24 16:30:42 UTC
(
hide
)
Description:
Bug 17762: Add lang to the PK of letter
Filename:
MIME Type:
Creator:
Jonathan Druart
Created:
2017-03-24 16:30:42 UTC
Size:
2.31 KB
patch
obsolete
>From 571fc7a11bdb6487a5a01298e44649a385ef6e3a Mon Sep 17 00:00:00 2001 >From: Jonathan Druart <jonathan.druart@bugs.koha-community.org> >Date: Thu, 8 Dec 2016 15:24:11 +0100 >Subject: [PATCH] Bug 17762: Add lang to the PK of letter > >We need to enlarge the PK of the letter table. > >Sponsored-by: Orex Digital > >Signed-off-by: Hugo Agud <hagud@orex.es> >--- > installer/data/mysql/atomicupdate/bug_xxxxx.perl | 4 +++- > installer/data/mysql/kohastructure.sql | 2 +- > 2 files changed, 4 insertions(+), 2 deletions(-) > >diff --git a/installer/data/mysql/atomicupdate/bug_xxxxx.perl b/installer/data/mysql/atomicupdate/bug_xxxxx.perl >index 43d3c26..65dfbe6 100644 >--- a/installer/data/mysql/atomicupdate/bug_xxxxx.perl >+++ b/installer/data/mysql/atomicupdate/bug_xxxxx.perl >@@ -11,7 +11,9 @@ if( CheckVersion( $DBversion ) ) { > } > > # Add test on existene of this key >- ALTER TABLE message_transports DROP FOREIGN KEY message_transports_ibfk_3; >+ $dbh->do( "ALTER TABLE message_transports DROP FOREIGN KEY message_transports_ibfk_3 "); >+ $dbh->do( "ALTER TABLE letter DROP PRIMARY KEY "); >+ $dbh->do( "ALTER TABLE letter ADD PRIMARY KEY (`module`, `code`, `branchcode`, `message_transport_type`, `lang`) "); > > $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 fcec380..2fbe40a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2533,7 +2533,7 @@ CREATE TABLE `letter` ( -- table for all notice templates in Koha > `content` text, -- body text for the notice or slip > `message_transport_type` varchar(20) NOT NULL DEFAULT 'email', -- transport type for this notice > `lang` varchar(25) NOT NULL DEFAULT 'default', -- lang of the notice >- PRIMARY KEY (`module`,`code`, `branchcode`, `message_transport_type`), >+ PRIMARY KEY (`module`,`code`, `branchcode`, `message_transport_type`, `lang`), > CONSTRAINT `message_transport_type_fk` FOREIGN KEY (`message_transport_type`) > REFERENCES `message_transport_types` (`message_transport_type`) 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