View | Details | Raw Unified | Return to bug 21066
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/bug_21066.perl (+9 lines)
Line 0 Link Here
1
$DBversion = 'XXX'; # will be replaced by the RM
2
if( CheckVersion( $DBversion ) ) {
3
    $dbh->do(q|
4
        ALTER TABLE opac_news
5
        CHANGE COLUMN timestamp publicationdate date DEFAULT NULL,
6
        ADD COLUMN updated_on timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
7
    |);
8
    NewVersion( $DBversion, 21066, "Update table opac_news");
9
}
(-)a/installer/data/mysql/kohastructure.sql (-2 / +2 lines)
Lines 1721-1727 CREATE TABLE `opac_news` ( -- data from the news tool Link Here
1721
  `title` varchar(250) NOT NULL default '', -- title of the news article
1721
  `title` varchar(250) NOT NULL default '', -- title of the news article
1722
  `content` MEDIUMTEXT NOT NULL, -- the body of your news article
1722
  `content` MEDIUMTEXT NOT NULL, -- the body of your news article
1723
  `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)
1723
  `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)
1724
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1724
  `publicationdate` date DEFAULT NULL, -- publication date
1725
  `updated_on` timestamp NOT NULL default CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, -- last modification
1725
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1726
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1726
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1727
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1727
  `borrowernumber` int(11) default NULL, -- The user who created the news article
1728
  `borrowernumber` int(11) default NULL, -- The user who created the news article
1728
- 

Return to bug 21066