CREATE TABLE MT_DESIGN_ESTRUTURA_SCRIPT (  
	ID                  NUMBER 			NOT NULL,
	MT_DESIGN_ESTRUT_ID NUMBER 			NOT NULL,
	SCRIPT              CLOB 			NOT NULL,
	SCRIPT_ORDER       	NUMBER 			NOT NULL,
	STATUS              VARCHAR2(1) 	NOT NULL,
	NRORG 				NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL,
	IDATIVO 			VARCHAR2(1) 	DEFAULT 'S' NOT NULL,
		CONSTRAINT CKC_IDATIVO_MTDESESTSCR 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',
		CONSTRAINT PK_MT_DESIGN_ESTRUTURA_SCRIPT  PRIMARY KEY(ID),  
		CONSTRAINT CKC_STATUS_MT_DES_ESTR_SCRIPT  CHECK (STATUS  IN ('S','E'))
)
/

ALTER TABLE MT_DESIGN_ESTRUTURA_SCRIPT ADD
	 CONSTRAINT FK_MT_DES_EST_SCRIP_MT_DES_EST FOREIGN KEY (MT_DESIGN_ESTRUT_ID) 
		REFERENCES MT_DESIGN_ESTRUTURA (ID)
/
	
ALTER TABLE CRM_PARAMETRIZACAO ADD DSHOSTSMTP VARCHAR2(500)
/

ALTER TABLE CRM_PARAMETRIZACAO ADD DSPORTASMTP VARCHAR2(50)
/

ALTER TABLE CRM_PARAMETRIZACAO ADD IDSMTPSECURE VARCHAR2(10) 
/

ALTER TABLE CRM_PARAMETRIZACAO ADD DSEMAILSMTP VARCHAR2(50)
/

ALTER TABLE CRM_PARAMETRIZACAO ADD DSSENHASMTP VARCHAR2(50)