--Order 20015066.270

---PURCHASEORDERHEADER table---

ALTER TABLE PURCHASEORDERHEADER
	ADD (POSPLITADDITIONALINFO NUMBER  DEFAULT 0 NOT NULL);

CREATE INDEX XIE4PURCHASEORDERHEADER ON PURCHASEORDERHEADER
(POSPLITADDITIONALINFO   ASC);

---PRODUCTSIZE table---

ALTER TABLE PRODUCTSIZE
	ADD (EXECUTEDBY NUMBER  DEFAULT 0 NOT NULL CONSTRAINT EXECUTEDBY_Valid1_6 CHECK (EXECUTEDBY BETWEEN 0 AND 2));

COMMENT ON COLUMN PRODUCTSIZE.EXECUTEDBY IS 'Identifies if a product size will be taken from stock when needed or always has to be ordered as make-to-order. Possible values:
0 = Inherited from SizeDefinition
1 = Internal
2 = External 
';


---PURCHASEORDERLINE table---

ALTER TABLE PURCHASEORDERLINE
	ADD (LINESEQUENTIALNUMBER NUMBER  DEFAULT 0 NOT NULL);

COMMENT ON COLUMN PURCHASEORDERLINE.LINESEQUENTIALNUMBER IS '0 is no numbering, otherwise it determines the link and sequence';