From 284beffc62a825b91a35bbbc8dbd8db9bfd23e56 Mon Sep 17 00:00:00 2001 From: Paul POULAIN Date: Thu, 16 Aug 2007 12:46:13 +0200 Subject: [PATCH] changing Session table structure (due to CGI::Sessions) 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 --- kohaversion.pl | 2 +- updater/updatedatabase | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) diff --git a/kohaversion.pl b/kohaversion.pl index 569f65a6a1..163c1f57f4 100644 --- a/kohaversion.pl +++ b/kohaversion.pl @@ -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; diff --git a/updater/updatedatabase b/updater/updatedatabase index 1bbe33f3e8..e67e37ac95 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -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) -- 2.11.0