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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +4 lines)
Lines 1639-1651 CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b Link Here
1639
DROP TABLE IF EXISTS `opac_news`;
1639
DROP TABLE IF EXISTS `opac_news`;
1640
CREATE TABLE `opac_news` ( -- data from the news tool
1640
CREATE TABLE `opac_news` ( -- data from the news tool
1641
  `idnew` int(10) unsigned NOT NULL auto_increment, -- unique identifier for the news article
1641
  `idnew` int(10) unsigned NOT NULL auto_increment, -- unique identifier for the news article
1642
  `branchcode` varchar(10) default NULL, -- branch code users to create branch specific news, NULL is every branch.
1642
  `title` varchar(250) NOT NULL default '', -- title of the news article
1643
  `title` varchar(250) NOT NULL default '', -- title of the news article
1643
  `new` text NOT NULL, -- the body of your news article
1644
  `new` text NOT NULL, -- the body of your news article
1644
  `lang` varchar(25) NOT NULL default '', -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac)
1645
  `lang` varchar(25) NOT NULL default '', -- location for the article (koha is the staff client, slip is the circulation receipt and language codes are for the opac)
1645
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1646
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1646
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1647
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1647
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1648
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1648
  PRIMARY KEY  (`idnew`)
1649
  PRIMARY KEY  (`idnew`),
1650
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1651
    ON DELETE CASCADE ON UPDATE CASCADE
1649
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1652
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1650
1653
1651
--
1654
--
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +15 lines)
Lines 7843-7848 if(CheckVersion($DBversion)) { Link Here
7843
    SetVersion($DBversion);
7843
    SetVersion($DBversion);
7844
}
7844
}
7845
7845
7846
$DBversion = "3.15.00.XXX";
7847
if (CheckVersion($DBversion)) {
7848
    $dbh->do(q{
7849
        ALTER TABLE opac_news ADD branchcode varchar(10) DEFAULT NULL
7850
                                  AFTER idnew,
7851
                              ADD CONSTRAINT opac_news_branchcode_ibfk
7852
                                  FOREIGN KEY (branchcode)
7853
                                  REFERENCES branches (branchcode)
7854
                                  ON DELETE CASCADE ON UPDATE CASCADE;
7855
    });
7856
    print "Upgrade to $DBversion done (Bug 7567: Add branchcode to opac_news)\n";
7857
    SetVersion($DBversion);
7858
}
7859
7860
7846
=head1 FUNCTIONS
7861
=head1 FUNCTIONS
7847
7862
7848
=head2 TableExists($table)
7863
=head2 TableExists($table)
7849
- 

Return to bug 7567