From 17897d254ab4147812494a7be2bd8d34b9e9c74e Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Tue, 8 Jan 2008 20:08:41 -0600 Subject: [PATCH] Fix for typo, leftover index on 046 updatedb commit. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- installer/data/mysql/kohastructure.sql | 2 +- installer/data/mysql/updatedatabase.pl | 3 +-- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 569414ba35..b56d8bba00 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -1886,7 +1886,7 @@ CREATE TABLE language_script_mapping ( ) ENGINE=InnoDB DEFAULT CHARSET=utf8; DROP TABLE IF EXISTS serialitems; -CREATE TABLE serialitem ( +CREATE TABLE serialitems ( serialid int(11) NOT NULL, itemnumber int(11) NOT NULL, UNIQUE KEY `serialididx` (`serialid`) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 47a1ce3fd1..6a4d3acde3 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -934,10 +934,9 @@ $DBversion = "3.00.00.046"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $dbh->do("ALTER TABLE `subscription` CHANGE `numberlength` `numberlength` int(11) default NULL , CHANGE `weeklength` `weeklength` int(11) default NULL"); - $dbh->do("ALTER TABLE `serial` ADD UNIQUE KEY `serialitemidx` (`serialitem`)"); $dbh->do("CREATE TABLE `serialitems` (`serialid` int(11) NOT NULL, `itemnumber` int(11) NOT NULL, UNIQUE KEY (`serialid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8"); $dbh->do("INSERT INTO `serialitems` SELECT `serialid`,`itemnumber` from serial where NOT ISNULL(itemnumber) && itemnumber <> '' && itemnumber NOT LIKE '%,%'"); - print "Upgrade to $DBversion done (Update serial table, add index on itemnumber. )\n"; + print "Upgrade to $DBversion done (Add serialitems table to link serial issues to items. )\n"; SetVersion ($DBversion); } -- 2.39.5