[Koha-patches] [PATCH 1/2] avoid error message since messages table does not exist yet

Galen Charlton gmcharlt at gmail.com
Wed Sep 16 04:25:33 CEST 2009


Signed-off-by: Galen Charlton <gmcharlt at gmail.com>
---
 installer/data/mysql/updatedatabase.pl |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl
index cc72e8f..9987b16 100755
--- a/installer/data/mysql/updatedatabase.pl
+++ b/installer/data/mysql/updatedatabase.pl
@@ -2654,7 +2654,7 @@ if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
 $DBversion = '3.01.00.060';
 if (C4::Context->preference("Version") < TransformToNum($DBversion)) {
     $dbh->do("INSERT INTO systempreferences (variable,value,explanation,options,type) VALUES('AllowAllMessageDeletion','0','Allow any Library to delete any message','','YesNo');");
-    $dbh->do('DROP TABLE messages');
+    $dbh->do('DROP TABLE IF EXISTS messages');
     $dbh->do("CREATE TABLE messages ( `message_id` int(11) NOT NULL auto_increment,
         `borrowernumber` int(11) NOT NULL,
         `branchcode` varchar(4) default NULL,
-- 
1.6.3.3



More information about the Koha-patches mailing list