From 3ef1271f826d1f4dba3b5db10435aad881c0c3d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?S=C5=82awomir=20Paszkiewicz?= Date: Sat, 29 Jan 2011 19:14:09 +0000 Subject: [PATCH] - patch from upstream: http://cvs.lms.org.pl/viewvc/Development/lms/lib/upgradedb/mysql.2010122000.php?r1=1.1&r2=1.2 Changed files: lms-sqlqueryfix.patch -> 1.1 --- lms-sqlqueryfix.patch | 14 ++++++++++++++ 1 file changed, 14 insertions(+) create mode 100644 lms-sqlqueryfix.patch diff --git a/lms-sqlqueryfix.patch b/lms-sqlqueryfix.patch new file mode 100644 index 0000000..d47a5be --- /dev/null +++ b/lms-sqlqueryfix.patch @@ -0,0 +1,14 @@ +diff -ur lms/lib/upgradedb/mysql.2010122000.php lms.new//lib/upgradedb/mysql.2010122000.php +--- lms/lib/upgradedb/mysql.2010122000.php 2011-01-17 11:38:43.000000000 +0100 ++++ lms.new//lib/upgradedb/mysql.2010122000.php 2011-01-29 20:09:49.986391872 +0100 +@@ -38,8 +38,7 @@ + $DB->Execute("ALTER TABLE cashimport ADD sourcefileid integer DEFAULT NULL + REFERENCES sourcefiles (id) ON DELETE SET NULL ON UPDATE CASCADE"); + +-$DB->Execute("ALTER TABLE cashimport ALTER customerid DROP NOT NULL"); +-$DB->Execute("ALTER TABLE cashimport ALTER customerid SET DEFAULT NULL"); ++$DB->Execute("ALTER TABLE cashimport MODIFY customerid int(11) DEFAULT NULL"); + $DB->Execute("UPDATE cashimport SET customerid = NULL WHERE customerid NOT IN (SELECT id FROM customers)"); + $DB->Execute("ALTER TABLE cashimport ADD FOREIGN KEY (customerid) + REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE"); +Tylko w lms.new//lib/upgradedb: mysql.2010122000.php~ -- 2.43.0