Bugzilla – Attachment 8489 Details for
Bug 7793
redefine the field message_id as PRIMARY KEY of message_queue
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
proposed patch
0001-Bug-7793-redefine-the-field-message_id-as-PRIMARY-KE.patch (text/plain), 1.63 KB, created by
Stéphane Delaune
on 2012-03-22 10:44:05 UTC
(
hide
)
Description:
proposed patch
Filename:
MIME Type:
Creator:
Stéphane Delaune
Created:
2012-03-22 10:44:05 UTC
Size:
1.63 KB
patch
obsolete
>From 565ecd59fc202ba018d659c6573de477ef388ea4 Mon Sep 17 00:00:00 2001 >From: =?UTF-8?q?St=C3=A9phane=20Delaune?= <stephane.delaune@biblibre.com> >Date: Thu, 22 Mar 2012 11:43:24 +0100 >Subject: [PATCH] Bug 7793:redefine the field message_id as PRIMARY KEY of > message_queue > >--- > installer/data/mysql/kohastructure.sql | 1 + > installer/data/mysql/updatedatabase.pl | 7 +++++++ > 2 files changed, 8 insertions(+), 0 deletions(-) > >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f5d8a24..dfc38d5 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2308,6 +2308,7 @@ CREATE TABLE `message_queue` ( > `to_address` mediumtext, > `from_address` mediumtext, > `content_type` text, >+ PRIMARY KEY (`message_id`), > KEY `message_id` (`message_id`), > KEY `borrowernumber` (`borrowernumber`), > KEY `message_transport_type` (`message_transport_type`), >diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl >index 32099d8..145d09e 100755 >--- a/installer/data/mysql/updatedatabase.pl >+++ b/installer/data/mysql/updatedatabase.pl >@@ -4994,6 +4994,13 @@ if ( C4::Context->preference("Version") lt TransformToNum($DBversion) ) { > SetVersion($DBversion); > } > >+$DBversion = "XXX"; >+if (C4::Context->preference("Version") < TransformToNum($DBversion)) { >+ $dbh->do("ALTER TABLE message_queue ADD PRIMARY KEY (message_id);"); >+ print "Upgrade to $DBversion done (redefine the field message_id as PRIMARY KEY of message_queue)\n"; >+ SetVersion ($DBversion); >+} >+ > =head1 FUNCTIONS > > =head2 DropAllForeignKeys($table) >-- >1.7.5.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 7793
:
8489
|
11743
|
36145
|
36945
|
36987
|
37027
|
37028
|
39143
|
39525
|
39526
|
40172
|
40173