From: Mason James Date: Sun, 28 Oct 2007 23:15:53 +0000 (-0500) Subject: update for missing subscriptions.lastbranch col in serials X-Git-Tag: v3.00.00-alpha~1291 X-Git-Url: http://koha-dev.rot13.org:8081/gitweb/?a=commitdiff_plain;h=4778fc3f1fc0a6f43c0de93ebe27af1ea0b4987e;p=koha_fer update for missing subscriptions.lastbranch col in serials Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- 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