CREATE TABLE AGENDOBRIGACESS 
   (	
   NRAGENDAMENTO     	NUMBER                  	NOT NULL, 
   CDTELA            		VARCHAR2(20)      		NOT NULL, 
   CDEMPRESA         	VARCHAR2(4000)     	NOT NULL, 
   CDINSCESTA        		VARCHAR2(4000),
   DTAGENDAMENTO     	DATE                    		NOT NULL,
   DTINICIAL         		DATE                    		NOT NULL,
   DTFINAL           		DATE                    		NOT NULL,
   CDCAMPO1          	VARCHAR2(100), 
   CDCAMPO2          	VARCHAR2(100), 
   CDCAMPO3          	VARCHAR2(100), 
   CDCAMPO4          	VARCHAR2(100), 
   CDCAMPO5          	VARCHAR2(100), 
   CDCAMPO6          	VARCHAR2(100), 
   CDCAMPO7          	VARCHAR2(100), 
   CDCAMPO8          	VARCHAR2(100), 
   CDCAMPO9          	VARCHAR2(100), 
   CDCAMPO10        	VARCHAR2(100), 
   CDCAMPO11        	VARCHAR2(100), 
   CDCAMPO12          	VARCHAR2(100), 
   CDCAMPO13        	VARCHAR2(100), 
   CDCAMPO14         	VARCHAR2(100), 
   CDCAMPO15         	VARCHAR2(100), 
   CDCAMPO16        	VARCHAR2(100), 
   CDCAMPO17         	VARCHAR2(100), 
   CDCAMPO18         	VARCHAR2(100), 
   CDCAMPO19         	VARCHAR2(100), 
   CDCAMPO20         	VARCHAR2(100), 
   CDCAMPO21        	VARCHAR2(100), 
   CDCAMPO22         	VARCHAR2(100), 
   CDCAMPO23         	VARCHAR2(100), 
   CDCAMPO24         	VARCHAR2(100), 
   CDCAMPO25         	VARCHAR2(100), 
   CDCAMPO26         	VARCHAR2(100), 
   CDCAMPO27         	VARCHAR2(100), 
   CDCAMPO28         	VARCHAR2(100), 
   CDCAMPO29        	VARCHAR2(100), 
   CDCAMPO30         	VARCHAR2(100), 
   CDCAMPO31        	VARCHAR2(100), 
   CDCAMPO32         	VARCHAR2(100), 
   CDCAMPO33        	VARCHAR2(100), 
   CDCAMPO34         	VARCHAR2(100), 
   CDCAMPO35        	VARCHAR2(100), 
   CDCAMPO36        	VARCHAR2(100), 
   CDCAMPO37        	VARCHAR2(100), 
   CDCAMPO38         	VARCHAR2(100), 
   CDCAMPO39         	VARCHAR2(100), 
   CDCAMPO40         	VARCHAR2(100), 
   CDCAMPO41         	VARCHAR2(100), 
   CDCAMPO42         	VARCHAR2(100), 
   CDCAMPO43         	VARCHAR2(100), 
   CDCAMPO44         	VARCHAR2(100), 
   CDCAMPO45        	VARCHAR2(100), 
   CDCAMPO46         	VARCHAR2(100), 
   CDCAMPO47        	VARCHAR2(100), 
   CDCAMPO48         	VARCHAR2(100), 
   CDCAMPO49         	VARCHAR2(100), 
   CDCAMPO50         	VARCHAR2(100), 
   VRCAMPO1          	FLOAT(126), 
   VRCAMPO2         		FLOAT(126), 
   VRCAMPO3          	FLOAT(126), 
   VRCAMPO4          	FLOAT(126), 
   VRCAMPO5          	FLOAT(126), 
   VRCAMPO6          	FLOAT(126), 
   VRCAMPO7          	FLOAT(126), 
   VRCAMPO8          	FLOAT(126), 
   VRCAMPO9          	FLOAT(126), 
   VRCAMPO10         	FLOAT(126), 
   VRCAMPO11         	FLOAT(126), 
   VRCAMPO12         	FLOAT(126), 
   VRCAMPO13         	FLOAT(126), 
   VRCAMPO14         	FLOAT(126), 
   VRCAMPO15         	FLOAT(126), 
   DTCAMPO1          	DATE, 
   DTCAMPO2          	DATE, 
   DTCAMPO3          	DATE, 
   DTCAMPO4          	DATE, 
   DTCAMPO5          	DATE, 
   DTCAMPO6          	DATE, 
   DTCAMPO7          	DATE, 
   DTCAMPO8          	DATE, 
   DTCAMPO9          	DATE, 
   DTCAMPO1O         	DATE, 
   DTCAMPO11         	DATE, 
   DTCAMPO12         	DATE, 
   DTCAMPO13         	DATE, 
   DTCAMPO14         	DATE, 
   DTCAMPO15         	DATE, 
   NRORG             		NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL, 
   DTINCLUSAO        	DATE, 
   DTULTATU          		DATE, 
   NRORGINCLUSAO     	NUMBER, 
   CDOPERINCLUSAO    	VARCHAR2(12), 
   NRORGULTATU      	NUMBER, 
   CDOPERULTATU      	VARCHAR2(12), 
   IDSTATUS      		VARCHAR2(1) 		DEFAULT 'P' NOT NULL, 
	CONSTRAINT CKC_IDSTATUS_AGENDOBRIGACESS CHECK (IDSTATUS IN ('P','R')), 
   IDATIVO           		VARCHAR2(1)		 DEFAULT 'S' NOT NULL, 
 	CONSTRAINT CKC_IDATIVO_AGENDOBRIGACESS CHECK (IDATIVO IN ('S','N')), 
	CONSTRAINT PK_AGENDOBRIGACESS PRIMARY KEY (NRAGENDAMENTO)
  )
