`branchprinter` varchar(100) default NULL, -- unused in Koha
`branchnotes` mediumtext, -- notes related to your library or branch
opac_info text, -- HTML that displays in OPAC
- UNIQUE KEY `branchcode` (`branchcode`)
+ PRIMARY KEY (`branchcode`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
--
SetVersion($DBversion);
}
-
-
$DBversion = "3.09.00.006";
if ( C4::Context->preference("Version") < TransformToNum($DBversion) ) {
$dbh->do("UPDATE systempreferences SET
$dbh->do("ALTER TABLE sessions ADD PRIMARY KEY (id);");
$dbh->do("ALTER TABLE sessions DROP INDEX `id`;");
print "Upgrade to $DBversion done (redefine the field id as PRIMARY KEY of sessions)\n";
+ SetVersion($DBversion);
+}
+
+$DBversion = "3.09.00.009";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do("ALTER TABLE branches ADD PRIMARY KEY (branchcode);");
+ $dbh->do("ALTER TABLE branches DROP INDEX branchcode;");
+ print "Upgrade to $DBversion done (redefine the field branchcode as PRIMARY KEY of branches)\n";
SetVersion ($DBversion);
}