ALTER TABLE VIGRESTPRODGR ADD IDTIPORESTRICAO VARCHAR2(30) DEFAULT 'CONTRATO' NOT NULL
/
ALTER TABLE VIGRESTPRODGR ADD CONSTRAINT CKC_IDTIPORESTRICAO_VGRESTPRGR CHECK (IDTIPORESTRICAO IN ('CONTRATO', 'PLANEJADO'))
/
ALTER TABLE VIGRESTPRODGR DROP CONSTRAINT UN_VIGRESTPRODGR
/
ALTER TABLE VIGRESTPRODGR ADD CONSTRAINT UN_VIGRESTPRODGR UNIQUE (CDFILIAL, DTVIGENCIA, IDTIPORESTRICAO)
/
ALTER TABLE VIGRESTPRODGR ADD DTVIGENCIAFIM DATE NULL