ALTER TABLE PARAVEND ADD IDUTILESTCENT VARCHAR2(1) NULL
   CONSTRAINT CKC_IDUTILESTCENT_PARAVEND CHECK (IDUTILESTCENT IN ('S','N'))
/

ALTER TABLE PARAVEND ADD CDFILIESTCENT VARCHAR2(4) NULL
/

ALTER TABLE PARAVEND ADD CDALMOXESTCENT VARCHAR2(6) NULL
/

ALTER TABLE PARAVEND ADD CDLOCALESTCENT VARCHAR2(6) NULL
/

CREATE INDEX VND00883_FK ON PARAVEND (CDFILIESTCENT ASC)
/

ALTER TABLE PARAVEND
   ADD CONSTRAINT FKVND00883FILIAL FOREIGN KEY (CDFILIESTCENT)
      REFERENCES FILIAL (CDFILIAL)
/

CREATE INDEX VND00884_FK ON PARAVEND (CDFILIESTCENT ASC, CDALMOXESTCENT ASC)
/

ALTER TABLE PARAVEND
   ADD CONSTRAINT FKVND00884ALMOXARIFADO FOREIGN KEY (CDFILIESTCENT, CDALMOXESTCENT)
      REFERENCES ALMOXARIFADO (CDFILIAL, CDALMOXARIFE)
/

CREATE INDEX VND00885_FK ON PARAVEND (CDFILIESTCENT ASC, CDALMOXESTCENT ASC, CDLOCALESTCENT ASC)
/

ALTER TABLE PARAVEND
   ADD CONSTRAINT FKVND00885LOCALESTOQUE FOREIGN KEY (CDFILIESTCENT, CDALMOXESTCENT, CDLOCALESTCENT)
      REFERENCES LOCALESTOQUE (CDFILIAL, CDALMOXARIFE, CDLOCALESTOQ)
/
