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