ALTER TABLE PARAMFILIAL ADD IDUTLDSBTPADRAO VARCHAR2(01) NULL
	CONSTRAINT CKC_IDUTLDSBTPADRAO CHECK (IDUTLDSBTPADRAO IN ('S', 'N'))
/
CREATE TABLE PERFACLPAINEL (
	NRPERFACLPAINEL		NUMBER              										NOT NULL,
    NRPERFILACESSO      NUMBER              										NOT NULL,
    NRPAINEL            NUMBER              										NOT NULL,
    CDFILIAL            VARCHAR2(04)        										NOT NULL,
    IDPADRAODASH		VARCHAR2(1)    DEFAULT 'N'									NOT NULL
		CONSTRAINT CKC_IDPADRAODASH CHECK (IDPADRAODASH IN ('S', 'N')),
    NRORG               NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NOT NULL,
    IDATIVO             VARCHAR2(1)    	DEFAULT 'S'  								NOT NULL
    CONSTRAINT CKC_IDATIVO_PERFACLPAINEL CHECK (IDATIVO IN ('S','N')),
    DTINCLUSAO          DATE           												NULL,
    DTULTATU            DATE           												NULL,
    NRORGINCLUSAO       NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERINCLUSAO      VARCHAR2(12)   	DEFAULT '1'  								NULL,
    NRORGULTATU         NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERULTATU		VARCHAR2(12)	DEFAULT '1'									NULL,
      CONSTRAINT PK_PERFACLPAINEL PRIMARY KEY (NRPERFACLPAINEL)
)
/
ALTER TABLE PERFACLPAINEL ADD
	CONSTRAINT FKGOP00726PERFILACESSO FOREIGN KEY (NRPERFILACESSO)
		REFERENCES PERFILACESSO (NRPERFILACESSO)
/
CREATE INDEX FKGOP00726PERFILACESSO ON PERFACLPAINEL (NRPERFILACESSO)
/
CREATE TABLE INDICADORTF (
    NRINDICADORTF		NUMBER              										NOT NULL,
    DSINDICADOR         VARCHAR2(50)   		   										NOT NULL,
    NRPAINEL            NUMBER       						 						NOT NULL,
    NRORG               NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') 	NOT NULL,
    IDATIVO             VARCHAR2(1)    	DEFAULT 'S'        							NOT NULL
    CONSTRAINT CKC_IDATIVO_INDICADORTF CHECK (IDATIVO IN ('S','N')),
    DTINCLUSAO          DATE           												NULL,
    DTULTATU            DATE           												NULL,
    NRORGINCLUSAO       NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERINCLUSAO      VARCHAR2(12)   	DEFAULT '1'       							NULL,
    NRORGULTATU         NUMBER         	DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  	NULL,
    CDOPERULTATU        VARCHAR2(12)	DEFAULT '1'       							NULL,
      CONSTRAINT PK_INDICADORTF PRIMARY KEY (NRINDICADORTF)
)
/
ALTER TABLE INDICADORTF ADD
	CONSTRAINT FKGOP00727PAINEL FOREIGN KEY (NRPAINEL)
		REFERENCES PAINEL (NRPAINEL)
/
CREATE INDEX FKGOP00727PAINEL ON INDICADORTF (NRPAINEL)