From 336ce43e8581cf634daccad9c7cb8bdc7363846d Mon Sep 17 00:00:00 2001 From: paul Date: Fri, 5 Oct 2007 02:50:03 -0500 Subject: [PATCH] bump to 3.00.00.006 : issues.issuedate auto fill added on update In Koha 2.2 there was no field to store the issue date. There was only a timestamp which is modified every time you do something on the line. it's fixed in 3.0, but the new issuedate field is empty for 2.2 catalogue migrated to 3.0 This fills the issue date with a value that is probably wrong, but we can't know the correct one. at least we have something and the stats works (Date::Calc is very unhappy if the field is empty) Signed-off-by: Chris Cormack Signed-off-by: Joshua Ferraro --- kohaversion.pl | 2 +- updater/updatedatabase | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/kohaversion.pl b/kohaversion.pl index c48a6e7f29..940416dbb3 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.004"; + return "3.00.00.006"; } 1; diff --git a/updater/updatedatabase b/updater/updatedatabase index aa7ecd8c90..34e02e82c8 100755 --- a/updater/updatedatabase +++ b/updater/updatedatabase @@ -2237,6 +2237,13 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) { SetVersion ($DBversion); } +$DBversion = "3.00.00.006"; +if (C4::Context->preference("Version") < TransformToNum($DBversion)) { + $dbh->do("UPDATE issues SET issuedate=timestamp WHERE issuedate='0000-00-00'"); + print "Upgrade to $DBversion done (filled issues.issuedate with timestamp)\n"; + SetVersion ($DBversion); +} + =item DropAllForeignKeys($table) -- 2.39.5