Bugzilla – Attachment 107769 Details for
Bug 21066
Replace opac_news.timestamp by published_on and add updated_on as timestamp
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
Bug 21066: Database revision
Bug-21066-Database-revision.patch (text/plain), 2.41 KB, created by
Marcel de Rooy
on 2020-08-04 14:27:53 UTC
(
hide
)
Description:
Bug 21066: Database revision
Filename:
MIME Type:
Creator:
Marcel de Rooy
Created:
2020-08-04 14:27:53 UTC
Size:
2.41 KB
patch
obsolete
>From 1a2cc98a22ee92ded711540693685afbe8b28b37 Mon Sep 17 00:00:00 2001 >From: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >Date: Tue, 17 Jul 2018 15:47:57 +0200 >Subject: [PATCH] Bug 21066: Database revision >Content-Type: text/plain; charset=utf-8 > >Change timestamp to publicationdate, add updated_on as 'real' timestamp. > >Test plan: >Run install or upgrade. Check table opac_news. > >Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl> >--- > installer/data/mysql/atomicupdate/bug_21066.perl | 9 +++++++++ > installer/data/mysql/kohastructure.sql | 3 ++- > 2 files changed, 11 insertions(+), 1 deletion(-) > create mode 100644 installer/data/mysql/atomicupdate/bug_21066.perl > >diff --git a/installer/data/mysql/atomicupdate/bug_21066.perl b/installer/data/mysql/atomicupdate/bug_21066.perl >new file mode 100644 >index 0000000000..3a9780f78d >--- /dev/null >+++ b/installer/data/mysql/atomicupdate/bug_21066.perl >@@ -0,0 +1,9 @@ >+$DBversion = 'XXX'; # will be replaced by the RM >+if( CheckVersion( $DBversion ) ) { >+ $dbh->do(q| >+ ALTER TABLE opac_news >+ CHANGE COLUMN timestamp publicationdate date DEFAULT NULL, >+ ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP >+ |); >+ NewVersion( $DBversion, 21066, "Update table opac_news"); >+} >diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql >index cc7c133653..441fee321d 100644 >--- a/installer/data/mysql/kohastructure.sql >+++ b/installer/data/mysql/kohastructure.sql >@@ -1721,7 +1721,8 @@ CREATE TABLE `opac_news` ( -- data from the news tool > `title` varchar(250) NOT NULL default '', -- title of the news article > `content` MEDIUMTEXT NOT NULL, -- the body of your news article > `lang` varchar(50) NOT NULL default '', -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac) >- `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time >+ `publicationdate` date DEFAULT NULL, -- publication date >+ `updated_on` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification > `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible > `number` int(11) default NULL, -- the order in which this article appears in that specific location > `borrowernumber` int(11) default NULL, -- The user who created the news article >-- >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 21066
:
77037
|
77038
|
77039
|
107769
|
107770
|
107771
|
107772
|
107773
|
107774
|
107775
|
107776
|
109148
|
109149
|
109150
|
109151
|
109152
|
109153
|
109154
|
109192
|
109193
|
109194
|
109195
|
109196
|
109197
|
109198
|
109199
|
109354
|
109514
|
109515