Bugzilla – Attachment 98419 Details for
Bug 23673
Separate time sent from time created in message_queue table
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 23673: change db structure
Bug-23673-change-db-structure.patch (text/plain), 2.08 KB, created by
ByWater Sandboxes
on 2020-02-05 01:14:41 UTC
(
hide
)
Description:
Bug 23673: change db structure
Filename:
MIME Type:
Creator:
ByWater Sandboxes
Created:
2020-02-05 01:14:41 UTC
Size:
2.08 KB
patch
obsolete
>From 4888968cb214e26161003397ea67161fd60fa4ca Mon Sep 17 00:00:00 2001 >From: Agustin Moyano <agustinmoyano@theke.io> >Date: Mon, 21 Oct 2019 17:29:44 -0300 >Subject: [PATCH] Bug 23673: change db structure > >Signed-off-by: Kelly McElligott <kelly@bywatersolutions.com> > >Signed-off-by: Andrew Fuerste-Henry <andrew@bywatersolutions.com> >--- > installer/data/mysql/atomicupdate/bug-23673.perl | 12 ++++++++++++ > installer/data/mysql/kohastructure.sql | 3 ++- > 2 files changed, 14 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug-23673.perl > >diff --git a/installer/data/mysql/atomicupdate/bug-23673.perl b/installer/data/mysql/atomicupdate/bug-23673.perl >new file mode 100644 >index 0000000000..64c52ef5d9 >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug-23673.perl >@@ -0,0 +1,12 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ >+ $dbh->do("ALTER TABLE message_queue MODIFY time_queued timestamp NULL"); >+ >+ if( !column_exists( 'message_queue', 'updated_on' ) ) { >+ $dbh->do("ALTER TABLE message_queue ADD COLUMN updated_on timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP AFTER time_queued"); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23673 - modify time_queued and add updated_on to message_queue)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index f29a3c3b86..a82a20830b 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2387,7 +2387,8 @@ CREATE TABLE `message_queue` ( > `letter_code` varchar(64) DEFAULT NULL, > `message_transport_type` varchar(20) NOT NULL, > `status` enum('sent','pending','failed','deleted') NOT NULL default 'pending', >- `time_queued` timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP, >+ `time_queued` timestamp NULL, >+ `updated_on` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, > `to_address` LONGTEXT, > `from_address` LONGTEXT, > `content_type` MEDIUMTEXT, >-- >2.11.0
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 23673
:
94503
|
94504
|
94954
|
96232
|
96346
|
96347
|
96391
|
96392
|
96451
|
96452
|
96643
|
98090
|
98091
|
98419
|
98420
|
98431
|
98432
|
98433
|
98434
|
98435