ALTER TABLE VIGFREQOPCAGR ADD IDTIPORESTRICAO VARCHAR2(30) DEFAULT 'CONTRATO' NOT NULL
/
ALTER TABLE VIGFREQOPCAGR ADD CONSTRAINT CKC_IDTIPORESTRICAO_VIFROPCAGR CHECK (IDTIPORESTRICAO IN ('CONTRATO', 'PLANEJADO'))
/
ALTER TABLE VIGFREQOPCAGR DROP CONSTRAINT UN_VIGFREQOPCAGR
/
ALTER TABLE VIGFREQOPCAGR ADD CONSTRAINT UN_VIGFREQOPCAGR UNIQUE (CDFILIAL, DTVIGENCIA, IDTIPORESTRICAO)
/
ALTER TABLE VIGFREQOPCAGR ADD DTVIGENCIAFIM DATE NULL
/
ALTER TABLE VIGFREQPRODGRPRAT ADD IDTIPORESTRICAO VARCHAR2(30) DEFAULT 'CONTRATO' NOT NULL
/
ALTER TABLE VIGFREQPRODGRPRAT ADD CONSTRAINT CKC_IDTIPORESTRICAO_VFRQPRGRPR CHECK (IDTIPORESTRICAO IN ('CONTRATO', 'PLANEJADO'))
/
ALTER TABLE VIGFREQPRODGRPRAT DROP CONSTRAINT UN_VIGFREQPRODGRPRAT
/
ALTER TABLE VIGFREQPRODGRPRAT ADD CONSTRAINT UN_VIGFREQPRODGRPRAT UNIQUE (CDFILIAL, DTVIGENCIA, IDTIPORESTRICAO)
/
ALTER TABLE VIGFREQPRODGRPRAT ADD DTVIGENCIAFIM DATE NULL