ALTER TABLE PARAMAN ADD IDCONSQTPRODTAR VARCHAR2(01) DEFAULT 'N'     NOT NULL
        	CONSTRAINT CKC_IDCONSQTPRODTAR_PARAMAN CHECK (IDCONSQTPRODTAR IN ('S','N'))
/
ALTER TABLE AUTGRUPOP DROP CONSTRAINT CKC_IDAUTGRUPOP
/ 

ALTER TABLE AUTGRUPOP ADD CONSTRAINT CKC_IDAUTGRUPOP CHECK (  
   IDAUTGRUPOP IN ('PCMP','PROD','INAC','ALAC','ENAC','VIAC','INDF','STAR','VALI', 
                   'CONT','VPLA','VPLT','VERI','QUAL','VLIB','CINS','CANA','LLOT', 
                   'FINC','TARE','IRET','RCUS','MABD','BLPR','CARD','REIP','ENAF', 
                   'CAAF','ABAF','APRC','PLPR','CFEC','APBC','REBC','BSOL','BKGA', 
                   'ARRV','SFOS','LBPS','APCO','EFCO','CACO','ALCO','LCMR','LRCD', 
                   'EXBR','EXBP','PROP','APAF','GEAF','RECC','EXCP','EMAP','ACSA', 
                   'AAPR','ACRM','COIM','ACTF','ACPS','PSUP','MTRA','PAOC','INCT', 
                   'CMIS','CENA','GECO','ESVN','GEST','GGER','GAUD','CRMP','CRMR', 
                   'CDGE','ALAT','ACET','ATPR','CLOT','ADSO','APSG','BLOL','AUDP', 
                   'CPRC','SVOL','PROC','DELI','METC','CONF','LOGS','LOGC','PEOL', 
                   'EXAF','SBTP','ACEP','DPAP','ATLC','PEME','PRVE','PRVC','EEEA',
                   'BLIP','TPED','ALTC','ALTP','ALEE','ALEP','AUPA','ALAF','IINP', 
                   'LIRB','ALOP', 'CQTD'))
/
ALTER TABLE INSPETAPA ADD QTPADRAOTAR FLOAT
/

ALTER TABLE INSPETAPA ADD VRTORQTPADTAR FLOAT
/
ALTER TABLE RECURETAPAOP ADD QTPRODTAR FLOAT
/
ALTER TABLE INSPECAUDIT ADD QTPADRAOTAR FLOAT
/

ALTER TABLE INSPECAUDIT ADD QTPADRAOMAX FLOAT
/

ALTER TABLE INSPECAUDIT ADD QTPADRAOMIN FLOAT
/

ALTER TABLE INSPECAUDIT ADD QTPRODTAR FLOAT
/

ALTER TABLE INSPECAUDIT ADD CDJUSTCONCTAR VARCHAR2(05)
/

CREATE INDEX MAN02284_FK ON INSPECAUDIT (CDJUSTCONCTAR ASC)
/

ALTER TABLE INSPECAUDIT
    ADD CONSTRAINT FKMAN02284JUSTIFIC FOREIGN KEY  (CDJUSTCONCTAR)
       REFERENCES JUSTIFICATIVA (CDJUSTIFICATIVA)
/

ALTER TABLE INSPECAUDIT ADD DSOBSCONCTAR VARCHAR2(250)
/

ALTER TABLE INSPECAUDIT ADD IDCONCTARDIV VARCHAR2(01) DEFAULT 'N'     NOT NULL
        	CONSTRAINT CKC_IDCONCTARDIV_INSPECAUDIT CHECK (IDCONCTARDIV IN ('S','N'))
/

ALTER TABLE INSPECAUDIT ADD CDOPERAUTQTDIV VARCHAR2(12)
/
ALTER TABLE ORDPRODUCAO ADD IDCONCTARDIV VARCHAR2(01) DEFAULT 'N'     NOT NULL
        	CONSTRAINT CKC_IDCONCTARDIV_ORDPRODUCAO CHECK (IDCONCTARDIV IN ('S','N'))
/