changing Session table structure (due to CGI::Sessions)
authorPaul POULAIN <paul@koha-fr.org>
Thu, 16 Aug 2007 10:46:13 +0000 (12:46 +0200)
committerChris Cormack <crc@liblime.com>
Thu, 16 Aug 2007 11:59:17 +0000 (06:59 -0500)
I switch to 3.00.00.002, that's another test to check that everything is fine with the new kohaversion management.
Work like a charm...

Signed-off-by: Chris Cormack <crc@liblime.com>
kohaversion.pl
updater/updatedatabase

index 569f65a..163c1f5 100644 (file)
@@ -8,7 +8,7 @@
 #        and is automatically called by Auth.pm when needed.
 
 sub kohaversion {
-    return "3.00.00.001";
+    return "3.00.00.002";
 }
 
 1;
index 1bbe33f..e67e37a 100755 (executable)
@@ -2124,6 +2124,21 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     SetVersion ($DBversion);
 }
 
+=item
+    Deal with the sessions table that uses CGI::Session
+=cut
+
+$DBversion = "3.00.00.002";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+    $dbh->do("DROP TABLE sessions");
+    $dbh->do("CREATE TABLE `sessions` (
+  `id` char(32) NOT NULL,
+  `a_session` text NOT NULL,
+  UNIQUE KEY `id` (`id`)
+) ENGINE=InnoDB DEFAULT CHARSET=utf8;");
+    print "Upgrade to $DBversion done (sessions uses CGI::session, new table structure for sessions)\n";
+    SetVersion ($DBversion);
+}
 
 
 =item DropAllForeignKeys($table)