ALTER TABLE DEPLOY ADD (
  PARENT NUMBER(10) DEFAULT NULL NULL, 
  IS_CUSTOMER_DEPLOY VARCHAR2(1) DEFAULT 'N' NOT NULL
)
/
ALTER TABLE DEPLOY ADD CONSTRAINT DEPLOY_DEPLOY_FK FOREIGN KEY (PARENT) REFERENCES DEPLOY (ID)
/
ALTER TABLE DEPLOY ADD CONSTRAINT CKC_DEPLOY_IS_CUSTOMER_DEPLOY CHECK (IS_CUSTOMER_DEPLOY in ('Y', 'N'))
/
ALTER TABLE PRODUCT ADD (
  VERSION_CHECK_TYPE VARCHAR2(1) DEFAULT 'S' NULL, 
  URL_WEBSERVICE VARCHAR2(500) DEFAULT NULL NULL, 
  MAIN_PACKAGE_ID NUMBER(10) DEFAULT NULL NULL
)
/
ALTER TABLE PRODUCT ADD CONSTRAINT PRODUCT_PACKAGE_FK FOREIGN KEY (MAIN_PACKAGE_ID) REFERENCES PACKAGE (ID)
/
ALTER TABLE PRODUCT ADD CONSTRAINT CKC_PRODUCT_VERSION_CHECK_TYPE CHECK (VERSION_CHECK_TYPE in ('W', 'S', 'J'))
/
