declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate	'CREATE TABLE EMPRESA_IZIPAY_CONFIG (
	  	EMPRESAIZIPAY_ID NUMBER(7, 0) PRIMARY KEY ,
		EMPRESA_ID NUMBER(7, 0), 
		CLIENT_ID VARCHAR2(50 BYTE), 
		SECRET VARCHAR2(50 BYTE), 
		DIAS_CANCELA NUMBER(7,0), 
		URL VARCHAR2(50 BYTE), 
		ACTIVO NUMBER(1,0), 
		FECMODIF DATE, 
		USUARIO_ID NUMBER(7,0),
		CONSTRAINT fk_usuario_empresa_izipay FOREIGN KEY (USUARIO_ID) REFERENCES USUARIO(USUARIO_ID)
	)';
	
  exception when object_exists then null;
end;
/
declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate
  	'CREATE SEQUENCE EMP_IZIPAY_CONFIG_SEQ MINVALUE 1 MAXVALUE 9999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';	
  exception when object_exists then null;
end;
/
declare
    object_exists exception;
    pragma exception_init (object_exists , -00955);
begin
  execute immediate
  	'CREATE SEQUENCE REFERENCIA_IZIPAY_SEQ MINVALUE 1 MAXVALUE 999999999 INCREMENT BY 1 START WITH 1 CACHE 20 NOORDER NOCYCLE';	
  exception when object_exists then null;
end;

