6094 Fixing ModAuthority problems
authorMarcel de Rooy <m.de.rooy@rijksmuseum.nl>
Mon, 25 Jul 2011 09:33:23 +0000 (11:33 +0200)
committerChris Cormack <chrisc@catalyst.net.nz>
Wed, 19 Oct 2011 22:31:00 +0000 (11:31 +1300)
Only contains db revision to insert new table need_merge_authorities.
You can apply the revision by running
cgi-bin/koha/installer/install.pl?step=3&op=updatestructure. (Will not change
your version while testing.)

Oct 19, 2011: Rebased after functionality patch signoff.

Signed-off-by: Frédéric Demians <f.demians@tamil.fr>
Signed-off-by: Chris Cormack <chrisc@catalyst.net.nz>
installer/data/mysql/kohastructure.sql
installer/data/mysql/updatedatabase.pl

index c119ca1..e4388a4 100644 (file)
@@ -1310,6 +1310,17 @@ CREATE TABLE `matchchecks` (
   REFERENCES `matchpoints` (`matchpoint_id`) ON DELETE CASCADE ON UPDATE CASCADE
 ) ENGINE=InnoDB DEFAULT CHARSET=utf8;
 
+--
+-- Table structure for table `need_merge_authorities`
+--
+
+DROP TABLE IF EXISTS `need_merge_authorities`;
+CREATE TABLE `need_merge_authorities` (
+  `id` int NOT NULL auto_increment PRIMARY KEY,
+  `authid` bigint NOT NULL,
+  `done` tinyint DEFAULT 0
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;
+
 --
 -- Table structure for table `notifys`
 --
index 4a95b9a..52c2a80 100755 (executable)
@@ -4530,6 +4530,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion($DBversion);
 }
 
+$DBversion = "3.05.00.XXX"; 
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("CREATE TABLE need_merge_authorities (id int NOT NULL auto_increment PRIMARY KEY, authid bigint NOT NULL, done tinyint DEFAULT 0) ENGINE=InnoDB DEFAULT CHARSET=utf8");
+    print "Upgrade to $DBversion done (6094: Fixing ModAuthority problems, add a need_merge_authorities table)\n";
+    SetVersion($DBversion);
+}
+
 =head1 FUNCTIONS
 
 =head2 DropAllForeignKeys($table)