Fix for typo, leftover index on 046 updatedb commit.
Signed-off-by: Chris Cormack <crc@liblime.com> Signed-off-by: Joshua Ferraro <jmf@liblime.com>
This commit is contained in:
parent
ffd3a01119
commit
17897d254a
2 changed files with 2 additions and 3 deletions
|
@ -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`)
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue