From afea22105e59fe3d5ee486d536b0d05991bd9179 Mon Sep 17 00:00:00 2001 From: Liz Rea Date: Wed, 27 Apr 2016 14:19:24 +1200 Subject: [PATCH] Bug 16361 - syntax error in updatedatabase To test: Set version below 3.23.00.051 (if necessary - you can do this in the localuse preferences in the intranet) Run the updatedatabase in your favourite way There should be no errors. --- installer/data/mysql/updatedatabase.pl | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/updatedatabase.pl b/installer/data/mysql/updatedatabase.pl index 1f1c5a0..cd8df2b 100755 --- a/installer/data/mysql/updatedatabase.pl +++ b/installer/data/mysql/updatedatabase.pl @@ -12345,21 +12345,22 @@ print "Upgrade to $DBversion done (Bug 12478 - Elasticsearch support for Koha)\n $DBversion = "3.23.00.051"; if ( CheckVersion($DBversion) ) { -$dbh->do(q{ + $dbh->do(q{ ALTER TABLE edifact_messages DROP FOREIGN KEY emfk_vendor, DROP FOREIGN KEY emfk_edi_acct, DROP FOREIGN KEY emfk_basketno; - + }); + $dbh->do(q{ ALTER TABLE edifact_messages ADD CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ) ON DELETE CASCADE ON UPDATE CASCADE, ADD CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno ) ON DELETE CASCADE ON UPDATE CASCADE; }); -print "Upgrade to $DBversion done (Bug 16354 - Fix FK constraints for edifact_messages table)\n"; - SetVersion($DBversion); - } + print "Upgrade to $DBversion done (Bug 16354 - Fix FK constraints for edifact_messages table)\n"; + SetVersion($DBversion); +} # DEVELOPER PROCESS, search for anything to execute in the db_update directory -- 1.9.1