BUGFIX for browser and nozebra tables

- adding browser and nozebra table definition to kohastructure & updatedatabase
- bumping to 3.00.00.005

Signed-off-by: Chris Cormack <crc@liblime.com>
This commit is contained in:
Paul POULAIN 2007-10-02 11:33:17 +02:00 committed by Chris Cormack
parent db5b97d364
commit 6f7efca7e1
4 changed files with 45 additions and 12 deletions

View File

@ -547,6 +547,19 @@ CREATE TABLE `branchtransfers` (
CONSTRAINT `branchtransfers_ibfk_3` FOREIGN KEY (`itemnumber`) REFERENCES `items` (`itemnumber`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `browser`
--
DROP TABLE IF EXISTS `browser`;
CREATE TABLE `browser` (
`level` int(11) NOT NULL,
`classification` varchar(20) NOT NULL,
`description` varchar(255) NOT NULL,
`number` bigint(20) NOT NULL,
`endnode` tinyint(4) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `categories`
--
@ -1077,6 +1090,18 @@ CREATE TABLE `notifys` (
`method` varchar(20) NOT NULL default ''
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `nozebra`
--
CREATE TABLE `nozebra` (
`server` varchar(20) NOT NULL,
`indexname` varchar(40) NOT NULL,
`value` varchar(250) NOT NULL,
`biblionumbers` longtext NOT NULL,
KEY `indexname` (`server`,`indexname`),
KEY `value` (`server`,`value`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
-- Table structure for table `opac_news`
--

View File

@ -121,10 +121,6 @@ if ($browser_tag) {
if (C4::Context->preference('opaclanguages') eq 'fr' && $browser_tag eq '676' & $browser_subfield eq 'a') {
$classification = dewey_french();
}
$classification = dewey_french();
# calculate end node...
#use Data::Dumper;
#warn "==>".Dumper(%browser_result);
foreach (keys %browser_result) {
my $father = substr($_,0,-1);
$browser_result{$father}->{notendnode}=1;

View File

@ -33,14 +33,6 @@ GetOptions(
$directory = "export" unless $directory;
my $dbh=C4::Context->dbh;
$dbh->do("update systempreferences set value=1 where variable='NoZebra'");
$dbh->do("CREATE TABLE `nozebra` (
`server` varchar(20) NOT NULL,
`indexname` varchar(40) NOT NULL,
`value` varchar(250) NOT NULL,
`biblionumbers` longtext NOT NULL,
KEY `indexname` (`server`,`indexname`),
KEY `value` (`server`,`value`))
ENGINE=InnoDB DEFAULT CHARSET=utf8");
$dbh->do("truncate nozebra");

View File

@ -2216,6 +2216,26 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
$DBversion = "3.00.00.005";
if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
$dbh->do("CREATE TABLE `tags` (
`entry` varchar(255) NOT NULL default '',
`weight` bigint(20) NOT NULL default 0,
PRIMARY KEY (`entry`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
");
$dbh->do("CREATE TABLE `nozebra` (
`server` varchar(20) NOT NULL,
`indexname` varchar(40) NOT NULL,
`value` varchar(250) NOT NULL,
`biblionumbers` longtext NOT NULL,
KEY `indexname` (`server`,`indexname`),
KEY `value` (`server`,`value`))
ENGINE=InnoDB DEFAULT CHARSET=utf8;
");
print "Upgrade to $DBversion done (adding tags and nozebra tables )\n";
SetVersion ($DBversion);
}
=item DropAllForeignKeys($table)