From 4778fc3f1fc0a6f43c0de93ebe27af1ea0b4987e Mon Sep 17 00:00:00 2001 From: Mason James Date: Sun, 28 Oct 2007 18:15:53 -0500 Subject: [PATCH] update for missing subscriptions.lastbranch col in serials Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- installer/kohastructure.sql | 1 + updater/updatedatabase | 8 ++++++++ 2 files changed, 9 insertions(+) diff --git a/installer/kohastructure.sql b/installer/kohastructure.sql index 5def7d7936..7bf96feb5a 100644 --- a/installer/kohastructure.sql +++ b/installer/kohastructure.sql @@ -1511,6 +1511,7 @@ CREATE TABLE `subscription` ( `callnumber` text, `branchcode` varchar(10) NOT NULL default '', `hemisphere` tinyint(3) default 0, + `lastbranch` varchar(4), PRIMARY KEY (`subscriptionid`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; diff --git a/updater/updatedatabase b/updater/updatedatabase index 00f138dd2a..f8f7c59fd4 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -425,6 +425,14 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { ) ENGINE=InnoDB DEFAULT CHARSET=utf8"); SetVersion ($DBversion); } + +$DBversion = "3.00.00.014"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("ALTER TABLE subscription ADD lastbranch VARCHAR(4)"); + print "Upgrade to $DBversion done (userid index added)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) Drop all foreign keys of the table $table -- 2.39.5