ALTER TABLE QUESTAO ADD IDLAYOUTRESPOSTA VARCHAR2(30) NULL
/
ALTER TABLE SERVICO ADD DSSERVICO VARCHAR2(250) NULL
/
ALTER TABLE SERVICO ADD DSLOGOSERVICO VARCHAR2(30) NULL
/
ALTER TABLE PRATPADR ADD DSPRATO VARCHAR2(250) NULL
/
ALTER TABLE PRATFILI ADD DSPRATO VARCHAR2(250) NULL
/
ALTER TABLE PRATSERV ADD DSPRATO VARCHAR2(250) NULL
/
ALTER TABLE PRATTPCARD ADD DSPRATO VARCHAR2(250) NULL
/
CREATE INDEX PLA01162_FK ON PRODDISTPROD (NRDISTPROD)
/
ALTER TABLE PRODDISTPROD ADD
    CONSTRAINT FKPLA01162DISTPROD FOREIGN KEY (NRDISTPROD)
    REFERENCES DISTPROD (NRDISTPROD)
/
ALTER TABLE LANCROPFILIAL DROP CONSTRAINT CKC_IDTPLANCROP_LANCROPFILIAL
/
ALTER TABLE LANCROPFILIAL ADD
	CONSTRAINT CKC_IDTPLANCROP_LANCROPFILIAL CHECK (IDTPLANCROP IN ('FS','FE','CC','CS','DE','DD','DM','CD','II','IF','IM','ES','AJ','RE','RP','CP','RA',
							'PP','CM','PV','PQ','FF','C1','C2', 'I1','I2','IP','A1','R1','R2','SG','S1','S2','RT','SS','SC','FN','M1',
							'CO', 'EP','FD', 'IV', 'DC', 'DB', 'MR','BP','VN','TX'))
/
ALTER TABLE DESPESASROP DROP CONSTRAINT CKC_IDTPLANCROP_DESPESASROP
/
ALTER TABLE DESPESASROP ADD CONSTRAINT CKC_IDTPLANCROP_DESPESASROP
	CHECK (IDTPLANCROP IS NULL OR (IDTPLANCROP IN ('DESPESA', 'MAOOBRA', 'DEPRECIACAO', 'AJUSTECT', 'TAXAADM')))
/
INSERT INTO INDICADORTF (NRINDICADORTF, DSINDICADOR, NRPAINEL)
     VALUES (16, 'Acompanhamento de Efetivos', 22)
/
INSERT INTO INDICADORTF (NRINDICADORTF, DSINDICADOR, NRPAINEL)
     VALUES (17, 'Comparativo de Custo', 22)
/
INSERT INTO INDICADORTF (NRINDICADORTF, DSINDICADOR, NRPAINEL)
     VALUES (18, 'Análise de Custo - Acumulado até', 1)
/
COMMIT 