ALTER TABLE CONFIGALCADA ADD IDTPALCADA VARCHAR2(30) DEFAULT 'ORCAMENTO' NOT NULL 
   CONSTRAINT CKC_IDTPALCADA CHECK (IDTPALCADA IN ('ORCAMENTO', 'FINANCEIRO', 'COMPRAS'))
/
ALTER TABLE CONFIGALCADA ADD IDEXIGETAPROVE VARCHAR2(1) DEFAULT 'N' NOT NULL 
   CONSTRAINT CKC_IDEXIGETAPROVE CHECK (IDEXIGETAPROVE IN ('S','N'))
/
ALTER TABLE CONFIGALCADA ADD IDVALIDAALTER VARCHAR2(30) NULL 
   CONSTRAINT CKC_IDVALIDAALTER CHECK (IDVALIDAALTER IS NULL OR (IDVALIDAALTER IN ('SEMPRE', 'PARAMAIS')))
/
ALTER TABLE CONFIGALCADA ADD CDTPCTPAGAR VARCHAR2(6) NULL
/
ALTER TABLE CONFIGALCADA ADD
	CONSTRAINT FKCMP00585TIPOCTPAGAR FOREIGN KEY (CDTPCTPAGAR)
		REFERENCES TIPOCTPAGAR (CDTPCTPAGAR)
/
CREATE INDEX FKCMP00585TIPOCTPAGAR ON CONFIGALCADA (CDTPCTPAGAR)
/
ALTER TABLE CONFIGALCADA ADD CDSETOR VARCHAR2(4) NULL
/
ALTER TABLE CONFIGALCADA ADD
	CONSTRAINT FKCMP00586SETOR FOREIGN KEY (CDSETOR)
		REFERENCES SETOR (CDSETOR)
/
CREATE INDEX FKCMP00586SETOR ON CONFIGALCADA (CDSETOR)