update for missing subscriptions.lastbranch col in serials
authorMason James <mtj@liblime.com>
Sun, 28 Oct 2007 23:15:53 +0000 (18:15 -0500)
committerJoshua Ferraro <jmf@liblime.com>
Mon, 29 Oct 2007 21:06:04 +0000 (16:06 -0500)
Signed-off-by: Chris Cormack <crc@liblime.com>
Signed-off-by: Joshua Ferraro <jmf@liblime.com>
installer/kohastructure.sql
updater/updatedatabase

index 5def7d7..7bf96fe 100644 (file)
@@ -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;
 
index 00f138d..f8f7c59 100755 (executable)
@@ -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