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

(-)a/installer/data/mysql/kohastructure.sql (-1 / +4 lines)
Lines 1642-1654 CREATE TABLE `old_reserves` ( -- this table holds all holds/reserves that have b Link Here
1642
DROP TABLE IF EXISTS `opac_news`;
1642
DROP TABLE IF EXISTS `opac_news`;
1643
CREATE TABLE `opac_news` ( -- data from the news tool
1643
CREATE TABLE `opac_news` ( -- data from the news tool
1644
  `idnew` int(10) unsigned NOT NULL auto_increment, -- unique identifier for the news article
1644
  `idnew` int(10) unsigned NOT NULL auto_increment, -- unique identifier for the news article
1645
  `branchcode` varchar(10) default NULL, -- branch code users to create branch specific news, NULL is every branch.
1645
  `title` varchar(250) NOT NULL default '', -- title of the news article
1646
  `title` varchar(250) NOT NULL default '', -- title of the news article
1646
  `new` text NOT NULL, -- the body of your news article
1647
  `new` text NOT NULL, -- the body of your news article
1647
  `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)
1648
  `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)
1648
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1649
  `timestamp` timestamp NOT NULL default CURRENT_TIMESTAMP, -- pulibcation date and time
1649
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1650
  `expirationdate` date default NULL, -- date the article is set to expire or no longer be visible
1650
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1651
  `number` int(11) default NULL, -- the order in which this article appears in that specific location
1651
  PRIMARY KEY  (`idnew`)
1652
  PRIMARY KEY  (`idnew`),
1653
  CONSTRAINT opac_news_branchcode_ibfk FOREIGN KEY (branchcode) REFERENCES branches (branchcode)
1654
    ON DELETE CASCADE ON UPDATE CASCADE
1652
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1655
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
1653
1656
1654
--
1657
--
(-)a/installer/data/mysql/updatedatabase.pl (-1 / +15 lines)
Lines 8083-8088 if ( CheckVersion($DBversion) ) { Link Here
8083
    SetVersion($DBversion);
8083
    SetVersion($DBversion);
8084
}
8084
}
8085
8085
8086
$DBversion = "3.15.00.XXX";
8087
if (CheckVersion($DBversion)) {
8088
    $dbh->do(q{
8089
        ALTER TABLE opac_news ADD branchcode varchar(10) DEFAULT NULL
8090
                                  AFTER idnew,
8091
                              ADD CONSTRAINT opac_news_branchcode_ibfk
8092
                                  FOREIGN KEY (branchcode)
8093
                                  REFERENCES branches (branchcode)
8094
                                  ON DELETE CASCADE ON UPDATE CASCADE;
8095
    });
8096
    print "Upgrade to $DBversion done (Bug 7567: Add branchcode to opac_news)\n";
8097
    SetVersion($DBversion);
8098
}
8099
8100
8086
=head1 FUNCTIONS
8101
=head1 FUNCTIONS
8087
8102
8088
=head2 TableExists($table)
8103
=head2 TableExists($table)
8089
- 

Return to bug 7567