CREATE TABLE CUSTOM_REPORTS (
  ID             NUMBER         NOT NULL,
  LABEL          VARCHAR2(1000) NOT NULL,
  FILE_NAME      VARCHAR2(500)  NOT NULL,
  PARENT_REPORT  VARCHAR2(500)  NOT NULL,
  PRODUCT_ID     NUMBER         NOT NULL,
  WINDOW_NAME    VARCHAR2(100)  NOT NULL,
  
  NRORG          NUMBER      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
  IDATIVO        VARCHAR2(1) DEFAULT 'S' NOT NULL,
  DTINCLUSAO     DATE        DEFAULT SYSDATE NOT NULL,
  DTULTATU       DATE        DEFAULT SYSDATE,
  NRORGINCLUSAO  NUMBER      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
  NRORGULTATU    NUMBER      DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg'),
  CDOPERINCLUSAO VARCHAR2(12),
  CDOPERULTATU   VARCHAR2(12),
  
  CONSTRAINT PK_CUSTOM_REPORTS          PRIMARY KEY(ID),
  CONSTRAINT CKC_IDATIVO_CUSTOM_REPORTS CHECK (IDATIVO IN ('S','N'))
)
/
CREATE SEQUENCE SEQ_CUSTOM_REPORTS START WITH 1 MINVALUE 1 INCREMENT BY 1
/