CREATE TABLE OPERADOR_LABEL_VERSAO (
    ID             NUMBER 		NOT NULL,
    PRODUCT_ID     NUMBER 		NOT NULL,
    CDOPERADOR     VARCHAR2(12) NOT NULL,
    NRULTVERSAO    NUMBER 		NOT NULL,
    NRORG          NUMBER       DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    IDATIVO        VARCHAR2(1)  DEFAULT 'S' NOT NULL,
    DTINCLUSAO     DATE         DEFAULT SYSDATE,
    DTULTATU       DATE         DEFAULT SYSDATE,
    NRORGINCLUSAO  NUMBER       DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
    CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1',
    NRORGULTATU    NUMBER       DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
    CDOPERULTATU   VARCHAR2(12) DEFAULT '1',
    
    CONSTRAINT PK_OPERADOR_LABEL_VERSAO   PRIMARY KEY(ID),
    CONSTRAINT FK_OPER_OPER_LABEL_VERSAO  
	FOREIGN KEY (CDOPERADOR) REFERENCES OPERADOR (CDOPERADOR),
    CONSTRAINT CKC_IDATIVO_OPER_LABEL_VER CHECK (IDATIVO IN ('S','N'))
)
/
CREATE INDEX FK_OPER_OPER_LABEL_VERSAO ON OPERADOR_LABEL_VERSAO (CDOPERADOR ASC)
/

ALTER TABLE PERFILACESSO_LABEL ADD NMMENU VARCHAR2(500)
/

ALTER TABLE ERROS_COLETA ADD DTULTCOLETASUC DATE
/