[Koha-patches] [PATCH] bug 2044: adding database change for itemtype icon change
Andrew Moore
andrew.moore at liblime.com
Thu Apr 24 18:34:26 CEST 2008
This is the database update change to take into account the rearrangement of the
itemtype icons directory.
---
installer/data/mysql/updatedatabase.pl | 18 ++++++++++++++++--
kohaversion.pl | 2 +-
2 files changed, 17 insertions(+), 3 deletions(-)
diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index dd18d70..03f55e8 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -49,7 +49,9 @@ my $dbh = C4::Context->dbh;
$|=1; # flushes output
=item
+
Deal with virtualshelves
+
=cut
my $DBversion = "3.00.00.001";
@@ -1378,10 +1380,20 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
SetVersion ($DBversion);
}
+$DBversion = "3.00.00.074";
+if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
+ $dbh->do( q(update itemtypes set imageurl = concat( 'npl/', imageurl )
+ where imageurl not like 'http%'
+ and imageurl is not NULL
+ and imageurl != '') );
+ print "Upgrade to $DBversion done (updating imagetype.imageurls to reflect new icon locations.)\n";
+ SetVersion ($DBversion);
+}
+
=item DropAllForeignKeys($table)
Drop all foreign keys of the table $table
-
+
=cut
sub DropAllForeignKeys {
@@ -1410,7 +1422,7 @@ sub DropAllForeignKeys {
Transform the Koha version from a 4 parts string
to a number, with just 1 .
-
+
=cut
sub TransformToNum {
@@ -1421,7 +1433,9 @@ sub TransformToNum {
}
=item SetVersion
+
set the DBversion in the systempreferences
+
=cut
sub SetVersion {
diff --git a/kohaversion.pl b/kohaversion.pl
index 3e1346a..be48725 100644
--- a/kohaversion.pl
+++ b/kohaversion.pl
@@ -10,7 +10,7 @@
use strict;
sub kohaversion {
- our $VERSION = "3.00.00.073";
+ our $VERSION = "3.00.00.074";
# version needs to be set this way
# so that it can be picked up by Makefile.PL
# during install
--
1.5.2.1
More information about the Koha-patches
mailing list