From 250a3fe0010f53d53aa25a28f5af03bceaaf6677 Mon Sep 17 00:00:00 2001 From: Zeno Tajoli Date: Tue, 27 Oct 2015 14:09:40 +0100 Subject: [PATCH 4/6] [BUG 7736] Follow-up: Fixed the definition of table edifact_ean --- installer/data/mysql/atomicupdate/edifact.sql | 7 ++++--- installer/data/mysql/kohastructure.sql | 5 +++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/installer/data/mysql/atomicupdate/edifact.sql b/installer/data/mysql/atomicupdate/edifact.sql index 0eb40ce..92adf6a 100755 --- a/installer/data/mysql/atomicupdate/edifact.sql +++ b/installer/data/mysql/atomicupdate/edifact.sql @@ -61,11 +61,12 @@ ALTER TABLE aqorders ADD COLUMN suppliers_reference_qualifier varchar(3); -- hold the EAN/SAN used in ordering CREATE TABLE IF NOT EXISTS edifact_ean ( - branchcode VARCHAR(10) NOT NULL REFERENCES branches (branchcode), + branchcode varchar(10) NOT NULL , ean varchar(15) NOT NULL, - id_code_qualifier VARCHAR(3) NOT NULL DEFAULT '14', + id_code_qualifier varchar(3) NOT NULL default '14', + KEY efk_branchcode ( branchcode ), CONSTRAINT efk_branchcode FOREIGN KEY ( branchcode ) REFERENCES branches ( branchcode ) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; +) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- Syspref budget to hold shipping costs INSERT INTO systempreferences (variable, explanation, type) VALUES('EDIInvoicesShippingBudget','The budget code used to allocate shipping charges to when processing EDI Invoice messages', 'free'); diff --git a/installer/data/mysql/kohastructure.sql b/installer/data/mysql/kohastructure.sql index 781a0c1..bc3703c 100644 --- a/installer/data/mysql/kohastructure.sql +++ b/installer/data/mysql/kohastructure.sql @@ -3596,10 +3596,11 @@ CREATE TABLE discharges ( -- DROP TABLE IF EXISTS edifact_ean; -CREATE TABLE IF NOT EXISTS edifact_ean ( - branchcode varchar(10) not null references branches (branchcode), +CREATE TABLE edifact_ean ( + branchcode varchar(10) NOT NULL , ean varchar(15) NOT NULL, id_code_qualifier varchar(3) NOT NULL default '14', + KEY efk_branchcode ( branchcode ), CONSTRAINT efk_branchcode FOREIGN KEY ( branchcode ) REFERENCES branches ( branchcode ) ) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci; -- 1.7.10.4