-- ============================================================
--   TABLE: ZH_PREFERENCE_FILTER
-- ============================================================
ALTER TABLE ZH_PREFERENCE_FILTER
	ADD 
	(
	   NRORG                       NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    IDATIVO        VARCHAR2(1)  DEFAULT 'S' NOT NULL,
    CONSTRAINT CKC_IDATIVO_ZH_FILTER CHECK (IDATIVO IN ('S','N')),  
    DTINCLUSAO     DATE                     NULL,
    CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL,
    DTULTATU       DATE                     NULL,
    NRORGINCLUSAO      NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  NULL,
    NRORGULTATU          NUMBER DEFAULT  SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
    CDOPERULTATU   VARCHAR2(12) DEFAULT '1' NULL
    )
/

-- ============================================================
--   TABLE: ZH_PREFERENCE_LAYOUT
-- ============================================================
ALTER TABLE ZH_PREFERENCE_LAYOUT
	ADD 
	(
	   NRORG                       NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    IDATIVO        VARCHAR2(1)  DEFAULT 'S' NOT NULL,
    CONSTRAINT CKC_IDATIVO_ZH_LAYOUT CHECK (IDATIVO IN ('S','N')),  
    DTINCLUSAO     DATE                     NULL,
    CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL,
    DTULTATU       DATE                     NULL,
    NRORGINCLUSAO      NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  NULL,
    NRORGULTATU          NUMBER DEFAULT  SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
    CDOPERULTATU   VARCHAR2(12) DEFAULT '1' NULL
    )
/

-- ============================================================
--   TABLE: ZH_PREFERENCE_VIEW    
-- ============================================================
ALTER TABLE ZH_PREFERENCE_VIEW  
	ADD 
	(
	   NRORG                       NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    IDATIVO        VARCHAR2(1)  DEFAULT 'S' NOT NULL,
    CONSTRAINT CKC_IDATIVO_ZH_PREFERENCE_VIEW CHECK (IDATIVO IN ('S','N')),  
    DTINCLUSAO     DATE                     NULL,
    CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL,
    DTULTATU       DATE                     NULL,
    NRORGINCLUSAO      NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  NULL,
    NRORGULTATU          NUMBER DEFAULT  SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
    CDOPERULTATU   VARCHAR2(12) DEFAULT '1' NULL
    )
/

-- ============================================================
--   TABLE: ZH_USER_WIDGET
-- ============================================================
ALTER TABLE ZH_USER_WIDGET
	ADD 
	(
	   NRORG                       NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
    IDATIVO        VARCHAR2(1)  DEFAULT 'S' NOT NULL,
    CONSTRAINT CKC_IDATIVO_ZH_USER_WIDGET CHECK (IDATIVO IN ('S','N')),  
    DTINCLUSAO     DATE                     NULL,
    CDOPERINCLUSAO VARCHAR2(12) DEFAULT '1' NULL,
    DTULTATU       DATE                     NULL,
    NRORGINCLUSAO      NUMBER DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg')  NULL,
    NRORGULTATU          NUMBER DEFAULT  SYS_CONTEXT('nrorg_ctx','nrorg') NULL,
    CDOPERULTATU   VARCHAR2(12) DEFAULT '1' NULL
    )