Bugzilla – Attachment 94503 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), 1.93 KB, created by
Agustín Moyano
on 2019-10-21 23:29:09 UTC
(
hide
)
Description:
Bug 23673: change db structure
Filename:
MIME Type:
Creator:
Agustín Moyano
Created:
2019-10-21 23:29:09 UTC
Size:
1.93 KB
patch
obsolete
>From f73fb9f046c0909eb9ef805101234c6d3909d893 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 > >--- > 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..bcdf1fa95e >--- /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 NOT NULL default CURRENT_TIMESTAMP"); >+ >+ if( !column_exists( 'message_queue', 'time_sent' ) ) { >+ $dbh->do("ALTER TABLE message_queue ADD COLUMN time_status_changed timestamp NULL AFTER time_queued"); >+ } >+ >+ SetVersion( $DBversion ); >+ print "Upgrade to $DBversion done (Bug 23673 - modify time_queued and add time_status_changed to message_queue)\n"; >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index 7073c9a2d1..5e0ee65c0a 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -2426,7 +2426,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 NOT NULL default CURRENT_TIMESTAMP, >+ `time_status_changed` timestamp NULL, > `to_address` LONGTEXT, > `from_address` LONGTEXT, > `content_type` MEDIUMTEXT, >-- >2.17.1
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