1 diff -ur lms/lib/upgradedb/mysql.2010122000.php lms.new//lib/upgradedb/mysql.2010122000.php
2 --- lms/lib/upgradedb/mysql.2010122000.php 2011-01-17 11:38:43.000000000 +0100
3 +++ lms.new//lib/upgradedb/mysql.2010122000.php 2011-01-29 20:09:49.986391872 +0100
5 $DB->Execute("ALTER TABLE cashimport ADD sourcefileid integer DEFAULT NULL
6 REFERENCES sourcefiles (id) ON DELETE SET NULL ON UPDATE CASCADE");
8 -$DB->Execute("ALTER TABLE cashimport ALTER customerid DROP NOT NULL");
9 -$DB->Execute("ALTER TABLE cashimport ALTER customerid SET DEFAULT NULL");
10 +$DB->Execute("ALTER TABLE cashimport MODIFY customerid int(11) DEFAULT NULL");
11 $DB->Execute("UPDATE cashimport SET customerid = NULL WHERE customerid NOT IN (SELECT id FROM customers)");
12 $DB->Execute("ALTER TABLE cashimport ADD FOREIGN KEY (customerid)
13 REFERENCES customers (id) ON DELETE SET NULL ON UPDATE CASCADE");
14 Tylko w lms.new//lib/upgradedb: mysql.2010122000.php~