--ABS-108930
ALTER TABLE EDI_I_PURCHASEORDERCONF ADD (EXTERNALPONUMBER VARCHAR2(30));
COMMENT ON COLUMN EDI_I_PURCHASEORDERCONF.POIMPORTFORMAT
  is '1 = ABS standard PO confirmation
2 = Mulliez PO confirmation
3 = Alsico PO confirmation';
ALTER TABLE EDI_I_PURCHASEORDERCONF
  DROP CONSTRAINT CHK_EDI_I_PURCHASEORDERCONF_PO;
ALTER TABLE EDI_I_PURCHASEORDERCONF
  ADD CONSTRAINT CHK_EDI_I_PURCHASEORDERCONF_PO
  CHECK (POIMPORTFORMAT IN (1,2,3));

CREATE TABLE EDI_I_PURCHASEORDERCONFLINE_ALS
(
  TRANSFER_ID           NUMBER NOT NULL,
  PURCHASEORDERLINE_ID  NUMBER NOT NULL,
  DETAILLINENUMBER      NUMBER DEFAULT 1 NOT NULL,
  CONFIRMATIONSEQNUMBER NUMBER DEFAULT 1 NOT NULL,
  CONFIRMEDDELIVERYDATE DATE NOT NULL
);
ALTER TABLE EDI_I_PURCHASEORDERCONFLINE_ALS
  ADD CONSTRAINT PK_EDI_I_PURCHASEORDERCONFL_ALS PRIMARY KEY (TRANSFER_ID,PURCHASEORDERLINE_ID,DETAILLINENUMBER,CONFIRMATIONSEQNUMBER);
ALTER TABLE EDI_I_PURCHASEORDERCONFLINE_ALS
  ADD CONSTRAINT FK_EDI_I_PURCHASEORDERCONFL_ALS FOREIGN KEY (TRANSFER_ID)
  REFERENCES EDI_I_PURCHASEORDERCONF (TRANSFER_ID) ON DELETE CASCADE;
