ALTER TABLE AUTOFORNE ADD CDTPINDICEAF  VARCHAR2(1) 
	CONSTRAINT CKC_CDTPINDICEAF CHECK  (CDTPINDICEAF IN ('1','2')) 
/

ALTER TABLE AUTOFORNE ADD IDPERVALORAF  VARCHAR2(1) 
	CONSTRAINT CKC_IDPERVALORAF CHECK  (IDPERVALORAF IN ('1','2'))
/

ALTER TABLE AUTOFORNE ADD CDINDICEAF VARCHAR2(4)
/

ALTER TABLE AUTOFORNE ADD DTREFINDAF DATE
/ 

ALTER TABLE AUTOFORNE ADD 
	CONSTRAINT FKPLA01214MOVINDICE FOREIGN KEY (CDTPINDICEAF, IDPERVALORAF, CDINDICEAF, DTREFINDAF)
		REFERENCES MOVINDICE(CDTPINDICE, IDPERVALOR, CDINDICE, DTREFIND) 
/ 

CREATE INDEX PLA01214_FK ON AUTOFORNE(CDTPINDICEAF, IDPERVALORAF, CDINDICEAF, DTREFINDAF)
/

ALTER TABLE COLETAPR ADD CDTPINDICECOL  VARCHAR2(1) 
	CONSTRAINT CKC_CDTPINDICECOL CHECK  (CDTPINDICECOL IN ('1','2'))
/

ALTER TABLE COLETAPR ADD IDPERVALORCOL  VARCHAR2(1) 
	CONSTRAINT CKC_IDPERVALORCOL CHECK  (IDPERVALORCOL IN ('1','2'))
/

ALTER TABLE COLETAPR ADD CDINDICECOL  VARCHAR2(4) 
/

ALTER TABLE COLETAPR ADD DTREFINDCOL   DATE
/

ALTER TABLE COLETAPR ADD 
	CONSTRAINT FKPLA01215MOVINDICE FOREIGN KEY (CDTPINDICECOL, IDPERVALORCOL, CDINDICECOL, DTREFINDCOL)
		REFERENCES MOVINDICE(CDTPINDICE, IDPERVALOR, CDINDICE, DTREFIND)  
/

CREATE INDEX PLA01215_FK ON COLETAPR(CDTPINDICECOL, IDPERVALORCOL, CDINDICECOL, DTREFINDCOL)
/

ALTER TABLE ITMAPURPREC ADD CDTPINDICEAPU  VARCHAR2(1) 
	CONSTRAINT CKC_CDTPINDICEAPU CHECK  (CDTPINDICEAPU IN ('1','2'))
/

ALTER TABLE ITMAPURPREC ADD IDPERVALORAPU  VARCHAR2(1) 
	CONSTRAINT CKC_IDPERVALORAPU CHECK  (IDPERVALORAPU IN ('1','2'))
/

ALTER TABLE ITMAPURPREC ADD CDINDICEAPU  VARCHAR2(4)
/

ALTER TABLE ITMAPURPREC ADD DTREFINDAPU   DATE
/

ALTER TABLE ITMAPURPREC ADD 
	CONSTRAINT FKPLA01216MOVINDICE FOREIGN KEY (CDTPINDICEAPU, IDPERVALORAPU, CDINDICEAPU, DTREFINDAPU)
		REFERENCES MOVINDICE(CDTPINDICE, IDPERVALOR, CDINDICE, DTREFIND)  
/

CREATE INDEX PLA01216_FK ON ITMAPURPREC(CDTPINDICEAPU, IDPERVALORAPU, CDINDICEAPU, DTREFINDAPU)
/

ALTER TABLE PARASUPRI ADD IDUTINDICECOL VARCHAR2(1) DEFAULT 'N' NULL
   CONSTRAINT CKC_PARASUPRI_IDUTINDICECOL CHECK (IDUTINDICECOL IS NULL OR (IDUTINDICECOL IN ('S','N')))