--Order 20013062.60

CREATE SEQUENCE SEQ_GACUSTOMERPRODUCT
START WITH 1
INCREMENT BY 1;

CREATE TABLE GACUSTOMERPRODUCT
(
	GACUSTOMERPRODUCT_ID NUMBER NOT NULL ,
	CUSTOMER_ID          NUMBER NOT NULL ,
	PRODUCT_ID           NUMBER NOT NULL ,
	SIZEDEFINITION_ID    NUMBER NOT NULL ,
	FINISHINGMETHOD_ID   NUMBER NOT NULL ,
	PRODUCTCODE          VARCHAR2(12) NOT NULL ,
	PRODUCTCUSTOMDESC    VARCHAR2(30) NULL ,
	SIZECODE             VARCHAR2(12) NOT NULL ,
	FINMETHODCODE        VARCHAR2(6) NOT NULL ,
	TYPEOFMERCHANDISE    NUMBER NOT NULL ,
	SIZESEQUENCE         NUMBER NOT NULL ,
	CODEUNIQUELY         VARCHAR2(1) DEFAULT  'N'  NOT NULL  CONSTRAINT  YN_ValidationField227 CHECK (CODEUNIQUELY IN ('Y', 'N')),
	ONSITEINVENTORYCOUNT VARCHAR2(1) DEFAULT  'N'  NOT NULL  CONSTRAINT  YN_ValidationField228 CHECK (ONSITEINVENTORYCOUNT IN ('Y', 'N'))
);

ALTER TABLE GACUSTOMERPRODUCT
ADD CONSTRAINT  XPKGACUSTOMERPRODUCT PRIMARY KEY (GACUSTOMERPRODUCT_ID);

CREATE UNIQUE INDEX XAK1GACUSTOMERPRODUCT ON GACUSTOMERPRODUCT
(CUSTOMER_ID   ASC,PRODUCT_ID   ASC,SIZEDEFINITION_ID   ASC,FINISHINGMETHOD_ID   ASC);