/
CREATE TABLE ARQUIOBRIGACESS 
(	
   NRARQUIVO 		NUMBER 			NOT NULL, 
   NRAGENDAMENTO 	NUMBER 			NOT NULL, 
   CDTELA 		VARCHAR2(20) 		NOT NULL, 
   CDEMPRESA 		VARCHAR2(4000) 		NOT NULL, 
   CDINSCESTA 		VARCHAR2(4000), 
   DTAGENDAMENTO 	DATE NOT NULL, 
   NMARQUIVO 		VARCHAR2(50) 		NOT NULL, 
   NMPATHARQ 		VARCHAR2(200) 		NOT NULL, 
   NRORG             		NUMBER 			DEFAULT SYS_CONTEXT('nrorg_ctx','nrorg') NOT NULL, 
   DTINCLUSAO        	DATE, 
   DTULTATU          		DATE, 
   NRORGINCLUSAO     	NUMBER, 
   CDOPERINCLUSAO    	VARCHAR2(12), 
   NRORGULTATU       	NUMBER, 
   CDOPERULTATU      	VARCHAR2(12), 
   IDATIVO           		VARCHAR2(1) 		DEFAULT 'S' NOT NULL, 
	CONSTRAINT CKC_IDATIVO_ARQUIOBRIGACESS CHECK (IDATIVO IN ('S','N')), 
	CONSTRAINT PK_ARQUIOBRIGACESS PRIMARY KEY (NRARQUIVO)
)
/
ALTER TABLE CONFIGURASMTP ADD JENKINSPATH VARCHAR2(200)
/
ALTER TABLE CONFIGURASMTP ADD CALLSERVPATH VARCHAR2(200)
/
ALTER TABLE CONTATOAPURAC ADD IDAPURAAUTO VARCHAR2(1) DEFAULT 'N' NOT NULL 
	 CONSTRAINT CKC_IDAPURAAUTO_CONTATOAPURAC CHECK (IDAPURAAUTO IN ('N','S'))
/
ALTER TABLE CONTATOAPURAC ADD IDEXPORTAUTO VARCHAR2(1) DEFAULT 'N' NOT NULL
	CONSTRAINT CKC_IDEXPORTAUTO_CONTATOAPURAC CHECK (IDEXPORTAUTO IN ('N','S'))