View | Details | Raw Unified | Return to bug 7736
Collapse All | Expand All

(-)a/installer/data/mysql/atomicupdate/edifact.sql (-4 / +3 lines)
Lines 23-29 CREATE TABLE IF NOT EXISTS vendor_edi_accounts ( Link Here
23
  KEY shipmentbudget (shipment_budget),
23
  KEY shipmentbudget (shipment_budget),
24
  CONSTRAINT vfk_vendor_id FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ),
24
  CONSTRAINT vfk_vendor_id FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ),
25
  CONSTRAINT vfk_shipment_budget FOREIGN KEY ( shipment_budget ) REFERENCES aqbudgets ( budget_id )
25
  CONSTRAINT vfk_shipment_budget FOREIGN KEY ( shipment_budget ) REFERENCES aqbudgets ( budget_id )
26
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
26
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
27
27
28
-- Hold the actual edifact messages with links to associated baskets
28
-- Hold the actual edifact messages with links to associated baskets
29
CREATE TABLE IF NOT EXISTS edifact_messages (
29
CREATE TABLE IF NOT EXISTS edifact_messages (
Lines 44-50 CREATE TABLE IF NOT EXISTS edifact_messages ( Link Here
44
  CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ),
44
  CONSTRAINT emfk_vendor FOREIGN KEY ( vendor_id ) REFERENCES aqbooksellers ( id ),
45
  CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ),
45
  CONSTRAINT emfk_edi_acct FOREIGN KEY ( edi_acct ) REFERENCES vendor_edi_accounts ( id ),
46
  CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno )
46
  CONSTRAINT emfk_basketno FOREIGN KEY ( basketno ) REFERENCES aqbasket ( basketno )
47
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
47
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
48
48
49
-- invoices link back to the edifact message it was generated from
49
-- invoices link back to the edifact message it was generated from
50
ALTER TABLE aqinvoices ADD COLUMN message_id INT(11) REFERENCES edifact_messages( id );
50
ALTER TABLE aqinvoices ADD COLUMN message_id INT(11) REFERENCES edifact_messages( id );
Lines 69-75 CREATE TABLE IF NOT EXISTS edifact_ean ( Link Here
69
  ean varchar(15) NOT NULL,
69
  ean varchar(15) NOT NULL,
70
  id_code_qualifier VARCHAR(3) NOT NULL DEFAULT '14',
70
  id_code_qualifier VARCHAR(3) NOT NULL DEFAULT '14',
71
  CONSTRAINT efk_branchcode FOREIGN KEY ( branchcode ) REFERENCES branches ( branchcode )
71
  CONSTRAINT efk_branchcode FOREIGN KEY ( branchcode ) REFERENCES branches ( branchcode )
72
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
72
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
73
73
74
-- Syspref budget to hold shipping costs
74
-- Syspref budget to hold shipping costs
75
INSERT INTO systempreferences (variable, explanation, type) VALUES('EDIInvoicesShippingBudget','The budget code used to allocate shipping charges to when processing EDI Invoice messages',  'free');
75
INSERT INTO systempreferences (variable, explanation, type) VALUES('EDIInvoicesShippingBudget','The budget code used to allocate shipping charges to when processing EDI Invoice messages',  'free');
76
- 

Return to bug 7736