From 53a1186d555740c4d948dfe8aa7451c24d9ce2d6 Mon Sep 17 00:00:00 2001 From: Ryan Higgins Date: Sun, 11 Nov 2007 16:39:28 -0600 Subject: [PATCH] updatedatabase for itype. Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- kohaversion.pl | 2 +- updater/updatedatabase | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/kohaversion.pl b/kohaversion.pl index 0be8d124d0..abda80caec 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -8,7 +8,7 @@ # and is automatically called by Auth.pm when needed. sub kohaversion { - return "3.00.00.024"; + return "3.00.00.025"; } 1; diff --git a/updater/updatedatabase b/updater/updatedatabase index 2ca1b0860c..ad2e97a78f 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -576,6 +576,16 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.025"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE items ADD COLUMN itype VARCHAR(10)"); + if(C4::Context->preference('item-level_itypes')){ + $dbh->do('update items,biblioitems set items.itype=biblioitems.itemtype where items.biblionumber=biblioitems.biblionumber and itype is null'); + } + print "Upgrade to $DBversion done (reintroduce items.itype - fill from itemtype)\n "; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) -- 2.39.5