From d738f321f6f5d7b853f1a1b327ae38af1bfb178a Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 8 Nov 2007 13:00:26 -0600 Subject: [PATCH] BUMP to 022 : items.damaged added It was declared in kohastructure, but forgotten in updater. libraries upgrading from 2.2 will have problem... Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- updater/updatedatabase | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/updater/updatedatabase b/updater/updatedatabase index 193874e50f..8c54bb0551 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -545,11 +545,19 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { $DBversion = "3.00.00.021"; if (C4::Context->preference("Version") < TransformToNum($DBversion)) { - $dbh->do("ALTER TABLE items CHANGE homebranch homebranch VARCHAR(10)"); - $dbh->do("ALTER TABLE deleteditems CHANGE homebranch homebranch VARCHAR(10)"); - $dbh->do("ALTER TABLE statistics CHANGE branch branch VARCHAR(10)"); - $dbh->do("ALTER TABLE subscription CHANGE lastbranch lastbranch VARCHAR(10)"); + $dbh->do("ALTER TABLE items CHANGE homebranch homebranch VARCHAR(10)"); + $dbh->do("ALTER TABLE deleteditems CHANGE homebranch homebranch VARCHAR(10)"); + $dbh->do("ALTER TABLE statistics CHANGE branch branch VARCHAR(10)"); + $dbh->do("ALTER TABLE subscription CHANGE lastbranch lastbranch VARCHAR(10)"); print "Upgrade to $DBversion done (extended missed branchcode columns to 10 chars)\n"; + SetVersion ($DBversion); +} + +$DBversion = "3.00.00.022"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE items + ADD `damaged` tinyint(1) default NULL"); + print "Upgrade to $DBversion done (adding damaged column to items table)\n"; SetVersion ($DBversion); } @@ -558,6 +566,8 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { +======= +>>>>>>> BUMP to 021 : items.damaged added:updater/updatedatabase =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 2.39.5