-- Table structure for table `vtiger_demandacomercial_inventory`
--

CREATE TABLE `vtiger_demandacomercial_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `demandacomercial_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_demandacomercial_invfield`
--

CREATE TABLE `vtiger_demandacomercial_invfield` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `columnname` varchar(30) NOT NULL,
  `label` varchar(50) NOT NULL,
  `invtype` varchar(30) NOT NULL,
  `presence` smallint(1) unsigned NOT NULL DEFAULT '0',
  `defaultvalue` varchar(255) DEFAULT NULL,
  `sequence` int(10) unsigned NOT NULL,
  `block` smallint(1) unsigned NOT NULL,
  `displaytype` smallint(1) unsigned NOT NULL DEFAULT '1',
  `params` text,
  `colspan` smallint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_demandacomercial_invmap`
--

CREATE TABLE `vtiger_demandacomercial_invmap` (
  `module` varchar(50) NOT NULL,
  `field` varchar(50) NOT NULL,
  `tofield` varchar(50) NOT NULL,
  PRIMARY KEY (`module`,`field`,`tofield`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_demandacomercialcf`
--

CREATE TABLE `vtiger_demandacomercialcf` (
  `demandacomercialid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`demandacomercialid`),
  CONSTRAINT `fk_1_vtiger_demandacomercialcfdemandacomercialid` FOREIGN KEY (`demandacomercialid`) REFERENCES `vtiger_demandacomercial` (`demandacomercialid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_departamento`
--

CREATE TABLE `vtiger_departamento` (
  `departamentoid` int(11) NOT NULL AUTO_INCREMENT,
  `departamento` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`departamentoid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_detactividad`
--

CREATE TABLE `vtiger_detactividad` (
  `detactividadid` int(11) NOT NULL AUTO_INCREMENT,
  `detactividad` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`detactividadid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_detallecobrosypagos`
--

CREATE TABLE `vtiger_detallecobrosypagos` (
  `detallecobrosypagosid` int(11) NOT NULL,
  `id` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `concepto` varchar(100) DEFAULT '',
  `monto` decimal(16,8) DEFAULT NULL,
  `sinisestroid` int(11) unsigned DEFAULT '0',
  `clienteid` int(11) unsigned DEFAULT '0',
  PRIMARY KEY (`detallecobrosypagosid`),
  KEY `vtiger_detallecobrosypagos_sinisestroid_idx` (`sinisestroid`),
  KEY `vtiger_detallecobrosypagos_clienteid_idx` (`clienteid`),
  CONSTRAINT `fk_1_vtiger_detallecobrosypagosdetallecobrosypagosid` FOREIGN KEY (`detallecobrosypagosid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_detallecobrosypagoscf`
--

CREATE TABLE `vtiger_detallecobrosypagoscf` (
  `detallecobrosypagosid` int(11) NOT NULL,
  PRIMARY KEY (`detallecobrosypagosid`),
  CONSTRAINT `fk_1_vtiger_detallecobrosypagoscfdetallecobrosypagosid` FOREIGN KEY (`detallecobrosypagosid`) REFERENCES `vtiger_detallecobrosypagos` (`detallecobrosypagosid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_deudabieninmueble1`
--

CREATE TABLE `vtiger_deudabieninmueble1` (
  `deudabieninmueble1id` int(11) NOT NULL AUTO_INCREMENT,
  `deudabieninmueble1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`deudabieninmueble1id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_deudainmueble2`
--

CREATE TABLE `vtiger_deudainmueble2` (
  `deudainmueble2id` int(11) NOT NULL AUTO_INCREMENT,
  `deudainmueble2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`deudainmueble2id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_diapago`
--

CREATE TABLE `vtiger_diapago` (
  `diapagoid` int(11) NOT NULL AUTO_INCREMENT,
  `diapago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`diapagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_diasdisppre`
--

CREATE TABLE `vtiger_diasdisppre` (
  `diasdisppreid` int(11) NOT NULL AUTO_INCREMENT,
  `diasdisppre` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`diasdisppreid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_diaspago`
--

CREATE TABLE `vtiger_diaspago` (
  `diaspagoid` int(11) NOT NULL AUTO_INCREMENT,
  `diaspago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`diaspagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_direccionciaseguros`
--

CREATE TABLE `vtiger_direccionciaseguros` (
  `direccionciasegurosid` int(11) NOT NULL AUTO_INCREMENT,
  `direccionciaseguros` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`direccionciasegurosid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_divisionempresa`
--

CREATE TABLE `vtiger_divisionempresa` (
  `divisionempresaid` int(11) NOT NULL AUTO_INCREMENT,
  `divisionempresa` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`divisionempresaid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_duration_minutes`
--

CREATE TABLE `vtiger_duration_minutes` (
  `minutesid` int(10) NOT NULL AUTO_INCREMENT,
  `duration_minutes` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`minutesid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_duration_minutes_seq`
--

CREATE TABLE `vtiger_duration_minutes_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_durationhrs`
--

CREATE TABLE `vtiger_durationhrs` (
  `hrsid` int(10) NOT NULL AUTO_INCREMENT,
  `hrs` varchar(50) DEFAULT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`hrsid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_durationmins`
--

CREATE TABLE `vtiger_durationmins` (
  `minsid` int(10) NOT NULL AUTO_INCREMENT,
  `mins` varchar(50) DEFAULT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`minsid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edoasesoria`
--

CREATE TABLE `vtiger_edoasesoria` (
  `edoasesoriaid` int(11) NOT NULL AUTO_INCREMENT,
  `edoasesoria` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edoasesoriaid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edocaso`
--

CREATE TABLE `vtiger_edocaso` (
  `edocasoid` int(11) NOT NULL AUTO_INCREMENT,
  `edocaso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edocasoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edocaupru`
--

CREATE TABLE `vtiger_edocaupru` (
  `edocaupruid` int(11) NOT NULL AUTO_INCREMENT,
  `edocaupru` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edocaupruid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edocivil`
--

CREATE TABLE `vtiger_edocivil` (
  `edocivilid` int(11) NOT NULL AUTO_INCREMENT,
  `edocivil` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edocivilid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edocomercialasesor`
--

CREATE TABLE `vtiger_edocomercialasesor` (
  `edocomercialasesorid` int(11) NOT NULL AUTO_INCREMENT,
  `edocomercialasesor` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edocomercialasesorid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edocontacto`
--

CREATE TABLE `vtiger_edocontacto` (
  `edocontactoid` int(11) NOT NULL AUTO_INCREMENT,
  `edocontacto` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edocontactoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edocredito`
--

CREATE TABLE `vtiger_edocredito` (
  `edocreditoid` int(11) NOT NULL AUTO_INCREMENT,
  `edocredito` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edocreditoid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edoef1`
--

CREATE TABLE `vtiger_edoef1` (
  `edoef1id` int(11) NOT NULL AUTO_INCREMENT,
  `edoef1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edoef1id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edogestion`
--

CREATE TABLE `vtiger_edogestion` (
  `edogestionid` int(11) NOT NULL AUTO_INCREMENT,
  `edogestion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edogestionid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edosolcredito`
--

CREATE TABLE `vtiger_edosolcredito` (
  `edosolcreditoid` int(11) NOT NULL AUTO_INCREMENT,
  `edosolcredito` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edosolcreditoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_edosolicitud`
--

CREATE TABLE `vtiger_edosolicitud` (
  `edosolicitudid` int(11) NOT NULL AUTO_INCREMENT,
  `edosolicitud` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`edosolicitudid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_email_template_priority`
--

CREATE TABLE `vtiger_email_template_priority` (
  `email_template_priorityid` int(10) NOT NULL AUTO_INCREMENT,
  `email_template_priority` tinyint(1) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`email_template_priorityid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_email_template_type`
--

CREATE TABLE `vtiger_email_template_type` (
  `email_template_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `email_template_type` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`email_template_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_employee_education`
--

CREATE TABLE `vtiger_employee_education` (
  `employee_educationid` int(10) NOT NULL AUTO_INCREMENT,
  `employee_education` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`employee_educationid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_employee_education_seq`
--

CREATE TABLE `vtiger_employee_education_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_employee_status`
--

CREATE TABLE `vtiger_employee_status` (
  `employee_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `employee_status` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`employee_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_employee_status_seq`
--

CREATE TABLE `vtiger_employee_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_end_hour`
--

CREATE TABLE `vtiger_end_hour` (
  `end_hourid` int(10) NOT NULL AUTO_INCREMENT,
  `end_hour` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`end_hourid`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_end_hour_seq`
--

CREATE TABLE `vtiger_end_hour_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ente`
--

CREATE TABLE `vtiger_ente` (
  `enteid` int(11) NOT NULL AUTO_INCREMENT,
  `ente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`enteid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_entfinanciera1`
--

CREATE TABLE `vtiger_entfinanciera1` (
  `entfinanciera1id` int(11) NOT NULL AUTO_INCREMENT,
  `entfinanciera1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`entfinanciera1id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_entity_stats`
--

CREATE TABLE `vtiger_entity_stats` (
  `crmid` int(10) NOT NULL,
  `crmactivity` smallint(5) DEFAULT NULL,
  PRIMARY KEY (`crmid`),
  CONSTRAINT `fk_1_vtiger_entity_stats` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_entityname`
--

CREATE TABLE `vtiger_entityname` (
  `tabid` smallint(5) NOT NULL DEFAULT '0',
  `modulename` varchar(25) NOT NULL,
  `tablename` varchar(50) NOT NULL,
  `fieldname` varchar(100) NOT NULL,
  `entityidfield` varchar(30) NOT NULL,
  `entityidcolumn` varchar(30) NOT NULL,
  `searchcolumn` varchar(150) NOT NULL,
  `turn_off` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `sequence` smallint(3) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`tabid`),
  KEY `turn_off` (`turn_off`),
  CONSTRAINT `fk_1_vtiger_entityname` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_entliquidadora`
--

CREATE TABLE `vtiger_entliquidadora` (
  `entliquidadoraid` int(11) NOT NULL AUTO_INCREMENT,
  `entliquidadora` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`entliquidadoraid`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_est_liq`
--

CREATE TABLE `vtiger_est_liq` (
  `est_liqid` int(11) NOT NULL AUTO_INCREMENT,
  `est_liq` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`est_liqid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estado`
--

CREATE TABLE `vtiger_estado` (
  `estadoid` int(11) NOT NULL AUTO_INCREMENT,
  `estado` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoid`)
) ENGINE=InnoDB AUTO_INCREMENT=151 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estado_`
--

CREATE TABLE `vtiger_estado_` (
  `estado_id` int(11) NOT NULL AUTO_INCREMENT,
  `estado_` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estado_id`)
) ENGINE=InnoDB AUTO_INCREMENT=100 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadobusqueda`
--

CREATE TABLE `vtiger_estadobusqueda` (
  `estadobusquedaid` int(11) NOT NULL AUTO_INCREMENT,
  `estadobusqueda` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadobusquedaid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadocomercialdda`
--

CREATE TABLE `vtiger_estadocomercialdda` (
  `estadocomercialddaid` int(11) NOT NULL AUTO_INCREMENT,
  `estadocomercialdda` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadocomercialddaid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadoconvenio`
--

CREATE TABLE `vtiger_estadoconvenio` (
  `estadoconvenioid` int(11) NOT NULL AUTO_INCREMENT,
  `estadoconvenio` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoconvenioid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadocorreo`
--

CREATE TABLE `vtiger_estadocorreo` (
  `estadocorreoid` int(11) NOT NULL AUTO_INCREMENT,
  `estadocorreo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadocorreoid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadodda`
--

CREATE TABLE `vtiger_estadodda` (
  `estadoddaid` int(11) NOT NULL AUTO_INCREMENT,
  `estadodda` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoddaid`)
) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadoddadc`
--

CREATE TABLE `vtiger_estadoddadc` (
  `estadoddadcid` int(11) NOT NULL AUTO_INCREMENT,
  `estadoddadc` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoddadcid`)
) ENGINE=InnoDB AUTO_INCREMENT=38 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadodellead`
--

CREATE TABLE `vtiger_estadodellead` (
  `estadodelleadid` int(11) NOT NULL AUTO_INCREMENT,
  `estadodellead` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadodelleadid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadoembargo`
--

CREATE TABLE `vtiger_estadoembargo` (
  `estadoembargoid` int(11) NOT NULL AUTO_INCREMENT,
  `estadoembargo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoembargoid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadogc`
--

CREATE TABLE `vtiger_estadogc` (
  `estadogcid` int(11) NOT NULL AUTO_INCREMENT,
  `estadogc` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadogcid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadolead`
--

CREATE TABLE `vtiger_estadolead` (
  `estadoleadid` int(11) NOT NULL AUTO_INCREMENT,
  `estadolead` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoleadid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadollamada`
--

CREATE TABLE `vtiger_estadollamada` (
  `estadollamadaid` int(11) NOT NULL AUTO_INCREMENT,
  `estadollamada` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadollamadaid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadollamadados`
--

CREATE TABLE `vtiger_estadollamadados` (
  `estadollamadadosid` int(11) NOT NULL AUTO_INCREMENT,
  `estadollamadados` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadollamadadosid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadollamadatres`
--

CREATE TABLE `vtiger_estadollamadatres` (
  `estadollamadatresid` int(11) NOT NULL AUTO_INCREMENT,
  `estadollamadatres` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadollamadatresid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadollamadauno`
--

CREATE TABLE `vtiger_estadollamadauno` (
  `estadollamadaunoid` int(11) NOT NULL AUTO_INCREMENT,
  `estadollamadauno` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadollamadaunoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadonot44`
--

CREATE TABLE `vtiger_estadonot44` (
  `estadonot44id` int(11) NOT NULL AUTO_INCREMENT,
  `estadonot44` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadonot44id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadonotcedula`
--

CREATE TABLE `vtiger_estadonotcedula` (
  `estadonotcedulaid` int(11) NOT NULL AUTO_INCREMENT,
  `estadonotcedula` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadonotcedulaid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadonotpersonal`
--

CREATE TABLE `vtiger_estadonotpersonal` (
  `estadonotpersonalid` int(11) NOT NULL AUTO_INCREMENT,
  `estadonotpersonal` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadonotpersonalid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadopac`
--

CREATE TABLE `vtiger_estadopac` (
  `estadopacid` int(11) NOT NULL AUTO_INCREMENT,
  `estadopac` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadopacid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadopagohonorarios`
--

CREATE TABLE `vtiger_estadopagohonorarios` (
  `estadopagohonorariosid` int(11) NOT NULL AUTO_INCREMENT,
  `estadopagohonorarios` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadopagohonorariosid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadopreaprobacion`
--

CREATE TABLE `vtiger_estadopreaprobacion` (
  `estadopreaprobacionid` int(11) NOT NULL AUTO_INCREMENT,
  `estadopreaprobacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadopreaprobacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadoprogreso`
--

CREATE TABLE `vtiger_estadoprogreso` (
  `estadoprogresoid` int(11) NOT NULL AUTO_INCREMENT,
  `estadoprogreso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoprogresoid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadoreprogramacion`
--

CREATE TABLE `vtiger_estadoreprogramacion` (
  `estadoreprogramacionid` int(11) NOT NULL AUTO_INCREMENT,
  `estadoreprogramacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadoreprogramacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadossos`
--

CREATE TABLE `vtiger_estadossos` (
  `estadossosid` int(11) NOT NULL AUTO_INCREMENT,
  `estadossos` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadossosid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadosus`
--

CREATE TABLE `vtiger_estadosus` (
  `estadosusid` int(11) NOT NULL AUTO_INCREMENT,
  `estadosus` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadosusid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estadosuscripcion`
--

CREATE TABLE `vtiger_estadosuscripcion` (
  `estadosuscripcionid` int(11) NOT NULL AUTO_INCREMENT,
  `estadosuscripcion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estadosuscripcionid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estudios`
--

CREATE TABLE `vtiger_estudios` (
  `estudiosid` int(11) NOT NULL AUTO_INCREMENT,
  `estudios` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estudiosid`)
) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_estudioscredito`
--

CREATE TABLE `vtiger_estudioscredito` (
  `estudioscreditoid` int(11) NOT NULL AUTO_INCREMENT,
  `estudioscredito` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`estudioscreditoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_etapacobam`
--

CREATE TABLE `vtiger_etapacobam` (
  `etapacobamid` int(11) NOT NULL AUTO_INCREMENT,
  `etapacobam` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`etapacobamid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_evalasignado`
--

CREATE TABLE `vtiger_evalasignado` (
  `evalasignadoid` int(11) NOT NULL AUTO_INCREMENT,
  `evalasignado` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`evalasignadoid`)
) ENGINE=InnoDB AUTO_INCREMENT=141 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_evalpreinsp`
--

CREATE TABLE `vtiger_evalpreinsp` (
  `evalpreinspid` int(11) NOT NULL AUTO_INCREMENT,
  `evalpreinsp` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`evalpreinspid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_evalreinspeccion`
--

CREATE TABLE `vtiger_evalreinspeccion` (
  `evalreinspeccionid` int(11) NOT NULL AUTO_INCREMENT,
  `evalreinspeccion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`evalreinspeccionid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_evapre`
--

CREATE TABLE `vtiger_evapre` (
  `evapreid` int(11) NOT NULL AUTO_INCREMENT,
  `evapre` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`evapreid`)
) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_eventhandlers`
--

CREATE TABLE `vtiger_eventhandlers` (
  `eventhandler_id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `event_name` varchar(50) NOT NULL,
  `handler_class` varchar(100) NOT NULL,
  `is_active` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `include_modules` varchar(255) NOT NULL DEFAULT '',
  `exclude_modules` varchar(255) NOT NULL DEFAULT '',
  `priority` tinyint(1) unsigned NOT NULL DEFAULT '5',
  `owner_id` smallint(5) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`eventhandler_id`),
  KEY `event_name_class` (`event_name`,`handler_class`)
) ENGINE=InnoDB AUTO_INCREMENT=59 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_eventstatus`
--

CREATE TABLE `vtiger_eventstatus` (
  `eventstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `eventstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`eventstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_eventstatus_seq`
--

CREATE TABLE `vtiger_eventstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_expectedresponse`
--

CREATE TABLE `vtiger_expectedresponse` (
  `expectedresponseid` int(10) NOT NULL AUTO_INCREMENT,
  `expectedresponse` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`expectedresponseid`),
  UNIQUE KEY `CampaignExpRes_UK01` (`expectedresponse`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_expectedresponse_seq`
--

CREATE TABLE `vtiger_expectedresponse_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faq`
--

CREATE TABLE `vtiger_faq` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `faq_no` varchar(100) NOT NULL,
  `product_id` varchar(100) DEFAULT NULL,
  `question` text,
  `answer` text,
  `category` varchar(200) NOT NULL,
  `status` varchar(200) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `faq_id_idx` (`id`),
  CONSTRAINT `fk_1_vtiger_faq` FOREIGN KEY (`id`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faqcategories`
--

CREATE TABLE `vtiger_faqcategories` (
  `faqcategories_id` int(10) NOT NULL AUTO_INCREMENT,
  `faqcategories` varchar(200) DEFAULT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`faqcategories_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faqcategories_seq`
--

CREATE TABLE `vtiger_faqcategories_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faqcf`
--

CREATE TABLE `vtiger_faqcf` (
  `faqid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`faqid`),
  CONSTRAINT `fk_1_vtiger_faqcf` FOREIGN KEY (`faqid`) REFERENCES `vtiger_faq` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faqcomments`
--

CREATE TABLE `vtiger_faqcomments` (
  `commentid` int(10) NOT NULL AUTO_INCREMENT,
  `faqid` int(10) DEFAULT NULL,
  `comments` text,
  `createdtime` datetime NOT NULL,
  PRIMARY KEY (`commentid`),
  KEY `faqcomments_faqid_idx` (`faqid`),
  CONSTRAINT `fk_1_vtiger_faqcomments` FOREIGN KEY (`faqid`) REFERENCES `vtiger_faq` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faqstatus`
--

CREATE TABLE `vtiger_faqstatus` (
  `faqstatus_id` int(10) NOT NULL AUTO_INCREMENT,
  `faqstatus` varchar(200) DEFAULT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`faqstatus_id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_faqstatus_seq`
--

CREATE TABLE `vtiger_faqstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fcorectinginvoice_formpayment`
--

CREATE TABLE `vtiger_fcorectinginvoice_formpayment` (
  `fcorectinginvoice_formpaymentid` int(10) NOT NULL AUTO_INCREMENT,
  `fcorectinginvoice_formpayment` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`fcorectinginvoice_formpaymentid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fcorectinginvoice_status`
--

CREATE TABLE `vtiger_fcorectinginvoice_status` (
  `fcorectinginvoice_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `fcorectinginvoice_status` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`fcorectinginvoice_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fechaaudpend`
--

CREATE TABLE `vtiger_fechaaudpend` (
  `fechaaudpendid` int(11) NOT NULL AUTO_INCREMENT,
  `fechaaudpend` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`fechaaudpendid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_feedback`
--

CREATE TABLE `vtiger_feedback` (
  `userid` int(10) DEFAULT NULL,
  `dontshow` varchar(19) DEFAULT 'false'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_field`
--

CREATE TABLE `vtiger_field` (
  `tabid` smallint(5) NOT NULL,
  `fieldid` int(10) NOT NULL AUTO_INCREMENT,
  `columnname` varchar(30) NOT NULL,
  `tablename` varchar(50) NOT NULL,
  `generatedtype` tinyint(3) unsigned NOT NULL DEFAULT '0',
  `uitype` smallint(5) unsigned NOT NULL,
  `fieldname` varchar(50) NOT NULL,
  `fieldlabel` varchar(50) NOT NULL,
  `readonly` tinyint(1) unsigned NOT NULL,
  `presence` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `defaultvalue` text,
  `maximumlength` smallint(5) unsigned NOT NULL,
  `sequence` smallint(5) unsigned NOT NULL,
  `block` int(10) DEFAULT NULL,
  `displaytype` tinyint(1) unsigned NOT NULL,
  `typeofdata` varchar(100) DEFAULT NULL,
  `quickcreate` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `quickcreatesequence` int(10) DEFAULT NULL,
  `info_type` varchar(20) DEFAULT NULL,
  `masseditable` int(10) NOT NULL DEFAULT '1',
  `helpinfo` varchar(30) DEFAULT '',
  `summaryfield` int(10) NOT NULL DEFAULT '0',
  `fieldparams` varchar(255) DEFAULT '',
  `header_field` varchar(15) DEFAULT NULL,
  `maxlengthtext` smallint(3) unsigned DEFAULT '0',
  `maxwidthcolumn` smallint(3) unsigned DEFAULT '0',
  PRIMARY KEY (`fieldid`),
  KEY `field_tabid_idx` (`tabid`),
  KEY `field_fieldname_idx` (`fieldname`),
  KEY `field_block_idx` (`block`),
  KEY `field_displaytype_idx` (`displaytype`),
  KEY `tabid` (`tabid`,`tablename`),
  KEY `quickcreate` (`quickcreate`),
  KEY `presence` (`presence`),
  KEY `tabid_2` (`tabid`,`fieldname`),
  KEY `tabid_3` (`tabid`,`block`),
  CONSTRAINT `fk_1_vtiger_field` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=5810 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_field_seq`
--

CREATE TABLE `vtiger_field_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fieldmodulerel`
--

CREATE TABLE `vtiger_fieldmodulerel` (
  `fieldid` smallint(5) unsigned NOT NULL,
  `module` varchar(25) NOT NULL,
  `relmodule` varchar(25) NOT NULL,
  `status` varchar(10) DEFAULT NULL,
  `sequence` tinyint(1) unsigned DEFAULT '0',
  KEY `fieldid` (`fieldid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoice_formpayment`
--

CREATE TABLE `vtiger_finvoice_formpayment` (
  `finvoice_formpaymentid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoice_formpayment` varchar(200) NOT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoice_formpaymentid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoice_paymentstatus`
--

CREATE TABLE `vtiger_finvoice_paymentstatus` (
  `finvoice_paymentstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoice_paymentstatus` varchar(200) NOT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoice_paymentstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoice_status`
--

CREATE TABLE `vtiger_finvoice_status` (
  `finvoice_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoice_status` varchar(200) NOT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoice_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoice_type`
--

CREATE TABLE `vtiger_finvoice_type` (
  `finvoice_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoice_type` varchar(200) NOT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoice_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoicecost_formpayment`
--

CREATE TABLE `vtiger_finvoicecost_formpayment` (
  `finvoicecost_formpaymentid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoicecost_formpayment` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoicecost_formpaymentid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoicecost_paymentstatus`
--

CREATE TABLE `vtiger_finvoicecost_paymentstatus` (
  `finvoicecost_paymentstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoicecost_paymentstatus` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoicecost_paymentstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoicecost_status`
--

CREATE TABLE `vtiger_finvoicecost_status` (
  `finvoicecost_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoicecost_status` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`finvoicecost_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoiceproforma_formpayment`
--

CREATE TABLE `vtiger_finvoiceproforma_formpayment` (
  `finvoiceproforma_formpaymentid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoiceproforma_formpayment` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`finvoiceproforma_formpaymentid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_finvoiceproforma_status`
--

CREATE TABLE `vtiger_finvoiceproforma_status` (
  `finvoiceproforma_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `finvoiceproforma_status` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`finvoiceproforma_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fixed_assets_fuel_type`
--

CREATE TABLE `vtiger_fixed_assets_fuel_type` (
  `fixed_assets_fuel_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `fixed_assets_fuel_type` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`fixed_assets_fuel_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fixed_assets_status`
--

CREATE TABLE `vtiger_fixed_assets_status` (
  `fixed_assets_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `fixed_assets_status` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`fixed_assets_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fixed_assets_type`
--

CREATE TABLE `vtiger_fixed_assets_type` (
  `fixed_assets_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `fixed_assets_type` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`fixed_assets_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_formadenuncia`
--

CREATE TABLE `vtiger_formadenuncia` (
  `formadenunciaid` int(11) NOT NULL AUTO_INCREMENT,
  `formadenuncia` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`formadenunciaid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fsismo`
--

CREATE TABLE `vtiger_fsismo` (
  `fsismoid` int(11) NOT NULL AUTO_INCREMENT,
  `fsismo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`fsismoid`)
) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fsismo_nuevo`
--

CREATE TABLE `vtiger_fsismo_nuevo` (
  `fsismo_nuevoid` int(11) NOT NULL AUTO_INCREMENT,
  `fsismo_nuevo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`fsismo_nuevoid`)
) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_fuente`
--

CREATE TABLE `vtiger_fuente` (
  `fuenteid` int(11) NOT NULL AUTO_INCREMENT,
  `fuente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`fuenteid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gest_ext`
--

CREATE TABLE `vtiger_gest_ext` (
  `gest_extid` int(11) NOT NULL AUTO_INCREMENT,
  `gest_ext` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`gest_extid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestcomdda`
--

CREATE TABLE `vtiger_gestcomdda` (
  `gestcomddaid` int(11) NOT NULL DEFAULT '0',
  `gestcomdda` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `nombre` varchar(59) DEFAULT '',
  `apellido` varchar(59) DEFAULT '',
  `cliente` varchar(59) DEFAULT '',
  `serienrodocto` varchar(59) DEFAULT '',
  `movil` varchar(30) DEFAULT '',
  `movil_extra` varchar(100) DEFAULT NULL,
  `tlfparticular` varchar(30) DEFAULT '',
  `tlfparticular_extra` varchar(100) DEFAULT NULL,
  `email` varchar(100) DEFAULT '',
  `observaciones` text,
  `edogestion` varchar(255) DEFAULT '',
  `llamada` varchar(255) DEFAULT '',
  `direccionsiniestro` text,
  `categorizacion` varchar(255) DEFAULT '',
  `perdidaindemnizable` decimal(62,2) DEFAULT NULL,
  `deducibleafecto` decimal(62,2) DEFAULT NULL,
  `perdidadeterminada` decimal(62,2) DEFAULT NULL,
  `pagoporcentaje` decimal(5,2) DEFAULT NULL,
  `fdenuncio` date DEFAULT NULL,
  `fvisita` date DEFAULT NULL,
  `fpresupuesto` date DEFAULT NULL,
  `frecinfliq` date DEFAULT NULL,
  `fimpugnacion` date DEFAULT NULL,
  `frespimpugnacion` date DEFAULT NULL,
  `fultgestion` date DEFAULT NULL,
  `notificacionemail` tinyint(1) DEFAULT '0',
  `notificacionrechazo` tinyint(1) DEFAULT '0',
  `notificacionaceptacion` tinyint(1) DEFAULT '0',
  `tlfotro` varchar(30) DEFAULT '',
  `tlfotro_extra` varchar(100) DEFAULT NULL,
  `mailotro` varchar(100) DEFAULT '',
  `siniestro` int(11) unsigned DEFAULT '0',
  `valor1cuota` bigint(59) DEFAULT '0',
  `valor2cuota` bigint(59) DEFAULT '0',
  `valor3cuota` bigint(59) DEFAULT '0',
  `1cuotapagada` tinyint(1) DEFAULT '0',
  `2cuotapagada` tinyint(1) DEFAULT '0',
  `3cuotapagada` tinyint(1) DEFAULT '0',
  `f1cuota` date DEFAULT NULL,
  `f2cuota` date DEFAULT NULL,
  `f3cuota` date DEFAULT NULL,
  `tiposiniestro` varchar(16) DEFAULT '',
  `comunacaso` varchar(16) DEFAULT '',
  `ciaseguros` varchar(16) DEFAULT '',
  `banco` varchar(32) DEFAULT '',
  `entliquidadora` varchar(32) DEFAULT '',
  `estado` varchar(32) DEFAULT '',
  `fsismo` varchar(32) DEFAULT '',
  `fvolverllamar` date DEFAULT NULL,
  `hvolverllamar` varchar(255) DEFAULT '',
  `obsllamada` text,
  `volverllamar` tinyint(1) DEFAULT '0',
  `modificardatos` tinyint(1) DEFAULT '0',
  `comentariomodificacion` text,
  `fcompromisocuota1` date DEFAULT NULL,
  `fcompromisocuota2` date DEFAULT NULL,
  `fcompromisocuota3` date DEFAULT NULL,
  `montopresupuesto` bigint(64) DEFAULT '0',
  `perdidadeterminadap` bigint(64) DEFAULT '0',
  `deducibleafectop` bigint(64) DEFAULT '0',
  `perdidaindemnizablep` bigint(64) DEFAULT '0',
  `dctosfirmados` tinyint(1) DEFAULT '0',
  `fcontratofirmado` date DEFAULT NULL,
  `comentariocontrato` text,
  `dctosdec` tinyint(1) DEFAULT '0',
  `montoporreclamarp` bigint(64) DEFAULT '0',
  `perdidareclamada` bigint(64) DEFAULT '0',
  `casorevisado` tinyint(1) DEFAULT '0',
  `costodemanda` bigint(32) DEFAULT '0',
  `abono` bigint(59) DEFAULT '0',
  `valorcuota` bigint(59) DEFAULT '0',
  `diapago` varchar(255) DEFAULT '',
  `fprimerpago` date DEFAULT NULL,
  `deudarestante` bigint(59) DEFAULT '0',
  `ciudadcaso` varchar(32) DEFAULT '',
  `nombrecliente` int(11) unsigned DEFAULT '0',
  `edocivil` varchar(255) DEFAULT '',
  `profesion` varchar(59) DEFAULT '',
  `abonopagado` tinyint(1) DEFAULT '0',
  `fabono` date DEFAULT NULL,
  `tpagoabono` varchar(255) DEFAULT '',
  `bdpago` varchar(255) DEFAULT '',
  `nrocuotasgd` varchar(255) DEFAULT '',
  `tpago1cuota` varchar(255) DEFAULT '',
  `tpago2cuota` varchar(255) DEFAULT '',
  `tpago3cuota` varchar(255) DEFAULT '',
  `bdpago1cuota` varchar(255) DEFAULT '',
  `bdpago3cuota` varchar(255) DEFAULT '',
  `bdpago2cuota` varchar(255) DEFAULT '',
  `fpagoabono` date DEFAULT NULL,
  `nfacabono` bigint(59) DEFAULT '0',
  `mailinformativo` tinyint(1) DEFAULT '0',
  `fabono0` date DEFAULT NULL,
  `nrofactura` bigint(59) DEFAULT '0',
  `ffactura` date DEFAULT NULL,
  `ffacturapagada` date DEFAULT NULL,
  `facturapagada` tinyint(1) DEFAULT '0',
  `fnegociacion` date DEFAULT NULL,
  `fdocdec` date DEFAULT NULL,
  `result` text,
  `presupuestomanual` tinyint(1) DEFAULT '0',
  `descmand` tinyint(1) DEFAULT '0',
  `mandatofirmado` tinyint(1) DEFAULT '0',
  `fmandatofirmado` date DEFAULT NULL,
  `codwebpayabono` bigint(12) DEFAULT '0',
  `codwebpaycuota1` bigint(12) DEFAULT '0',
  `codwebpaycuota2` bigint(12) DEFAULT '0',
  `codwebpaycuota3` bigint(12) DEFAULT '0',
  `tarjpagoabono` varchar(255) DEFAULT '',
  `tarjpagocuota1` varchar(255) DEFAULT '',
  `tarjpagocuota2` varchar(255) DEFAULT '',
  `tarjpagocuota3` varchar(255) DEFAULT '',
  `carta_demanda` tinyint(1) DEFAULT '0',
  `mail_firmas` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`gestcomddaid`),
  KEY `vtiger_gestcomdda_siniestro_idx` (`siniestro`),
  KEY `vtiger_gestcomdda_nombrecliente_idx` (`nombrecliente`),
  CONSTRAINT `fk_1_vtiger_gestcomddagestcomddaid` FOREIGN KEY (`gestcomddaid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestcomddacf`
--

CREATE TABLE `vtiger_gestcomddacf` (
  `gestcomddaid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`gestcomddaid`),
  CONSTRAINT `fk_1_vtiger_gestcomddacfgestcomddaid` FOREIGN KEY (`gestcomddaid`) REFERENCES `vtiger_gestcomdda` (`gestcomddaid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionadopor`
--

CREATE TABLE `vtiger_gestionadopor` (
  `gestionadoporid` int(11) NOT NULL AUTO_INCREMENT,
  `gestionadopor` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`gestionadoporid`)
) ENGINE=InnoDB AUTO_INCREMENT=49 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionllamada`
--

CREATE TABLE `vtiger_gestionllamada` (
  `gestionllamadaid` int(11) NOT NULL DEFAULT '0',
  `telefono` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `llamada` varchar(255) DEFAULT '',
  `volverllamar` tinyint(1) DEFAULT '0',
  `edoasesoria` varchar(255) DEFAULT '',
  `fvolverllamar` date DEFAULT NULL,
  `hvolverllamar` varchar(255) DEFAULT '',
  `obsllamada` text,
  `nombres` varchar(59) DEFAULT '',
  `apellidos` varchar(59) DEFAULT '',
  `rut` varchar(16) DEFAULT '',
  `serienrodocto` varchar(16) DEFAULT '',
  `email` varchar(100) DEFAULT '',
  `otrotlf` varchar(30) DEFAULT '',
  `otrotlf_extra` varchar(100) DEFAULT NULL,
  `otroemail` varchar(100) DEFAULT '',
  `profesion` varchar(59) DEFAULT '',
  `edocivil` varchar(255) DEFAULT '',
  `obscliente` text,
  `quienrefirio` int(11) unsigned DEFAULT '0',
  `comunadelcliente` varchar(255) DEFAULT '',
  `provinciadelcliente` varchar(255) DEFAULT '',
  `regiondelcliente` varchar(255) DEFAULT '',
  `direccioncaso` text,
  `direccioncliente` text,
  `comunadelcaso` varchar(255) DEFAULT '',
  `provinciadelcaso` varchar(255) DEFAULT '',
  `regiondelcaso` varchar(255) DEFAULT '',
  `nacionalidad` varchar(255) DEFAULT '',
  `provienede` varchar(255) DEFAULT '',
  `telefono2` varchar(24) DEFAULT '',
  `telefono3` varchar(24) DEFAULT '',
  `fnacimiento` date DEFAULT NULL,
  `renta` bigint(24) DEFAULT '0',
  `tiposiniestro` varchar(255) DEFAULT '',
  `tipopropiedad` varchar(255) DEFAULT '',
  `banco` varchar(255) DEFAULT '',
  `ciaseguros` varchar(255) DEFAULT '',
  `mts2` decimal(27,2) DEFAULT NULL,
  `valoruf` bigint(12) DEFAULT '0',
  `diapago` varchar(255) DEFAULT '',
  `nrocaso` varchar(24) DEFAULT '',
  `valorplan` varchar(255) DEFAULT '',
  `metodopago` varchar(255) DEFAULT '',
  `motivorechazo` varchar(255) DEFAULT '',
  `otromotivo` text,
  `enviocorreopres` tinyint(1) DEFAULT '0',
  `fenviocorreopres` date DEFAULT NULL,
  `eliminarbd` tinyint(1) DEFAULT '0',
  `cantllamados` varchar(255) DEFAULT '',
  `resultgestion` varchar(255) DEFAULT '',
  PRIMARY KEY (`gestionllamadaid`),
  KEY `vtiger_gestionllamada_quienrefirio_idx` (`quienrefirio`),
  CONSTRAINT `fk_1_vtiger_gestionllamadagestionllamadaid` FOREIGN KEY (`gestionllamadaid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionllamadacf`
--

CREATE TABLE `vtiger_gestionllamadacf` (
  `gestionllamadaid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`gestionllamadaid`),
  CONSTRAINT `fk_1_vtiger_gestionllamadacfgestionllamadaid` FOREIGN KEY (`gestionllamadaid`) REFERENCES `vtiger_gestionllamada` (`gestionllamadaid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionrrss`
--

CREATE TABLE `vtiger_gestionrrss` (
  `gestionrrssid` int(11) NOT NULL DEFAULT '0',
  `nickname` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `fcontacto` date DEFAULT NULL,
  `canal` varchar(255) DEFAULT '',
  `edocontacto` varchar(255) DEFAULT '',
  `edocaso` varchar(255) DEFAULT '',
  `motivorechazo` varchar(255) DEFAULT '',
  `otro` varchar(24) DEFAULT '',
  `obscontacto` text,
  `obscaso` text,
  `movil` varchar(30) DEFAULT '',
  `movil_extra` varchar(100) DEFAULT NULL,
  `otrotlf` varchar(30) DEFAULT '',
  `otrotlf_extra` varchar(100) DEFAULT NULL,
  `nombres` varchar(24) DEFAULT '',
  `apellidos` varchar(24) DEFAULT '',
  `banco` varchar(255) DEFAULT '',
  `obsventa` text,
  `comunadelcaso` varchar(255) DEFAULT '',
  `provinciadelcaso` varchar(255) DEFAULT '',
  PRIMARY KEY (`gestionrrssid`),
  CONSTRAINT `fk_1_vtiger_gestionrrssgestionrrssid` FOREIGN KEY (`gestionrrssid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionrrss_inventory`
--

CREATE TABLE `vtiger_gestionrrss_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `gestionrrss_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionrrss_invfield`
--

CREATE TABLE `vtiger_gestionrrss_invfield` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `columnname` varchar(30) NOT NULL,
  `label` varchar(50) NOT NULL,
  `invtype` varchar(30) NOT NULL,
  `presence` smallint(1) unsigned NOT NULL DEFAULT '0',
  `defaultvalue` varchar(255) DEFAULT NULL,
  `sequence` int(10) unsigned NOT NULL,
  `block` smallint(1) unsigned NOT NULL,
  `displaytype` smallint(1) unsigned NOT NULL DEFAULT '1',
  `params` text,
  `colspan` smallint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionrrss_invmap`
--

CREATE TABLE `vtiger_gestionrrss_invmap` (
  `module` varchar(50) NOT NULL,
  `field` varchar(50) NOT NULL,
  `tofield` varchar(50) NOT NULL,
  PRIMARY KEY (`module`,`field`,`tofield`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_gestionrrsscf`
--

CREATE TABLE `vtiger_gestionrrsscf` (
  `gestionrrssid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`gestionrrssid`),
  CONSTRAINT `fk_1_vtiger_gestionrrsscfgestionrrssid` FOREIGN KEY (`gestionrrssid`) REFERENCES `vtiger_gestionrrss` (`gestionrrssid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_glacct`
--

CREATE TABLE `vtiger_glacct` (
  `glacctid` int(10) NOT NULL AUTO_INCREMENT,
  `glacct` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`glacctid`),
  UNIQUE KEY `glacct_glacct_idx` (`glacct`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_glacct_seq`
--

CREATE TABLE `vtiger_glacct_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_group2grouprel`
--

CREATE TABLE `vtiger_group2grouprel` (
  `groupid` int(10) NOT NULL,
  `containsgroupid` int(10) unsigned NOT NULL,
  PRIMARY KEY (`groupid`,`containsgroupid`),
  KEY `containsgroupid` (`containsgroupid`),
  KEY `groupid` (`groupid`),
  CONSTRAINT `fk_2_vtiger_group2grouprel` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_group2modules`
--

CREATE TABLE `vtiger_group2modules` (
  `groupid` int(10) NOT NULL,
  `tabid` smallint(5) NOT NULL,
  KEY `groupid` (`groupid`),
  KEY `tabid` (`tabid`),
  CONSTRAINT `vtiger_group2modules_ibfk_1` FOREIGN KEY (`groupid`) REFERENCES `vtiger_groups` (`groupid`) ON DELETE CASCADE,
  CONSTRAINT `vtiger_group2modules_ibfk_2` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_group2role`
--

CREATE TABLE `vtiger_group2role` (
  `groupid` int(10) NOT NULL,
  `roleid` varchar(255) NOT NULL,
  PRIMARY KEY (`groupid`,`roleid`),
  KEY `fk_2_vtiger_group2role` (`roleid`),
  CONSTRAINT `fk_2_vtiger_group2role` FOREIGN KEY (`roleid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_group2rs`
--

CREATE TABLE `vtiger_group2rs` (
  `groupid` int(10) unsigned NOT NULL,
  `roleandsubid` varchar(255) NOT NULL,
  PRIMARY KEY (`groupid`,`roleandsubid`),
  KEY `fk_2_vtiger_group2rs` (`roleandsubid`),
  CONSTRAINT `fk_2_vtiger_group2rs` FOREIGN KEY (`roleandsubid`) REFERENCES `vtiger_role` (`roleid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_groups`
--

CREATE TABLE `vtiger_groups` (
  `groupid` int(10) NOT NULL,
  `groupname` varchar(100) DEFAULT NULL,
  `description` text,
  `color` varchar(25) DEFAULT '#E6FAD8',
  `modules` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`groupid`),
  UNIQUE KEY `groups_groupname_idx` (`groupname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_holidaysentitlement`
--

CREATE TABLE `vtiger_holidaysentitlement` (
  `holidaysentitlementid` int(10) NOT NULL DEFAULT '0',
  `holidaysentitlement_no` varchar(255) DEFAULT NULL,
  `holidaysentitlement_year` varchar(50) DEFAULT NULL,
  `days` int(3) DEFAULT '0',
  `ossemployeesid` int(10) DEFAULT NULL,
  PRIMARY KEY (`holidaysentitlementid`),
  KEY `ossemployeesid` (`ossemployeesid`),
  CONSTRAINT `fk_1_vtiger_holidaysentitlement` FOREIGN KEY (`holidaysentitlementid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_holidaysentitlement_year`
--

CREATE TABLE `vtiger_holidaysentitlement_year` (
  `holidaysentitlement_yearid` int(10) NOT NULL AUTO_INCREMENT,
  `holidaysentitlement_year` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`holidaysentitlement_yearid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_holidaysentitlement_year_seq`
--

CREATE TABLE `vtiger_holidaysentitlement_year_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_holidaysentitlementcf`
--

CREATE TABLE `vtiger_holidaysentitlementcf` (
  `holidaysentitlementid` int(10) NOT NULL,
  PRIMARY KEY (`holidaysentitlementid`),
  CONSTRAINT `fk_1_vtiger_holidaysentitlementcf` FOREIGN KEY (`holidaysentitlementid`) REFERENCES `vtiger_holidaysentitlement` (`holidaysentitlementid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_hour_format`
--

CREATE TABLE `vtiger_hour_format` (
  `hour_formatid` int(10) NOT NULL AUTO_INCREMENT,
  `hour_format` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`hour_formatid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_hour_format_seq`
--

CREATE TABLE `vtiger_hour_format_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_hvolverllamar`
--

CREATE TABLE `vtiger_hvolverllamar` (
  `hvolverllamarid` int(11) NOT NULL AUTO_INCREMENT,
  `hvolverllamar` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`hvolverllamarid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ideas`
--

CREATE TABLE `vtiger_ideas` (
  `ideasid` int(10) NOT NULL DEFAULT '0',
  `ideas_no` varchar(255) DEFAULT NULL,
  `subject` varchar(255) DEFAULT NULL,
  `ideasstatus` varchar(255) DEFAULT '',
  `extent_description` text,
  PRIMARY KEY (`ideasid`),
  CONSTRAINT `fk_1_vtiger_ideas` FOREIGN KEY (`ideasid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ideascf`
--

CREATE TABLE `vtiger_ideascf` (
  `ideasid` int(10) NOT NULL,
  PRIMARY KEY (`ideasid`),
  CONSTRAINT `fk_1_vtiger_ideascf` FOREIGN KEY (`ideasid`) REFERENCES `vtiger_ideas` (`ideasid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ideasstatus`
--

CREATE TABLE `vtiger_ideasstatus` (
  `ideasstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `ideasstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`ideasstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ideasstatus_seq`
--

CREATE TABLE `vtiger_ideasstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_igdn_status`
--

CREATE TABLE `vtiger_igdn_status` (
  `igdn_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `igdn_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`igdn_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_igdnc_status`
--

CREATE TABLE `vtiger_igdnc_status` (
  `igdnc_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `igdnc_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`igdnc_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_igin_status`
--

CREATE TABLE `vtiger_igin_status` (
  `igin_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `igin_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`igin_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_igrn_status`
--

CREATE TABLE `vtiger_igrn_status` (
  `igrn_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `igrn_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`igrn_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_igrnc_status`
--

CREATE TABLE `vtiger_igrnc_status` (
  `igrnc_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `igrnc_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`igrnc_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_iidn_status`
--

CREATE TABLE `vtiger_iidn_status` (
  `iidn_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `iidn_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`iidn_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_import_locks`
--

CREATE TABLE `vtiger_import_locks` (
  `vtiger_import_lock_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userid` int(10) NOT NULL,
  `tabid` smallint(5) NOT NULL,
  `importid` int(10) NOT NULL,
  `locked_since` datetime DEFAULT NULL,
  PRIMARY KEY (`vtiger_import_lock_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_import_maps`
--

CREATE TABLE `vtiger_import_maps` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(36) NOT NULL,
  `module` varchar(36) NOT NULL,
  `content` longblob,
  `has_header` int(1) NOT NULL DEFAULT '1',
  `deleted` int(1) NOT NULL DEFAULT '0',
  `date_entered` timestamp NULL DEFAULT NULL,
  `date_modified` timestamp NULL DEFAULT NULL,
  `assigned_user_id` varchar(36) DEFAULT NULL,
  `is_published` varchar(3) NOT NULL DEFAULT 'no',
  PRIMARY KEY (`id`),
  KEY `import_maps_assigned_user_id_module_name_deleted_idx` (`assigned_user_id`,`module`,`name`,`deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_import_queue`
--

CREATE TABLE `vtiger_import_queue` (
  `importid` int(10) NOT NULL AUTO_INCREMENT,
  `userid` int(10) NOT NULL,
  `tabid` smallint(5) unsigned NOT NULL,
  `field_mapping` text,
  `default_values` text,
  `merge_type` int(10) DEFAULT NULL,
  `merge_fields` text,
  `temp_status` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`importid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_industry`
--

CREATE TABLE `vtiger_industry` (
  `industryid` int(10) NOT NULL AUTO_INCREMENT,
  `industry` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`industryid`),
  UNIQUE KEY `industry_industry_idx` (`industry`)
) ENGINE=InnoDB AUTO_INCREMENT=44 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_industry_seq`
--

CREATE TABLE `vtiger_industry_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_internal_tickets_status`
--

CREATE TABLE `vtiger_internal_tickets_status` (
  `internal_tickets_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `internal_tickets_status` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`internal_tickets_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_inventory_tandc`
--

CREATE TABLE `vtiger_inventory_tandc` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `type` varchar(30) NOT NULL,
  `tandc` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_inventoryproductrel`
--

CREATE TABLE `vtiger_inventoryproductrel` (
  `id` int(10) DEFAULT NULL,
  `productid` int(10) DEFAULT NULL,
  `sequence_no` int(4) DEFAULT NULL,
  `quantity` decimal(25,3) DEFAULT NULL,
  `listprice` decimal(28,8) DEFAULT NULL,
  `discount_percent` decimal(7,3) DEFAULT NULL,
  `discount_amount` decimal(28,8) DEFAULT NULL,
  `comment` varchar(500) DEFAULT NULL,
  `description` text,
  `incrementondel` int(10) NOT NULL DEFAULT '0',
  `lineitem_id` int(10) NOT NULL AUTO_INCREMENT,
  `tax` varchar(10) DEFAULT NULL,
  `tax1` decimal(7,3) DEFAULT NULL,
  `tax2` decimal(7,3) DEFAULT NULL,
  `tax3` decimal(7,3) DEFAULT NULL,
  `purchase` decimal(10,2) DEFAULT NULL,
  `margin` decimal(10,2) DEFAULT NULL,
  `marginp` decimal(10,2) DEFAULT NULL,
  PRIMARY KEY (`lineitem_id`),
  KEY `inventoryproductrel_id_idx` (`id`),
  KEY `inventoryproductrel_productid_idx` (`productid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_inventoryproductrel_seq`
--

CREATE TABLE `vtiger_inventoryproductrel_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_inventorysubproductrel`
--

CREATE TABLE `vtiger_inventorysubproductrel` (
  `id` int(10) NOT NULL,
  `sequence_no` int(10) NOT NULL,
  `productid` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ipreorder_status`
--

CREATE TABLE `vtiger_ipreorder_status` (
  `ipreorder_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `ipreorder_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`ipreorder_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_istdn_status`
--

CREATE TABLE `vtiger_istdn_status` (
  `istdn_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `istdn_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`istdn_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_istn_status`
--

CREATE TABLE `vtiger_istn_status` (
  `istn_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `istn_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`istn_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_istn_type`
--

CREATE TABLE `vtiger_istn_type` (
  `istn_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `istn_type` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`istn_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_istrn_status`
--

CREATE TABLE `vtiger_istrn_status` (
  `istrn_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `istrn_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`istrn_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_knowledgebase_status`
--

CREATE TABLE `vtiger_knowledgebase_status` (
  `knowledgebase_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `knowledgebase_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`knowledgebase_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_knowledgebase_view`
--

CREATE TABLE `vtiger_knowledgebase_view` (
  `knowledgebase_viewid` int(10) NOT NULL AUTO_INCREMENT,
  `knowledgebase_view` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`knowledgebase_viewid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_language`
--

CREATE TABLE `vtiger_language` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `prefix` varchar(10) NOT NULL,
  `label` varchar(30) NOT NULL,
  `lastupdated` datetime DEFAULT NULL,
  `sequence` int(10) DEFAULT NULL,
  `isdefault` tinyint(1) NOT NULL DEFAULT '0',
  `active` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`),
  KEY `prefix` (`prefix`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_language_seq`
--

CREATE TABLE `vtiger_language_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_layout`
--

CREATE TABLE `vtiger_layout` (
  `id` int(10) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `label` varchar(30) DEFAULT NULL,
  `lastupdated` datetime DEFAULT NULL,
  `isdefault` tinyint(1) DEFAULT NULL,
  `active` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lead_view`
--

CREATE TABLE `vtiger_lead_view` (
  `lead_viewid` int(10) NOT NULL AUTO_INCREMENT,
  `lead_view` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`lead_viewid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lead_view_seq`
--

CREATE TABLE `vtiger_lead_view_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadaddress`
--

CREATE TABLE `vtiger_leadaddress` (
  `leadaddressid` int(10) NOT NULL DEFAULT '0',
  `phone` varchar(50) DEFAULT NULL,
  `mobile` varchar(50) DEFAULT NULL,
  `fax` varchar(50) DEFAULT NULL,
  `addresslevel1a` varchar(255) DEFAULT NULL,
  `addresslevel2a` varchar(255) DEFAULT NULL,
  `addresslevel3a` varchar(255) DEFAULT NULL,
  `addresslevel4a` varchar(255) DEFAULT NULL,
  `addresslevel5a` varchar(255) DEFAULT NULL,
  `addresslevel6a` varchar(255) DEFAULT NULL,
  `addresslevel7a` varchar(255) DEFAULT NULL,
  `addresslevel8a` varchar(255) DEFAULT NULL,
  `buildingnumbera` varchar(100) DEFAULT NULL,
  `localnumbera` varchar(100) DEFAULT NULL,
  `poboxa` varchar(50) DEFAULT NULL,
  `phone_extra` varchar(100) DEFAULT NULL,
  `mobile_extra` varchar(100) DEFAULT NULL,
  `fax_extra` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`leadaddressid`),
  CONSTRAINT `fk_1_vtiger_leadaddress` FOREIGN KEY (`leadaddressid`) REFERENCES `vtiger_leaddetails` (`leadid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leaddetails`
--

CREATE TABLE `vtiger_leaddetails` (
  `leadid` int(10) NOT NULL,
  `lead_no` varchar(100) NOT NULL,
  `email` varchar(100) DEFAULT NULL,
  `interest` varchar(50) DEFAULT NULL,
  `firstname` varchar(40) DEFAULT NULL,
  `salutation` varchar(200) DEFAULT NULL,
  `lastname` varchar(80) DEFAULT NULL,
  `company` varchar(100) NOT NULL,
  `annualrevenue` decimal(25,8) DEFAULT NULL,
  `industry` varchar(200) DEFAULT NULL,
  `campaign` varchar(30) DEFAULT NULL,
  `leadstatus` varchar(50) DEFAULT NULL,
  `leadsource` varchar(200) DEFAULT NULL,
  `converted` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `licencekeystatus` varchar(50) DEFAULT NULL,
  `space` varchar(250) DEFAULT NULL,
  `comments` text,
  `priority` varchar(50) DEFAULT NULL,
  `demorequest` varchar(50) DEFAULT NULL,
  `partnercontact` varchar(50) DEFAULT NULL,
  `productversion` varchar(20) DEFAULT NULL,
  `product` varchar(50) DEFAULT NULL,
  `maildate` date DEFAULT NULL,
  `nextstepdate` date DEFAULT NULL,
  `fundingsituation` varchar(50) DEFAULT NULL,
  `purpose` varchar(50) DEFAULT NULL,
  `evaluationstatus` varchar(50) DEFAULT NULL,
  `transferdate` date DEFAULT NULL,
  `revenuetype` varchar(50) DEFAULT NULL,
  `noofemployees` int(50) DEFAULT NULL,
  `secondaryemail` varchar(100) DEFAULT NULL,
  `assignleadchk` int(1) DEFAULT '0',
  `noapprovalcalls` smallint(1) DEFAULT NULL,
  `noapprovalemails` smallint(1) DEFAULT NULL,
  `vat_id` varchar(30) DEFAULT NULL,
  `registration_number_1` varchar(30) DEFAULT NULL,
  `registration_number_2` varchar(30) DEFAULT NULL,
  `verification` text,
  `subindustry` varchar(255) DEFAULT '',
  `atenttion` text,
  `leads_relation` varchar(255) DEFAULT NULL,
  `legal_form` varchar(255) DEFAULT NULL,
  `sum_time` decimal(10,2) DEFAULT '0.00',
  `active` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`leadid`),
  KEY `leaddetails_converted_leadstatus_idx` (`converted`,`leadstatus`),
  KEY `email_idx` (`email`),
  KEY `lastname` (`lastname`),
  KEY `converted` (`converted`),
  CONSTRAINT `fk_1_vtiger_leaddetails` FOREIGN KEY (`leadid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leads_relation`
--

CREATE TABLE `vtiger_leads_relation` (
  `leads_relationid` int(10) NOT NULL AUTO_INCREMENT,
  `leads_relation` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`leads_relationid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leads_relation_seq`
--

CREATE TABLE `vtiger_leads_relation_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadscf`
--

CREATE TABLE `vtiger_leadscf` (
  `leadid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`leadid`),
  CONSTRAINT `fk_1_vtiger_leadscf` FOREIGN KEY (`leadid`) REFERENCES `vtiger_leaddetails` (`leadid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadsource`
--

CREATE TABLE `vtiger_leadsource` (
  `leadsourceid` int(10) NOT NULL AUTO_INCREMENT,
  `leadsource` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`leadsourceid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadsource_seq`
--

CREATE TABLE `vtiger_leadsource_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadstage`
--

CREATE TABLE `vtiger_leadstage` (
  `leadstageid` int(10) NOT NULL AUTO_INCREMENT,
  `stage` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`leadstageid`),
  UNIQUE KEY `leadstage_stage_idx` (`stage`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadstatus`
--

CREATE TABLE `vtiger_leadstatus` (
  `leadstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `leadstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  `color` varchar(25) DEFAULT '#E6FAD8',
  PRIMARY KEY (`leadstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadstatus_seq`
--

CREATE TABLE `vtiger_leadstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_leadsubdetails`
--

CREATE TABLE `vtiger_leadsubdetails` (
  `leadsubscriptionid` int(10) NOT NULL DEFAULT '0',
  `website` varchar(255) DEFAULT NULL,
  `callornot` int(1) DEFAULT '0',
  `readornot` int(1) DEFAULT '0',
  `empct` int(10) DEFAULT '0',
  PRIMARY KEY (`leadsubscriptionid`),
  CONSTRAINT `fk_1_vtiger_leadsubdetails` FOREIGN KEY (`leadsubscriptionid`) REFERENCES `vtiger_leaddetails` (`leadid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_legal_form`
--

CREATE TABLE `vtiger_legal_form` (
  `legal_formid` int(10) NOT NULL AUTO_INCREMENT,
  `legal_form` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`legal_formid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_legal_form_seq`
--

CREATE TABLE `vtiger_legal_form_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lettersin`
--

CREATE TABLE `vtiger_lettersin` (
  `lettersinid` int(10) NOT NULL DEFAULT '0',
  `number` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `relatedid` int(10) DEFAULT NULL,
  `person_receiving` int(10) DEFAULT NULL,
  `parentid` int(10) DEFAULT NULL,
  `date_adoption` date DEFAULT NULL,
  `lin_type_ship` varchar(255) DEFAULT '',
  `lin_type_doc` text,
  `lin_status` varchar(255) DEFAULT '',
  `deadline_reply` date DEFAULT NULL,
  `cocument_no` varchar(100) DEFAULT '',
  `no_internal` varchar(100) DEFAULT '',
  `lin_dimensions` varchar(255) DEFAULT '',
  `custom_sender` varchar(255) DEFAULT NULL,
  `lin_type` varchar(255) DEFAULT NULL,
  `cash_amount_on_delivery` decimal(25,8) DEFAULT NULL,
  `date_of_receipt` date DEFAULT NULL,
  `outgoing_correspondence` int(10) DEFAULT NULL,
  PRIMARY KEY (`lettersinid`),
  KEY `vtiger_lettersin_outgoing_correspondence_idx` (`outgoing_correspondence`),
  CONSTRAINT `fk_1_vtiger_lettersin` FOREIGN KEY (`lettersinid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lettersincf`
--

CREATE TABLE `vtiger_lettersincf` (
  `lettersinid` int(10) NOT NULL,
  `internal_notes` text,
  `public_notes` text,
  PRIMARY KEY (`lettersinid`),
  CONSTRAINT `fk_1_vtiger_lettersincf` FOREIGN KEY (`lettersinid`) REFERENCES `vtiger_lettersin` (`lettersinid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lettersout`
--

CREATE TABLE `vtiger_lettersout` (
  `lettersoutid` int(10) NOT NULL DEFAULT '0',
  `number` varchar(255) DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `relatedid` int(10) DEFAULT NULL,
  `person_receiving` int(10) DEFAULT NULL,
  `parentid` int(10) DEFAULT NULL,
  `date_adoption` date DEFAULT NULL,
  `lout_type_ship` varchar(255) DEFAULT '',
  `lout_type_doc` text,
  `lout_status` varchar(255) DEFAULT '',
  `deadline_reply` date DEFAULT NULL,
  `cocument_no` varchar(100) DEFAULT '',
  `no_internal` varchar(100) DEFAULT '',
  `lout_dimensions` varchar(255) DEFAULT '',
  `incoming_correspondence` int(10) DEFAULT NULL,
  PRIMARY KEY (`lettersoutid`),
  KEY `vtiger_lettersout_incoming_correspondence_idx` (`incoming_correspondence`),
  CONSTRAINT `fk_1_vtiger_lettersout` FOREIGN KEY (`lettersoutid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lettersoutcf`
--

CREATE TABLE `vtiger_lettersoutcf` (
  `lettersoutid` int(10) NOT NULL,
  PRIMARY KEY (`lettersoutid`),
  CONSTRAINT `fk_1_vtiger_lettersoutcf` FOREIGN KEY (`lettersoutid`) REFERENCES `vtiger_lettersout` (`lettersoutid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_dimensions`
--

CREATE TABLE `vtiger_lin_dimensions` (
  `lin_dimensionsid` int(10) NOT NULL AUTO_INCREMENT,
  `lin_dimensions` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`lin_dimensionsid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_dimensions_seq`
--

CREATE TABLE `vtiger_lin_dimensions_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_status`
--

CREATE TABLE `vtiger_lin_status` (
  `lin_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `lin_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`lin_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_status_seq`
--

CREATE TABLE `vtiger_lin_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_type`
--

CREATE TABLE `vtiger_lin_type` (
  `lin_typeid` int(11) NOT NULL AUTO_INCREMENT,
  `lin_type` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`lin_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_type_doc`
--

CREATE TABLE `vtiger_lin_type_doc` (
  `lin_type_docid` int(10) NOT NULL AUTO_INCREMENT,
  `lin_type_doc` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`lin_type_docid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_type_doc_seq`
--

CREATE TABLE `vtiger_lin_type_doc_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_type_ship`
--

CREATE TABLE `vtiger_lin_type_ship` (
  `lin_type_shipid` int(10) NOT NULL AUTO_INCREMENT,
  `lin_type_ship` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`lin_type_shipid`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lin_type_ship_seq`
--

CREATE TABLE `vtiger_lin_type_ship_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_links`
--

CREATE TABLE `vtiger_links` (
  `linkid` int(10) NOT NULL AUTO_INCREMENT,
  `tabid` smallint(5) DEFAULT NULL,
  `linktype` varchar(50) DEFAULT NULL,
  `linklabel` varchar(50) DEFAULT NULL,
  `linkurl` varchar(255) DEFAULT NULL,
  `linkicon` varchar(100) DEFAULT NULL,
  `sequence` int(10) DEFAULT NULL,
  `handler_path` varchar(128) DEFAULT NULL,
  `handler_class` varchar(50) DEFAULT NULL,
  `handler` varchar(50) DEFAULT NULL,
  `params` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`linkid`),
  KEY `link_tabidtype_idx` (`tabid`,`linktype`),
  KEY `linklabel` (`linklabel`),
  KEY `linkid` (`linkid`,`tabid`,`linktype`,`linklabel`),
  KEY `linktype` (`linktype`)
) ENGINE=InnoDB AUTO_INCREMENT=316 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_listaprueba`
--

CREATE TABLE `vtiger_listaprueba` (
  `listapruebaid` int(11) NOT NULL AUTO_INCREMENT,
  `listaprueba` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`listapruebaid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_llamada`
--

CREATE TABLE `vtiger_llamada` (
  `llamadaid` int(11) NOT NULL AUTO_INCREMENT,
  `llamada` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`llamadaid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_loginhistory`
--

CREATE TABLE `vtiger_loginhistory` (
  `login_id` int(10) NOT NULL AUTO_INCREMENT,
  `user_name` varchar(32) DEFAULT NULL,
  `user_ip` varchar(100) NOT NULL,
  `logout_time` timestamp NULL DEFAULT NULL,
  `login_time` timestamp NULL DEFAULT NULL,
  `status` varchar(25) DEFAULT NULL,
  `browser` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`login_id`),
  KEY `user_name` (`user_name`),
  KEY `user_ip` (`user_ip`,`login_time`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=33966 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_dimensions`
--

CREATE TABLE `vtiger_lout_dimensions` (
  `lout_dimensionsid` int(10) NOT NULL AUTO_INCREMENT,
  `lout_dimensions` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`lout_dimensionsid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_dimensions_seq`
--

CREATE TABLE `vtiger_lout_dimensions_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_status`
--

CREATE TABLE `vtiger_lout_status` (
  `lout_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `lout_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`lout_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_status_seq`
--

CREATE TABLE `vtiger_lout_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_type_doc`
--

CREATE TABLE `vtiger_lout_type_doc` (
  `lout_type_docid` int(10) NOT NULL AUTO_INCREMENT,
  `lout_type_doc` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`lout_type_docid`)
) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_type_doc_seq`
--

CREATE TABLE `vtiger_lout_type_doc_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_type_ship`
--

CREATE TABLE `vtiger_lout_type_ship` (
  `lout_type_shipid` int(10) NOT NULL AUTO_INCREMENT,
  `lout_type_ship` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`lout_type_shipid`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lout_type_ship_seq`
--

CREATE TABLE `vtiger_lout_type_ship_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_lugarsismo`
--

CREATE TABLE `vtiger_lugarsismo` (
  `lugarsismoid` int(11) NOT NULL AUTO_INCREMENT,
  `lugarsismo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`lugarsismoid`)
) ENGINE=InnoDB AUTO_INCREMENT=114 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_mail_accounts`
--

CREATE TABLE `vtiger_mail_accounts` (
  `account_id` int(10) NOT NULL,
  `user_id` int(10) NOT NULL,
  `display_name` varchar(50) DEFAULT NULL,
  `mail_id` varchar(50) DEFAULT NULL,
  `account_name` varchar(50) DEFAULT NULL,
  `mail_protocol` varchar(20) DEFAULT NULL,
  `mail_username` varchar(50) NOT NULL,
  `mail_password` varchar(250) NOT NULL,
  `mail_servername` varchar(50) DEFAULT NULL,
  `box_refresh` int(10) DEFAULT NULL,
  `mails_per_page` int(10) DEFAULT NULL,
  `ssltype` varchar(50) DEFAULT NULL,
  `sslmeth` varchar(50) DEFAULT NULL,
  `int_mailer` int(1) DEFAULT '0',
  `status` varchar(10) DEFAULT NULL,
  `set_default` int(2) DEFAULT NULL,
  `sent_folder` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`account_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_manufacturer`
--

CREATE TABLE `vtiger_manufacturer` (
  `manufacturerid` int(10) NOT NULL AUTO_INCREMENT,
  `manufacturer` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT NULL,
  PRIMARY KEY (`manufacturerid`),
  UNIQUE KEY `manufacturer_manufacturer_idx` (`manufacturer`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_manufacturer_seq`
--

CREATE TABLE `vtiger_manufacturer_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_marca`
--

CREATE TABLE `vtiger_marca` (
  `marcaid` int(11) NOT NULL AUTO_INCREMENT,
  `marca` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`marcaid`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_mesasignacion`
--

CREATE TABLE `vtiger_mesasignacion` (
  `mesasignacionid` int(11) NOT NULL AUTO_INCREMENT,
  `mesasignacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`mesasignacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_metodopago`
--

CREATE TABLE `vtiger_metodopago` (
  `metodopagoid` int(11) NOT NULL AUTO_INCREMENT,
  `metodopago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`metodopagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modcomments`
--

CREATE TABLE `vtiger_modcomments` (
  `modcommentsid` int(10) NOT NULL,
  `commentcontent` text,
  `related_to` int(10) DEFAULT NULL,
  `parent_comments` int(10) DEFAULT NULL,
  `customer` varchar(100) DEFAULT NULL,
  `userid` int(10) DEFAULT NULL,
  `reasontoedit` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`modcommentsid`),
  KEY `relatedto_idx` (`related_to`),
  KEY `modcommentsid` (`modcommentsid`),
  KEY `parent_comments` (`parent_comments`),
  KEY `userid` (`userid`),
  KEY `related_to` (`related_to`,`parent_comments`),
  CONSTRAINT `vtiger_modcomments_ibfk_1` FOREIGN KEY (`related_to`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modcommentscf`
--

CREATE TABLE `vtiger_modcommentscf` (
  `modcommentsid` int(10) NOT NULL,
  PRIMARY KEY (`modcommentsid`),
  CONSTRAINT `vtiger_modcommentscf_ibfk_1` FOREIGN KEY (`modcommentsid`) REFERENCES `vtiger_modcomments` (`modcommentsid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modentity_num`
--

CREATE TABLE `vtiger_modentity_num` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `tabid` smallint(5) unsigned NOT NULL,
  `prefix` varchar(50) NOT NULL DEFAULT '',
  `postfix` varchar(50) NOT NULL DEFAULT '',
  `start_id` int(10) unsigned NOT NULL,
  `cur_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `semodule` (`cur_id`),
  KEY `prefix` (`prefix`,`postfix`,`cur_id`),
  KEY `tabid` (`tabid`),
  KEY `tabid_2` (`tabid`,`cur_id`)
) ENGINE=InnoDB AUTO_INCREMENT=110 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modtracker_basic`
--

CREATE TABLE `vtiger_modtracker_basic` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `crmid` int(10) DEFAULT NULL,
  `module` varchar(50) DEFAULT NULL,
  `whodid` int(10) DEFAULT NULL,
  `changedon` datetime DEFAULT NULL,
  `status` int(1) DEFAULT '0',
  `last_reviewed_users` varchar(255) DEFAULT '',
  PRIMARY KEY (`id`),
  KEY `crmidx` (`crmid`),
  KEY `idx` (`id`),
  KEY `id` (`id`,`module`,`changedon`),
  KEY `crmid` (`crmid`,`changedon`)
) ENGINE=InnoDB AUTO_INCREMENT=187991714 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modtracker_detail`
--

CREATE TABLE `vtiger_modtracker_detail` (
  `id` int(10) DEFAULT NULL,
  `fieldname` varchar(100) DEFAULT NULL,
  `prevalue` text,
  `postvalue` text,
  KEY `idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modtracker_relations`
--

CREATE TABLE `vtiger_modtracker_relations` (
  `id` int(10) NOT NULL,
  `targetmodule` varchar(100) NOT NULL,
  `targetid` int(10) NOT NULL,
  `changedon` datetime DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_modtracker_tabs`
--

CREATE TABLE `vtiger_modtracker_tabs` (
  `tabid` smallint(5) unsigned NOT NULL,
  `visible` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`tabid`),
  KEY `tabid` (`tabid`,`visible`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_module_dashboard`
--

CREATE TABLE `vtiger_module_dashboard` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `blockid` int(10) NOT NULL,
  `linkid` int(10) DEFAULT NULL,
  `filterid` varchar(100) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `data` text,
  `size` varchar(50) DEFAULT NULL,
  `limit` tinyint(2) DEFAULT NULL,
  `isdefault` tinyint(1) NOT NULL DEFAULT '0',
  `owners` varchar(100) DEFAULT NULL,
  `cache` tinyint(1) DEFAULT '0',
  `date` varchar(20) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vtiger_module_dashboard_ibfk_1` (`blockid`)
) ENGINE=InnoDB AUTO_INCREMENT=1351 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_module_dashboard_blocks`
--

CREATE TABLE `vtiger_module_dashboard_blocks` (
  `id` int(100) unsigned NOT NULL AUTO_INCREMENT,
  `authorized` varchar(10) NOT NULL,
  `tabid` smallint(5) unsigned NOT NULL,
  `dashboard_id` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `authorized` (`authorized`,`tabid`),
  KEY `tabid` (`tabid`)
) ENGINE=InnoDB AUTO_INCREMENT=88 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_module_dashboard_widgets`
--

CREATE TABLE `vtiger_module_dashboard_widgets` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `linkid` int(10) NOT NULL,
  `userid` int(10) DEFAULT NULL,
  `templateid` int(10) NOT NULL,
  `filterid` varchar(100) DEFAULT NULL,
  `title` varchar(100) DEFAULT NULL,
  `data` text,
  `size` varchar(50) DEFAULT NULL,
  `limit` tinyint(2) DEFAULT NULL,
  `position` varchar(50) DEFAULT NULL,
  `isdefault` tinyint(1) DEFAULT '0',
  `active` tinyint(1) DEFAULT '0',
  `owners` varchar(100) DEFAULT NULL,
  `module` int(10) DEFAULT '0',
  `cache` tinyint(1) DEFAULT '0',
  `date` varchar(20) DEFAULT NULL,
  `dashboardid` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `vtiger_module_dashboard_widgets_ibfk_1` (`templateid`),
  KEY `userid` (`userid`,`active`,`module`),
  CONSTRAINT `vtiger_module_dashboard_widgets_ibfk_1` FOREIGN KEY (`templateid`) REFERENCES `vtiger_module_dashboard` (`id`) ON DELETE CASCADE
) ENGINE=InnoDB AUTO_INCREMENT=7469 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_motivonoleinteresa`
--

CREATE TABLE `vtiger_motivonoleinteresa` (
  `motivonoleinteresaid` int(11) NOT NULL AUTO_INCREMENT,
  `motivonoleinteresa` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`motivonoleinteresaid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_motivorechazo`
--

CREATE TABLE `vtiger_motivorechazo` (
  `motivorechazoid` int(11) NOT NULL AUTO_INCREMENT,
  `motivorechazo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`motivorechazoid`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_motivorechazovtadda`
--

CREATE TABLE `vtiger_motivorechazovtadda` (
  `motivorechazovtaddaid` int(11) NOT NULL AUTO_INCREMENT,
  `motivorechazovtadda` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`motivorechazovtaddaid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_mulcomp_status`
--

CREATE TABLE `vtiger_mulcomp_status` (
  `mulcomp_statusid` int(11) NOT NULL AUTO_INCREMENT,
  `mulcomp_status` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`mulcomp_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nacionalidad`
--

CREATE TABLE `vtiger_nacionalidad` (
  `nacionalidadid` int(11) NOT NULL AUTO_INCREMENT,
  `nacionalidad` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nacionalidadid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_no_of_currency_decimals`
--

CREATE TABLE `vtiger_no_of_currency_decimals` (
  `no_of_currency_decimalsid` int(10) NOT NULL AUTO_INCREMENT,
  `no_of_currency_decimals` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`no_of_currency_decimalsid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_no_of_currency_decimals_seq`
--

CREATE TABLE `vtiger_no_of_currency_decimals_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nombrereceptor`
--

CREATE TABLE `vtiger_nombrereceptor` (
  `nombrereceptorid` int(11) NOT NULL AUTO_INCREMENT,
  `nombrereceptor` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nombrereceptorid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nombrereceptord`
--

CREATE TABLE `vtiger_nombrereceptord` (
  `nombrereceptordid` int(11) NOT NULL AUTO_INCREMENT,
  `nombrereceptord` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nombrereceptordid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_notebook_contents`
--

CREATE TABLE `vtiger_notebook_contents` (
  `userid` int(10) NOT NULL,
  `notebookid` int(10) NOT NULL,
  `contents` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_notes`
--

CREATE TABLE `vtiger_notes` (
  `notesid` int(10) NOT NULL DEFAULT '0',
  `note_no` varchar(100) NOT NULL,
  `title` varchar(200) NOT NULL,
  `filename` varchar(200) DEFAULT NULL,
  `notecontent` text,
  `folderid` varchar(255) DEFAULT NULL,
  `filetype` varchar(100) DEFAULT NULL,
  `filelocationtype` varchar(5) DEFAULT NULL,
  `filedownloadcount` int(10) DEFAULT NULL,
  `filestatus` smallint(1) DEFAULT NULL,
  `filesize` int(10) NOT NULL DEFAULT '0',
  `fileversion` varchar(50) DEFAULT NULL,
  `ossdc_status` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`notesid`),
  KEY `notes_title_idx` (`title`),
  KEY `notes_notesid_idx` (`notesid`),
  CONSTRAINT `fk_1_vtiger_notes` FOREIGN KEY (`notesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_notescf`
--

CREATE TABLE `vtiger_notescf` (
  `notesid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`notesid`),
  CONSTRAINT `vtiger_notescf_ibfk_1` FOREIGN KEY (`notesid`) REFERENCES `vtiger_notes` (`notesid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_notification_status`
--

CREATE TABLE `vtiger_notification_status` (
  `notification_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `notification_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`notification_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_notification_type`
--

CREATE TABLE `vtiger_notification_type` (
  `notification_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `notification_type` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`notification_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nreprelegal`
--

CREATE TABLE `vtiger_nreprelegal` (
  `nreprelegalid` int(11) NOT NULL AUTO_INCREMENT,
  `nreprelegal` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nreprelegalid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nrocuotas`
--

CREATE TABLE `vtiger_nrocuotas` (
  `nrocuotasid` int(11) NOT NULL AUTO_INCREMENT,
  `nrocuotas` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nrocuotasid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nrocuotasgd`
--

CREATE TABLE `vtiger_nrocuotasgd` (
  `nrocuotasgdid` int(11) NOT NULL AUTO_INCREMENT,
  `nrocuotasgd` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nrocuotasgdid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nroreprogramacion`
--

CREATE TABLE `vtiger_nroreprogramacion` (
  `nroreprogramacionid` int(11) NOT NULL AUTO_INCREMENT,
  `nroreprogramacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nroreprogramacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_nuevousado`
--

CREATE TABLE `vtiger_nuevousado` (
  `nuevousadoid` int(11) NOT NULL AUTO_INCREMENT,
  `nuevousado` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`nuevousadoid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_objconcob`
--

CREATE TABLE `vtiger_objconcob` (
  `objconcobid` int(11) NOT NULL AUTO_INCREMENT,
  `objconcob` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`objconcobid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_objconcob2`
--

CREATE TABLE `vtiger_objconcob2` (
  `objconcob2id` int(11) NOT NULL AUTO_INCREMENT,
  `objconcob2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`objconcob2id`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_objsincobmix`
--

CREATE TABLE `vtiger_objsincobmix` (
  `objsincobmixid` int(11) NOT NULL AUTO_INCREMENT,
  `objsincobmix` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`objsincobmixid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_objsincobmix2`
--

CREATE TABLE `vtiger_objsincobmix2` (
  `objsincobmix2id` int(11) NOT NULL AUTO_INCREMENT,
  `objsincobmix2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`objsincobmix2id`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_objsincobpur`
--

CREATE TABLE `vtiger_objsincobpur` (
  `objsincobpurid` int(11) NOT NULL AUTO_INCREMENT,
  `objsincobpur` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`objsincobpurid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_objsincobpur2`
--

CREATE TABLE `vtiger_objsincobpur2` (
  `objsincobpur2id` int(11) NOT NULL AUTO_INCREMENT,
  `objsincobpur2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`objsincobpur2id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ofcaptador`
--

CREATE TABLE `vtiger_ofcaptador` (
  `ofcaptadorid` int(11) NOT NULL AUTO_INCREMENT,
  `ofcaptador` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`ofcaptadorid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_opportunitystage`
--

CREATE TABLE `vtiger_opportunitystage` (
  `potstageid` int(10) NOT NULL AUTO_INCREMENT,
  `stage` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  `probability` decimal(3,2) DEFAULT '0.00',
  PRIMARY KEY (`potstageid`),
  UNIQUE KEY `opportunitystage_stage_idx` (`stage`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_oproductstatus`
--

CREATE TABLE `vtiger_oproductstatus` (
  `oproductstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `oproductstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`oproductstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_oproductstatus_seq`
--

CREATE TABLE `vtiger_oproductstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_org_share_action2tab`
--

CREATE TABLE `vtiger_org_share_action2tab` (
  `share_action_id` int(10) NOT NULL,
  `tabid` smallint(5) NOT NULL,
  PRIMARY KEY (`share_action_id`,`tabid`),
  KEY `fk_2_vtiger_org_share_action2tab` (`tabid`),
  CONSTRAINT `fk_2_vtiger_org_share_action2tab` FOREIGN KEY (`tabid`) REFERENCES `vtiger_tab` (`tabid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_org_share_action_mapping`
--

CREATE TABLE `vtiger_org_share_action_mapping` (
  `share_action_id` int(10) NOT NULL,
  `share_action_name` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`share_action_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossdc_status`
--

CREATE TABLE `vtiger_ossdc_status` (
  `ossdc_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `ossdc_status` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`ossdc_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossdc_status_seq`
--

CREATE TABLE `vtiger_ossdc_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossemployees`
--

CREATE TABLE `vtiger_ossemployees` (
  `ossemployeesid` int(10) NOT NULL DEFAULT '0',
  `ossemployees_no` varchar(255) DEFAULT NULL,
  `parentid` int(10) DEFAULT '0',
  `employee_status` varchar(200) DEFAULT NULL,
  `name` varchar(200) DEFAULT NULL,
  `last_name` varchar(200) DEFAULT NULL,
  `pesel` varchar(20) DEFAULT NULL,
  `id_card` varchar(200) DEFAULT NULL,
  `employee_education` varchar(200) DEFAULT NULL,
  `birth_date` date DEFAULT NULL,
  `business_phone` varchar(20) DEFAULT NULL,
  `private_phone` varchar(25) DEFAULT NULL,
  `business_mail` varchar(100) DEFAULT NULL,
  `private_mail` varchar(100) DEFAULT NULL,
  `street` varchar(200) DEFAULT NULL,
  `code` varchar(200) DEFAULT NULL,
  `city` varchar(200) DEFAULT NULL,
  `state` varchar(200) DEFAULT NULL,
  `country` varchar(200) DEFAULT NULL,
  `ship_street` varchar(200) DEFAULT NULL,
  `ship_code` varchar(200) DEFAULT NULL,
  `ship_city` varchar(200) DEFAULT NULL,
  `ship_state` varchar(200) DEFAULT NULL,
  `ship_country` varchar(200) DEFAULT NULL,
  `dav_status` tinyint(1) DEFAULT '1',
  `sum_time` decimal(10,2) DEFAULT '0.00',
  `secondary_phone` varchar(25) DEFAULT NULL,
  `position` varchar(255) DEFAULT NULL,
  `rbh` decimal(25,8) DEFAULT NULL,
  `business_phone_extra` varchar(100) DEFAULT NULL,
  `private_phone_extra` varchar(100) DEFAULT NULL,
  `secondary_phone_extra` varchar(100) DEFAULT NULL,
  `rut` varchar(32) DEFAULT '',
  `nacionalidad` varchar(255) DEFAULT '',
  `edocivil` varchar(255) DEFAULT '',
  `extension` bigint(32) DEFAULT '0',
  `jefedirecto` int(11) unsigned DEFAULT '0',
  `fingreso` date DEFAULT NULL,
  `tipocontrato` varchar(255) DEFAULT '',
  `bancoempleado` varchar(255) DEFAULT '',
  `tipocuenta` varchar(255) DEFAULT '',
  `nrocuenta` varchar(64) DEFAULT '',
  `prevision` varchar(255) DEFAULT '',
  `sueldoliquido` bigint(64) DEFAULT '0',
  `afp` varchar(255) DEFAULT '',
  `comuna` varchar(255) DEFAULT '',
  `provincia` varchar(255) DEFAULT '',
  `region` varchar(255) DEFAULT '',
  `seriedocumento` varchar(64) DEFAULT '',
  `departamento` text,
  `pasaporte` varchar(59) DEFAULT '',
  PRIMARY KEY (`ossemployeesid`),
  KEY `vtiger_ossemployees_jefedirecto_idx` (`jefedirecto`),
  CONSTRAINT `fk_1_vtiger_ossemployees` FOREIGN KEY (`ossemployeesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossemployeescf`
--

CREATE TABLE `vtiger_ossemployeescf` (
  `ossemployeesid` int(10) NOT NULL,
  PRIMARY KEY (`ossemployeesid`),
  CONSTRAINT `fk_1_vtiger_ossemployeescf` FOREIGN KEY (`ossemployeesid`) REFERENCES `vtiger_ossemployees` (`ossemployeesid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osservicesstatus`
--

CREATE TABLE `vtiger_osservicesstatus` (
  `osservicesstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `osservicesstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`osservicesstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osservicesstatus_seq`
--

CREATE TABLE `vtiger_osservicesstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmails_logs`
--

CREATE TABLE `vtiger_ossmails_logs` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `start_time` timestamp NULL DEFAULT NULL,
  `end_time` timestamp NULL DEFAULT NULL,
  `action` varchar(100) DEFAULT NULL,
  `status` tinyint(3) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `count` int(10) DEFAULT NULL,
  `stop_user` varchar(100) DEFAULT NULL,
  `info` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailscanner_config`
--

CREATE TABLE `vtiger_ossmailscanner_config` (
  `conf_type` varchar(100) NOT NULL,
  `parameter` varchar(100) DEFAULT NULL,
  `value` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailscanner_folders_uid`
--

CREATE TABLE `vtiger_ossmailscanner_folders_uid` (
  `user_id` int(10) unsigned DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `folder` varchar(100) DEFAULT NULL,
  `uid` int(10) DEFAULT '0',
  KEY `user_id` (`user_id`),
  KEY `folder` (`folder`),
  CONSTRAINT `vtiger_ossmailscanner_folders_uid_ibfk_1` FOREIGN KEY (`user_id`) REFERENCES `roundcube_users` (`user_id`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailscanner_log_cron`
--

CREATE TABLE `vtiger_ossmailscanner_log_cron` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `created_time` timestamp NULL DEFAULT NULL,
  `laststart` int(10) unsigned DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailview`
--

CREATE TABLE `vtiger_ossmailview` (
  `ossmailviewid` int(10) NOT NULL,
  `ossmailview_no` varchar(50) DEFAULT NULL,
  `from_email` text,
  `to_email` text,
  `subject` text,
  `content` text,
  `cc_email` text,
  `bcc_email` text,
  `id` int(10) DEFAULT NULL,
  `mbox` varchar(100) DEFAULT NULL,
  `uid` varchar(150) DEFAULT NULL,
  `cid` char(40) DEFAULT NULL,
  `rc_user` varchar(3) DEFAULT NULL,
  `reply_to_email` text,
  `ossmailview_sendtype` varchar(30) DEFAULT NULL,
  `attachments_exist` smallint(1) DEFAULT '0',
  `type` tinyint(1) DEFAULT NULL,
  `from_id` varchar(50) NOT NULL,
  `to_id` varchar(100) NOT NULL,
  `orginal_mail` text,
  `verify` smallint(1) DEFAULT '0',
  `rel_mod` varchar(128) DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  PRIMARY KEY (`ossmailviewid`),
  KEY `id` (`id`),
  KEY `verify` (`verify`),
  KEY `message_id` (`uid`,`rc_user`),
  KEY `mbox` (`mbox`),
  KEY `ossmailview_cid_idx` (`cid`),
  CONSTRAINT `fk_1_vtiger_ossmailview` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailview_files`
--

CREATE TABLE `vtiger_ossmailview_files` (
  `ossmailviewid` int(10) NOT NULL,
  `documentsid` int(10) NOT NULL,
  `attachmentsid` int(10) NOT NULL,
  KEY `fk_1_vtiger_ossmailview_files` (`ossmailviewid`),
  KEY `documentsid` (`documentsid`),
  CONSTRAINT `fk_1_vtiger_ossmailview_files` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_ossmailview` (`ossmailviewid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailview_relation`
--

CREATE TABLE `vtiger_ossmailview_relation` (
  `ossmailviewid` int(10) NOT NULL,
  `crmid` int(10) NOT NULL,
  `date` datetime DEFAULT NULL,
  `deleted` tinyint(1) DEFAULT '0',
  UNIQUE KEY `ossmailviewid_2` (`ossmailviewid`,`crmid`),
  KEY `ossmailviewid` (`ossmailviewid`),
  KEY `crmid` (`crmid`,`deleted`),
  CONSTRAINT `vtiger_ossmailview_relation_ibfk_1` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_ossmailview` (`ossmailviewid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailview_sendtype`
--

CREATE TABLE `vtiger_ossmailview_sendtype` (
  `ossmailview_sendtypeid` int(10) NOT NULL AUTO_INCREMENT,
  `ossmailview_sendtype` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`ossmailview_sendtypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailview_sendtype_seq`
--

CREATE TABLE `vtiger_ossmailview_sendtype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossmailviewcf`
--

CREATE TABLE `vtiger_ossmailviewcf` (
  `ossmailviewid` int(10) NOT NULL,
  PRIMARY KEY (`ossmailviewid`),
  CONSTRAINT `fk_1_vtiger_ossmailviewcf` FOREIGN KEY (`ossmailviewid`) REFERENCES `vtiger_ossmailview` (`ossmailviewid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossoutsourcedservices`
--

CREATE TABLE `vtiger_ossoutsourcedservices` (
  `ossoutsourcedservicesid` int(10) NOT NULL DEFAULT '0',
  `ossoutsourcedservices_no` varchar(255) DEFAULT NULL,
  `productname` varchar(100) DEFAULT '',
  `osservicesstatus` varchar(50) DEFAULT NULL,
  `pscategory` varchar(255) DEFAULT NULL,
  `datesold` date DEFAULT NULL,
  `dateinservice` date DEFAULT NULL,
  `wherebought` varchar(100) DEFAULT '',
  `parent_id` int(10) DEFAULT NULL,
  `ssalesprocessesid` int(10) DEFAULT NULL,
  PRIMARY KEY (`ossoutsourcedservicesid`),
  KEY `parent_id` (`parent_id`),
  KEY `ssalesprocessesid` (`ssalesprocessesid`),
  CONSTRAINT `fk_1_vtiger_ossoutsourcedservices` FOREIGN KEY (`ossoutsourcedservicesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_ossoutsourcedservicescf`
--

CREATE TABLE `vtiger_ossoutsourcedservicescf` (
  `ossoutsourcedservicesid` int(10) NOT NULL,
  PRIMARY KEY (`ossoutsourcedservicesid`),
  CONSTRAINT `fk_1_vtiger_ossoutsourcedservicescf` FOREIGN KEY (`ossoutsourcedservicesid`) REFERENCES `vtiger_ossoutsourcedservices` (`ossoutsourcedservicesid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osspasswords`
--

CREATE TABLE `vtiger_osspasswords` (
  `osspasswordsid` int(10) NOT NULL,
  `osspassword_no` varchar(100) NOT NULL,
  `passwordname` varchar(100) NOT NULL,
  `username` varchar(100) NOT NULL,
  `password` varbinary(200) NOT NULL,
  `link_adres` varchar(255) DEFAULT NULL,
  `linkto` int(10) DEFAULT NULL,
  `linkextend` int(10) DEFAULT NULL,
  PRIMARY KEY (`osspasswordsid`),
  KEY `linkto` (`linkto`),
  KEY `linkextend` (`linkextend`),
  CONSTRAINT `fk_1_vtiger_osspasswords` FOREIGN KEY (`osspasswordsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osspasswordscf`
--

CREATE TABLE `vtiger_osspasswordscf` (
  `osspasswordsid` int(10) NOT NULL,
  PRIMARY KEY (`osspasswordsid`),
  CONSTRAINT `fk_1_vtiger_osspasswordscf` FOREIGN KEY (`osspasswordsid`) REFERENCES `vtiger_osspasswords` (`osspasswordsid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osssoldservices`
--

CREATE TABLE `vtiger_osssoldservices` (
  `osssoldservicesid` int(10) NOT NULL DEFAULT '0',
  `osssoldservices_no` varchar(255) DEFAULT NULL,
  `productname` varchar(255) DEFAULT '',
  `ssservicesstatus` varchar(255) DEFAULT NULL,
  `pscategory` varchar(255) DEFAULT '',
  `datesold` date DEFAULT NULL,
  `dateinservice` date DEFAULT NULL,
  `invoice` varchar(255) DEFAULT '',
  `parent_id` int(10) DEFAULT NULL,
  `serviceid` int(10) DEFAULT NULL,
  `ordertime` decimal(10,2) DEFAULT NULL,
  `ssalesprocessesid` int(10) DEFAULT NULL,
  `osssoldservices_renew` varchar(255) DEFAULT NULL,
  `renewalinvoice` int(10) DEFAULT NULL,
  `contactid` int(19) DEFAULT NULL,
  PRIMARY KEY (`osssoldservicesid`),
  KEY `parent_id` (`parent_id`),
  KEY `serviceid` (`serviceid`),
  KEY `ssalesprocessesid` (`ssalesprocessesid`),
  KEY `renewalinvoice` (`renewalinvoice`),
  KEY `contactid_idx` (`contactid`),
  CONSTRAINT `fk_1_vtiger_osssoldservices` FOREIGN KEY (`osssoldservicesid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osssoldservices_renew`
--

CREATE TABLE `vtiger_osssoldservices_renew` (
  `osssoldservices_renewid` int(10) NOT NULL AUTO_INCREMENT,
  `osssoldservices_renew` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`osssoldservices_renewid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osssoldservicescf`
--

CREATE TABLE `vtiger_osssoldservicescf` (
  `osssoldservicesid` int(10) NOT NULL,
  PRIMARY KEY (`osssoldservicesid`),
  CONSTRAINT `fk_1_vtiger_osssoldservicescf` FOREIGN KEY (`osssoldservicesid`) REFERENCES `vtiger_osssoldservices` (`osssoldservicesid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osstimecontrol`
--

CREATE TABLE `vtiger_osstimecontrol` (
  `osstimecontrolid` int(10) NOT NULL DEFAULT '0',
  `name` varchar(128) DEFAULT NULL,
  `osstimecontrol_no` varchar(255) DEFAULT NULL,
  `osstimecontrol_status` varchar(128) DEFAULT NULL,
  `date_start` date NOT NULL,
  `time_start` varchar(50) DEFAULT NULL,
  `due_date` date DEFAULT NULL,
  `time_end` varchar(50) DEFAULT NULL,
  `sum_time` decimal(10,2) DEFAULT '0.00',
  `deleted` int(1) DEFAULT '0',
  `timecontrol_type` varchar(255) DEFAULT NULL,
  `process` int(10) DEFAULT NULL,
  `link` int(10) DEFAULT NULL,
  `subprocess` int(10) DEFAULT NULL,
  `linkextend` int(10) DEFAULT NULL,
  PRIMARY KEY (`osstimecontrolid`),
  KEY `on_update_cascade` (`deleted`),
  KEY `osstimecontrol_status_9` (`osstimecontrol_status`,`deleted`),
  KEY `osstimecontrol_status_6` (`osstimecontrol_status`),
  KEY `subprocess` (`subprocess`),
  KEY `link` (`link`),
  KEY `process` (`process`),
  KEY `linkextend` (`linkextend`),
  CONSTRAINT `vtiger_osstimecontrol` FOREIGN KEY (`osstimecontrolid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osstimecontrol_status`
--

CREATE TABLE `vtiger_osstimecontrol_status` (
  `osstimecontrol_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `osstimecontrol_status` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`osstimecontrol_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osstimecontrol_status_seq`
--

CREATE TABLE `vtiger_osstimecontrol_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_osstimecontrolcf`
--

CREATE TABLE `vtiger_osstimecontrolcf` (
  `osstimecontrolid` int(10) NOT NULL,
  PRIMARY KEY (`osstimecontrolid`),
  CONSTRAINT `vtiger_osstimecontrolcf` FOREIGN KEY (`osstimecontrolid`) REFERENCES `vtiger_osstimecontrol` (`osstimecontrolid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_othereventduration`
--

CREATE TABLE `vtiger_othereventduration` (
  `othereventdurationid` int(10) NOT NULL AUTO_INCREMENT,
  `othereventduration` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`othereventdurationid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_othereventduration_seq`
--

CREATE TABLE `vtiger_othereventduration_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_outsourcedproducts`
--

CREATE TABLE `vtiger_outsourcedproducts` (
  `outsourcedproductsid` int(10) NOT NULL DEFAULT '0',
  `asset_no` varchar(32) DEFAULT NULL,
  `productname` varchar(255) DEFAULT NULL,
  `datesold` date DEFAULT NULL,
  `dateinservice` date DEFAULT NULL,
  `oproductstatus` varchar(255) DEFAULT NULL,
  `pscategory` varchar(255) DEFAULT '',
  `wherebought` varchar(255) DEFAULT '',
  `prodcount` varchar(255) DEFAULT '',
  `parent_id` int(10) DEFAULT NULL,
  `ssalesprocessesid` int(10) DEFAULT NULL,
  PRIMARY KEY (`outsourcedproductsid`),
  KEY `parent_id` (`parent_id`),
  KEY `ssalesprocessesid` (`ssalesprocessesid`),
  CONSTRAINT `fk_1_vtiger_outsourcedproducts` FOREIGN KEY (`outsourcedproductsid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_outsourcedproductscf`
--

CREATE TABLE `vtiger_outsourcedproductscf` (
  `outsourcedproductsid` int(10) NOT NULL,
  PRIMARY KEY (`outsourcedproductsid`),
  CONSTRAINT `fk_1_vtiger_outsourcedproductscf` FOREIGN KEY (`outsourcedproductsid`) REFERENCES `vtiger_outsourcedproducts` (`outsourcedproductsid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pago`
--

CREATE TABLE `vtiger_pago` (
  `pagoid` int(11) NOT NULL AUTO_INCREMENT,
  `pago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`pagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pais`
--

CREATE TABLE `vtiger_pais` (
  `paisid` int(11) NOT NULL AUTO_INCREMENT,
  `pais` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`paisid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paiscliente`
--

CREATE TABLE `vtiger_paiscliente` (
  `paisclienteid` int(11) NOT NULL AUTO_INCREMENT,
  `paiscliente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`paisclienteid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_parentezcoreferencia1`
--

CREATE TABLE `vtiger_parentezcoreferencia1` (
  `parentezcoreferencia1id` int(11) NOT NULL AUTO_INCREMENT,
  `parentezcoreferencia1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`parentezcoreferencia1id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_parentezcoreferencia2`
--

CREATE TABLE `vtiger_parentezcoreferencia2` (
  `parentezcoreferencia2id` int(11) NOT NULL AUTO_INCREMENT,
  `parentezcoreferencia2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`parentezcoreferencia2id`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_password`
--

CREATE TABLE `vtiger_password` (
  `type` varchar(20) NOT NULL,
  `val` varchar(100) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_passwords_config`
--

CREATE TABLE `vtiger_passwords_config` (
  `pass_length_min` int(3) NOT NULL,
  `pass_length_max` int(3) NOT NULL,
  `pass_allow_chars` varchar(200) NOT NULL,
  `register_changes` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsin`
--

CREATE TABLE `vtiger_paymentsin` (
  `paymentsinid` int(10) NOT NULL DEFAULT '0',
  `paymentsvalue` decimal(25,3) DEFAULT NULL,
  `paymentsno` varchar(32) DEFAULT NULL,
  `paymentsname` varchar(128) DEFAULT NULL,
  `paymentstitle` text,
  `paymentscurrency` varchar(32) DEFAULT NULL,
  `bank_account` varchar(128) DEFAULT NULL,
  `paymentsin_status` varchar(128) DEFAULT NULL,
  `relatedid` int(10) DEFAULT NULL,
  `nrofactura` varchar(32) DEFAULT '',
  `indemnizacion` bigint(64) DEFAULT '0',
  `valorfactura` bigint(64) DEFAULT '0',
  `ffactura` date DEFAULT NULL,
  `banco` varchar(32) DEFAULT '',
  `fvencimientofactura` date DEFAULT NULL,
  `diasvencidos` int(8) DEFAULT '0',
  `notificado` tinyint(1) DEFAULT '0',
  `fnotificacion` date DEFAULT NULL,
  `ndividendos` int(8) DEFAULT '0',
  `fpagodividendos` date DEFAULT NULL,
  `fcompromiso` date DEFAULT NULL,
  `observaciones` text,
  `valor1cuota` bigint(64) DEFAULT '0',
  `valor2cuota` bigint(64) DEFAULT '0',
  `valor3cuota` bigint(64) DEFAULT '0',
  `f1cuota` date DEFAULT NULL,
  `f2cuota` date DEFAULT NULL,
  `f3cuota` date DEFAULT NULL,
  `1cuotapagada` tinyint(1) DEFAULT '0',
  `2cuotapagada` tinyint(1) DEFAULT '0',
  `3cuotapagada` tinyint(1) DEFAULT '0',
  `nrosiniestro` int(11) unsigned DEFAULT '0',
  `frecinfliq` date DEFAULT NULL,
  `fpagofactura` date DEFAULT NULL,
  `facturapagada` tinyint(1) DEFAULT '0',
  `cliente` int(11) unsigned DEFAULT '0',
  `captador` varchar(59) DEFAULT '',
  `notificacioncobro1` tinyint(1) DEFAULT '0',
  `f1eranotifcacion` date DEFAULT NULL,
  `ciaseguros` varchar(255) DEFAULT '',
  `valor4cuota` bigint(64) DEFAULT '0',
  `f4cuota` date DEFAULT NULL,
  `4cuotapagada` tinyint(1) DEFAULT '0',
  `fvencuota1` date DEFAULT NULL,
  `fvencuota2` date DEFAULT NULL,
  `fvencuota3` date DEFAULT NULL,
  `fvencuota4` date DEFAULT NULL,
  `valor5cuota` bigint(64) DEFAULT '0',
  `valor6cuota` bigint(64) DEFAULT '0',
  `fvencuota5` date DEFAULT NULL,
  `fvencuota6` date DEFAULT NULL,
  `5cuotapagada` tinyint(1) DEFAULT '0',
  `6cuotapagada` tinyint(1) DEFAULT '0',
  `f5cuota` date DEFAULT NULL,
  `f6cuota` date DEFAULT NULL,
  `fprobpagocia` date DEFAULT NULL,
  `numerosiniestrocaso` varchar(32) DEFAULT '',
  `analistacia` varchar(59) DEFAULT '',
  `correoanalista` varchar(100) DEFAULT '',
  `tlfanalista` varchar(30) DEFAULT '',
  `tlfanalista_extra` varchar(100) DEFAULT NULL,
  `obsanalista` text,
  `observacionpago` text,
  `notificacioncobro2` tinyint(1) DEFAULT '0',
  `f2danotificacion` date DEFAULT NULL,
  `recordatorio` tinyint(1) DEFAULT '0',
  `frecordatorio` date DEFAULT NULL,
  `enviomensajes` tinyint(1) DEFAULT '0',
  `fenviomensajes` date DEFAULT NULL,
  `bancopago` varchar(255) DEFAULT '',
  `tipopago` varchar(255) DEFAULT '',
  `deudaactual` bigint(59) DEFAULT '0',
  `gastocobranza` bigint(59) DEFAULT '0',
  `valorcuota` bigint(59) DEFAULT '0',
  `deudatotal` bigint(59) DEFAULT '0',
  `abono` bigint(59) DEFAULT '0',
  `deudarestante` bigint(59) DEFAULT '0',
  `nrocuotas` varchar(255) DEFAULT '',
  `diapago` varchar(255) DEFAULT '',
  `fprimerpago` date DEFAULT NULL,
  `abonopagado` tinyint(1) DEFAULT '0',
  `fabono` date DEFAULT NULL,
  `tpagoabono` varchar(255) DEFAULT '',
  `bdpago` varchar(255) DEFAULT '',
  `deudainicial` bigint(59) DEFAULT '0',
  `tpago1cuota` varchar(255) DEFAULT '',
  `bdpago1cuota` varchar(255) DEFAULT '',
  `tpago2cuota` varchar(255) DEFAULT '',
  `tpago3cuota` varchar(255) DEFAULT '',
  `tpago4cuota` varchar(255) DEFAULT '',
  `tpago5cuota` varchar(255) DEFAULT '',
  `tpago6cuota` varchar(255) DEFAULT '',
  `bdpago2cuota` varchar(255) DEFAULT '',
  `bdpago3cuota` varchar(255) DEFAULT '',
  `bdpago4cuota` varchar(255) DEFAULT '',
  `bdpago5cuuota` varchar(255) DEFAULT '',
  `bdpago6cuota` varchar(255) DEFAULT '',
  `envfactcliente` tinyint(1) DEFAULT '0',
  `codwebpayabono` bigint(12) DEFAULT '0',
  `codwebpaycuota1` bigint(12) DEFAULT '0',
  `codwebpaycuota2` bigint(12) DEFAULT '0',
  `codwebpaycuota3` bigint(12) DEFAULT '0',
  `codwebpaycuota4` bigint(12) DEFAULT '0',
  `codwebpaycuota5` bigint(12) DEFAULT '0',
  `codwebpaycuota6` bigint(12) DEFAULT '0',
  `tarjpagoabono` varchar(255) DEFAULT '',
  `tarjpagocuota1` varchar(255) DEFAULT '',
  `tarjpagocuota2` varchar(255) DEFAULT '',
  `tarjpagocuota3` varchar(255) DEFAULT '',
  `tarjpagocuota4` varchar(255) DEFAULT '',
  `tarjpagocuota5` varchar(255) DEFAULT '',
  `tarjpagocuota6` varchar(255) DEFAULT '',
  `tipocobranza` varchar(255) DEFAULT '',
  `notificacionpagoliberado` tinyint(1) DEFAULT '0',
  `fnotlibpag` date DEFAULT NULL,
  `cobraz` int(11) unsigned DEFAULT '0',
  `prc` int(11) unsigned DEFAULT '0',
  `crearddacobranza` tinyint(1) DEFAULT '0',
  `relddacobranza` int(11) unsigned DEFAULT '0',
  `crearddapagoretenido` tinyint(1) DEFAULT '0',
  `relddapagoretenido` int(11) unsigned DEFAULT '0',
  `crearrecdeuda` tinyint(1) DEFAULT '0',
  `incumplimientoconvenio` tinyint(1) DEFAULT '0',
  `honorariosabogado` bigint(30) DEFAULT '0',
  `estadogc` varchar(255) DEFAULT '',
  `fechagestuno` date DEFAULT NULL,
  `fechagestdos` date DEFAULT NULL,
  `fechagesttres` date DEFAULT NULL,
  `obsgestcobra` text,
  `estado` varchar(255) DEFAULT '',
  `sinacofi` tinyint(1) DEFAULT '0',
  `tipoddacobranza` varchar(255) DEFAULT '',
  `nrocredito` varchar(30) DEFAULT '',
  `asociadoesterno` varchar(200) DEFAULT '',
  PRIMARY KEY (`paymentsinid`),
  KEY `vtiger_paymentsin_nrosiniestro_idx` (`nrosiniestro`),
  KEY `vtiger_paymentsin_cliente_idx` (`cliente`),
  KEY `vtiger_paymentsin_cobraz_idx` (`cobraz`),
  KEY `vtiger_paymentsin_prc_idx` (`prc`),
  KEY `vtiger_paymentsin_relddacobranza_idx` (`relddacobranza`),
  KEY `vtiger_paymentsin_relddapagoretenido_idx` (`relddapagoretenido`),
  CONSTRAINT `fk_1_vtiger_paymentsin` FOREIGN KEY (`paymentsinid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsin_status`
--

CREATE TABLE `vtiger_paymentsin_status` (
  `paymentsin_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `paymentsin_status` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`paymentsin_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=34 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsin_status_seq`
--

CREATE TABLE `vtiger_paymentsin_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsincf`
--

CREATE TABLE `vtiger_paymentsincf` (
  `paymentsinid` int(10) NOT NULL,
  PRIMARY KEY (`paymentsinid`),
  CONSTRAINT `fk_1_vtiger_paymentsincf` FOREIGN KEY (`paymentsinid`) REFERENCES `vtiger_paymentsin` (`paymentsinid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsout`
--

CREATE TABLE `vtiger_paymentsout` (
  `paymentsoutid` int(10) NOT NULL DEFAULT '0',
  `paymentsvalue` decimal(25,3) DEFAULT NULL,
  `paymentsno` varchar(32) DEFAULT NULL,
  `paymentsname` varchar(128) DEFAULT NULL,
  `paymentstitle` varchar(128) DEFAULT NULL,
  `paymentscurrency` varchar(32) DEFAULT NULL,
  `bank_account` varchar(128) DEFAULT NULL,
  `paymentsout_status` varchar(128) DEFAULT NULL,
  `relatedid` int(10) DEFAULT NULL,
  `parentid` int(10) DEFAULT NULL,
  PRIMARY KEY (`paymentsoutid`),
  CONSTRAINT `fk_1_vtiger_paymentsout` FOREIGN KEY (`paymentsoutid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsout_status`
--

CREATE TABLE `vtiger_paymentsout_status` (
  `paymentsout_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `paymentsout_status` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`paymentsout_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsout_status_seq`
--

CREATE TABLE `vtiger_paymentsout_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_paymentsoutcf`
--

CREATE TABLE `vtiger_paymentsoutcf` (
  `paymentsoutid` int(10) NOT NULL,
  PRIMARY KEY (`paymentsoutid`),
  CONSTRAINT `fk_1_vtiger_paymentsoutcf` FOREIGN KEY (`paymentsoutid`) REFERENCES `vtiger_paymentsout` (`paymentsoutid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pbxmanager`
--

CREATE TABLE `vtiger_pbxmanager` (
  `pbxmanagerid` int(10) NOT NULL AUTO_INCREMENT,
  `direction` varchar(10) DEFAULT NULL,
  `callstatus` varchar(20) DEFAULT NULL,
  `starttime` datetime DEFAULT NULL,
  `endtime` datetime DEFAULT NULL,
  `totalduration` int(10) DEFAULT NULL,
  `billduration` int(10) DEFAULT NULL,
  `recordingurl` varchar(200) DEFAULT NULL,
  `sourceuuid` varchar(100) DEFAULT NULL,
  `gateway` varchar(20) DEFAULT NULL,
  `customer` int(10) DEFAULT NULL,
  `user` varchar(100) DEFAULT NULL,
  `customernumber` varchar(100) DEFAULT NULL,
  `customertype` varchar(100) DEFAULT NULL,
  `customernumber_extra` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`pbxmanagerid`),
  KEY `index_sourceuuid` (`sourceuuid`),
  KEY `index_pbxmanager_id` (`pbxmanagerid`),
  CONSTRAINT `vtiger_pbxmanager_ibfk_1` FOREIGN KEY (`pbxmanagerid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pbxmanager_gateway`
--

CREATE TABLE `vtiger_pbxmanager_gateway` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `gateway` varchar(20) DEFAULT NULL,
  `parameters` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pbxmanager_phonelookup`
--

CREATE TABLE `vtiger_pbxmanager_phonelookup` (
  `crmid` int(10) DEFAULT NULL,
  `setype` varchar(30) DEFAULT NULL,
  `fnumber` varchar(100) DEFAULT NULL,
  `rnumber` varchar(100) DEFAULT NULL,
  `fieldname` varchar(50) DEFAULT NULL,
  UNIQUE KEY `unique_key` (`crmid`,`setype`,`fieldname`),
  KEY `index_phone_number` (`fnumber`,`rnumber`),
  CONSTRAINT `vtiger_pbxmanager_phonelookup_ibfk_1` FOREIGN KEY (`crmid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pbxmanagercf`
--

CREATE TABLE `vtiger_pbxmanagercf` (
  `pbxmanagerid` int(10) NOT NULL,
  PRIMARY KEY (`pbxmanagerid`),
  CONSTRAINT `vtiger_pbxmanagercf_ibfk_1` FOREIGN KEY (`pbxmanagerid`) REFERENCES `vtiger_pbxmanager` (`pbxmanagerid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pertenecealgrupo`
--

CREATE TABLE `vtiger_pertenecealgrupo` (
  `pertenecealgrupoid` int(11) NOT NULL AUTO_INCREMENT,
  `pertenecealgrupo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`pertenecealgrupoid`)
) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_picklist`
--

CREATE TABLE `vtiger_picklist` (
  `picklistid` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  PRIMARY KEY (`picklistid`),
  UNIQUE KEY `picklist_name_idx` (`name`)
) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_picklist_dependency`
--

CREATE TABLE `vtiger_picklist_dependency` (
  `id` int(10) NOT NULL,
  `tabid` smallint(5) NOT NULL,
  `sourcefield` varchar(255) DEFAULT NULL,
  `targetfield` varchar(255) DEFAULT NULL,
  `sourcevalue` varchar(100) DEFAULT NULL,
  `targetvalues` text,
  `criteria` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_picklist_dependency_copy`
--

CREATE TABLE `vtiger_picklist_dependency_copy` (
  `id` int(10) NOT NULL,
  `tabid` smallint(5) NOT NULL,
  `sourcefield` varchar(255) DEFAULT NULL,
  `targetfield` varchar(255) DEFAULT NULL,
  `sourcevalue` varchar(100) DEFAULT NULL,
  `targetvalues` mediumtext,
  `criteria` mediumtext,
  PRIMARY KEY (`id`) USING BTREE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC;

--
-- Table structure for table `vtiger_picklist_dependency_seq`
--

CREATE TABLE `vtiger_picklist_dependency_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_picklistvalues_seq`
--

CREATE TABLE `vtiger_picklistvalues_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_planaslegal`
--

CREATE TABLE `vtiger_planaslegal` (
  `planaslegalid` int(11) NOT NULL AUTO_INCREMENT,
  `planaslegal` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`planaslegalid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_plazo`
--

CREATE TABLE `vtiger_plazo` (
  `plazoid` int(11) NOT NULL AUTO_INCREMENT,
  `plazo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`plazoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_plazopa`
--

CREATE TABLE `vtiger_plazopa` (
  `plazopaid` int(11) NOT NULL AUTO_INCREMENT,
  `plazopa` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`plazopaid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_portal`
--

CREATE TABLE `vtiger_portal` (
  `portalid` int(10) NOT NULL AUTO_INCREMENT,
  `portalname` varchar(200) NOT NULL,
  `portalurl` varchar(255) NOT NULL,
  `sequence` int(3) NOT NULL,
  `setdefault` int(3) NOT NULL DEFAULT '0',
  `createdtime` datetime DEFAULT NULL,
  PRIMARY KEY (`portalid`),
  KEY `portal_portalname_idx` (`portalname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_preaprobacioncredi`
--

CREATE TABLE `vtiger_preaprobacioncredi` (
  `preaprobacioncrediid` int(11) NOT NULL DEFAULT '0',
  `preaprobacioncredi` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `anovehiculo` varchar(255) DEFAULT '',
  `cae` decimal(5,2) DEFAULT NULL,
  `comisionporciento` decimal(5,2) DEFAULT NULL,
  `preaprobado` tinyint(1) DEFAULT '0',
  `plazopa` varchar(255) DEFAULT '',
  `valorpie` varchar(255) DEFAULT '',
  `apellidoss` varchar(64) DEFAULT '',
  `nombres` varchar(64) DEFAULT '',
  `tasapiso` decimal(5,2) DEFAULT NULL,
  `tasatecho` decimal(5,2) DEFAULT NULL,
  `obssistema` text,
  `obsasesor` text,
  `edad` int(8) DEFAULT '0',
  `telefono_extra` varchar(100) DEFAULT NULL,
  `movil` varchar(30) DEFAULT '',
  `movil_extra` varchar(100) DEFAULT NULL,
  `correo` varchar(100) DEFAULT '',
  `propiedad` varchar(255) DEFAULT '',
  `nroprotesto` int(8) DEFAULT '0',
  `estadopreaprobacion` varchar(255) DEFAULT '',
  `antlaboral` int(8) DEFAULT '0',
  `checkmorosidad` tinyint(1) DEFAULT '0',
  `obssupervisor` text,
  `valorvehiculo` decimal(65,8) DEFAULT NULL,
  `valorpieneto` decimal(65,8) DEFAULT NULL,
  `rentaliquida` decimal(65,8) DEFAULT NULL,
  `lineacredito` decimal(65,8) DEFAULT NULL,
  `montototalprotesto` decimal(65,8) DEFAULT NULL,
  `montoafinanciar` decimal(65,8) DEFAULT NULL,
  `valorcuota` decimal(65,8) DEFAULT NULL,
  `ctc` decimal(65,8) DEFAULT NULL,
  `comision` decimal(65,8) DEFAULT NULL,
  `alzamientoprenda` decimal(65,8) DEFAULT NULL,
  `constitucionprenda` decimal(65,8) DEFAULT NULL,
  `legalizacionpagare` decimal(65,8) DEFAULT NULL,
  `gastosadministrativos` decimal(65,8) DEFAULT NULL,
  `retirodocumentos` decimal(65,8) DEFAULT NULL,
  `segurocesantia` decimal(65,8) DEFAULT NULL,
  `impuestopagare` decimal(5,2) DEFAULT NULL,
  `montopagare` decimal(65,8) DEFAULT NULL,
  PRIMARY KEY (`preaprobacioncrediid`),
  CONSTRAINT `fk_1_vtiger_preaprobacioncredipreaprobacioncrediid` FOREIGN KEY (`preaprobacioncrediid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_preaprobacioncredicf`
--

CREATE TABLE `vtiger_preaprobacioncredicf` (
  `preaprobacioncrediid` int(11) NOT NULL DEFAULT '0',
  PRIMARY KEY (`preaprobacioncrediid`),
  CONSTRAINT `fk_1_vtiger_preaprobacioncredicfpreaprobacioncrediid` FOREIGN KEY (`preaprobacioncrediid`) REFERENCES `vtiger_preaprobacioncredi` (`preaprobacioncrediid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_prendaauto1`
--

CREATE TABLE `vtiger_prendaauto1` (
  `prendaauto1id` int(11) NOT NULL AUTO_INCREMENT,
  `prendaauto1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`prendaauto1id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_prendaauto2`
--

CREATE TABLE `vtiger_prendaauto2` (
  `prendaauto2id` int(11) NOT NULL AUTO_INCREMENT,
  `prendaauto2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`prendaauto2id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_prevision`
--

CREATE TABLE `vtiger_prevision` (
  `previsionid` int(11) NOT NULL AUTO_INCREMENT,
  `prevision` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`previsionid`)
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pricebook`
--

CREATE TABLE `vtiger_pricebook` (
  `pricebookid` int(10) NOT NULL DEFAULT '0',
  `pricebook_no` varchar(100) NOT NULL,
  `bookname` varchar(100) DEFAULT NULL,
  `active` smallint(1) DEFAULT NULL,
  `currency_id` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`pricebookid`),
  CONSTRAINT `fk_1_vtiger_pricebook` FOREIGN KEY (`pricebookid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pricebookcf`
--

CREATE TABLE `vtiger_pricebookcf` (
  `pricebookid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`pricebookid`),
  CONSTRAINT `fk_1_vtiger_pricebookcf` FOREIGN KEY (`pricebookid`) REFERENCES `vtiger_pricebook` (`pricebookid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pricebookproductrel`
--

CREATE TABLE `vtiger_pricebookproductrel` (
  `pricebookid` int(10) NOT NULL,
  `productid` int(10) NOT NULL,
  `listprice` decimal(28,8) DEFAULT NULL,
  `usedcurrency` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`pricebookid`,`productid`),
  KEY `pricebookproductrel_pricebookid_idx` (`pricebookid`),
  KEY `pricebookproductrel_productid_idx` (`productid`),
  CONSTRAINT `fk_1_vtiger_pricebookproductrel` FOREIGN KEY (`pricebookid`) REFERENCES `vtiger_pricebook` (`pricebookid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_priority`
--

CREATE TABLE `vtiger_priority` (
  `priorityid` int(10) NOT NULL AUTO_INCREMENT,
  `priority` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`priorityid`),
  UNIQUE KEY `priority_priority_idx` (`priority`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_productcf`
--

CREATE TABLE `vtiger_productcf` (
  `productid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`productid`),
  CONSTRAINT `fk_1_vtiger_productcf` FOREIGN KEY (`productid`) REFERENCES `vtiger_products` (`productid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_productcurrencyrel`
--

CREATE TABLE `vtiger_productcurrencyrel` (
  `productid` int(10) NOT NULL,
  `currencyid` int(10) NOT NULL,
  `converted_price` decimal(28,8) DEFAULT NULL,
  `actual_price` decimal(28,8) DEFAULT NULL,
  KEY `productid` (`productid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_products`
--

CREATE TABLE `vtiger_products` (
  `productid` int(10) NOT NULL,
  `product_no` varchar(100) NOT NULL,
  `productname` varchar(100) DEFAULT NULL,
  `productcode` varchar(40) DEFAULT NULL,
  `pscategory` varchar(200) DEFAULT NULL,
  `manufacturer` varchar(200) DEFAULT NULL,
  `qty_per_unit` decimal(11,2) DEFAULT '0.00',
  `unit_price` decimal(25,8) DEFAULT NULL,
  `weight` decimal(11,3) DEFAULT NULL,
  `pack_size` int(10) DEFAULT NULL,
  `sales_start_date` date DEFAULT NULL,
  `sales_end_date` date DEFAULT NULL,
  `start_date` date DEFAULT NULL,
  `expiry_date` date DEFAULT NULL,
  `cost_factor` int(10) DEFAULT NULL,
  `commissionrate` decimal(7,3) DEFAULT NULL,
  `commissionmethod` varchar(50) DEFAULT NULL,
  `discontinued` tinyint(1) NOT NULL DEFAULT '0',
  `usageunit` varchar(200) DEFAULT NULL,
  `reorderlevel` int(10) DEFAULT NULL,
  `website` varchar(100) DEFAULT NULL,
  `mfr_part_no` varchar(200) DEFAULT NULL,
  `vendor_part_no` varchar(200) DEFAULT NULL,
  `serialno` varchar(200) DEFAULT NULL,
  `qtyinstock` decimal(25,3) DEFAULT NULL,
  `productsheet` varchar(200) DEFAULT NULL,
  `qtyindemand` int(10) DEFAULT NULL,
  `glacct` varchar(200) DEFAULT NULL,
  `vendor_id` int(10) DEFAULT NULL,
  `imagename` text,
  `currency_id` int(10) NOT NULL DEFAULT '1',
  `taxes` varchar(50) DEFAULT NULL,
  `ean` varchar(30) DEFAULT NULL,
  `subunit` varchar(255) DEFAULT '',
  `renewable` tinyint(1) DEFAULT '0',
  `category_multipicklist` text,
  PRIMARY KEY (`productid`),
  CONSTRAINT `fk_1_vtiger_products` FOREIGN KEY (`productid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_profile`
--

CREATE TABLE `vtiger_profile` (
  `profileid` int(10) NOT NULL AUTO_INCREMENT,
  `profilename` varchar(50) NOT NULL,
  `description` text,
  `directly_related_to_role` int(1) DEFAULT '0',
  PRIMARY KEY (`profileid`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_profile2field`
--

CREATE TABLE `vtiger_profile2field` (
  `profileid` int(10) NOT NULL,
  `tabid` smallint(5) DEFAULT NULL,
  `fieldid` int(10) NOT NULL,
  `visible` int(10) DEFAULT NULL,
  `readonly` int(10) DEFAULT NULL,
  PRIMARY KEY (`profileid`,`fieldid`),
  KEY `profile2field_profileid_tabid_fieldname_idx` (`profileid`,`tabid`),
  KEY `profile2field_tabid_profileid_idx` (`tabid`,`profileid`),
  KEY `profile2field_visible_profileid_idx` (`visible`,`profileid`),
  CONSTRAINT `vtiger_profile2field_ibfk_1` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_profile2globalpermissions`
--

CREATE TABLE `vtiger_profile2globalpermissions` (
  `profileid` int(10) NOT NULL,
  `globalactionid` int(10) NOT NULL,
  `globalactionpermission` int(10) DEFAULT NULL,
  PRIMARY KEY (`profileid`,`globalactionid`),
  KEY `idx_profile2globalpermissions` (`profileid`,`globalactionid`),
  CONSTRAINT `fk_1_vtiger_profile2globalpermissions` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_profile2standardpermissions`
--

CREATE TABLE `vtiger_profile2standardpermissions` (
  `profileid` smallint(5) unsigned NOT NULL,
  `tabid` smallint(5) unsigned NOT NULL,
  `operation` smallint(5) unsigned NOT NULL,
  `permissions` tinyint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`profileid`,`tabid`,`operation`),
  KEY `profile2standardpermissions_profileid_tabid_operation_idx` (`profileid`,`tabid`,`operation`),
  KEY `profileid` (`profileid`,`tabid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_profile2tab`
--

CREATE TABLE `vtiger_profile2tab` (
  `profileid` int(10) DEFAULT NULL,
  `tabid` smallint(5) DEFAULT NULL,
  `permissions` int(10) NOT NULL DEFAULT '0',
  KEY `profile2tab_profileid_tabid_idx` (`profileid`,`tabid`),
  CONSTRAINT `vtiger_profile2tab_ibfk_1` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_profile2utility`
--

CREATE TABLE `vtiger_profile2utility` (
  `profileid` int(10) NOT NULL,
  `tabid` smallint(5) NOT NULL,
  `activityid` int(10) NOT NULL,
  `permission` int(1) DEFAULT NULL,
  PRIMARY KEY (`profileid`,`tabid`,`activityid`),
  KEY `profile2utility_tabid_activityid_idx` (`tabid`,`activityid`),
  KEY `profile2utility_profileid` (`profileid`),
  CONSTRAINT `vtiger_profile2utility_ibfk_1` FOREIGN KEY (`profileid`) REFERENCES `vtiger_profile` (`profileid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_progress`
--

CREATE TABLE `vtiger_progress` (
  `progressid` int(10) NOT NULL AUTO_INCREMENT,
  `progress` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`progressid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_progress_seq`
--

CREATE TABLE `vtiger_progress_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_project`
--

CREATE TABLE `vtiger_project` (
  `projectid` int(10) NOT NULL,
  `projectname` varchar(255) DEFAULT NULL,
  `project_no` varchar(100) DEFAULT NULL,
  `startdate` date DEFAULT NULL,
  `targetenddate` date DEFAULT NULL,
  `actualenddate` date DEFAULT NULL,
  `targetbudget` varchar(255) DEFAULT NULL,
  `projecturl` varchar(255) DEFAULT NULL,
  `projectstatus` varchar(100) DEFAULT NULL,
  `projectpriority` varchar(100) DEFAULT NULL,
  `projecttype` varchar(100) DEFAULT NULL,
  `progress` varchar(100) DEFAULT NULL,
  `linktoaccountscontacts` int(10) DEFAULT NULL,
  `sum_time` decimal(10,2) DEFAULT '0.00',
  `servicecontractsid` int(10) DEFAULT NULL,
  `ssalesprocessesid` int(10) DEFAULT NULL,
  `parentid` int(10) DEFAULT NULL,
  PRIMARY KEY (`projectid`),
  KEY `servicecontractsid` (`servicecontractsid`),
  KEY `linktoaccountscontacts` (`linktoaccountscontacts`),
  KEY `projectname` (`projectname`),
  KEY `ssalesprocessesid` (`ssalesprocessesid`),
  KEY `project_parentid_idx` (`parentid`),
  KEY `project_no` (`project_no`),
  CONSTRAINT `vtiger_project_ibfk_1` FOREIGN KEY (`projectid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectcf`
--

CREATE TABLE `vtiger_projectcf` (
  `projectid` int(10) NOT NULL,
  PRIMARY KEY (`projectid`),
  CONSTRAINT `vtiger_projectcf_ibfk_1` FOREIGN KEY (`projectid`) REFERENCES `vtiger_project` (`projectid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectmilestone`
--

CREATE TABLE `vtiger_projectmilestone` (
  `projectmilestoneid` int(10) NOT NULL,
  `projectmilestonename` varchar(255) DEFAULT NULL,
  `projectmilestone_no` varchar(100) DEFAULT NULL,
  `projectmilestonedate` varchar(255) DEFAULT NULL,
  `projectid` int(10) DEFAULT NULL,
  `projectmilestonetype` varchar(100) DEFAULT NULL,
  `projectmilestone_priority` varchar(255) DEFAULT NULL,
  `projectmilestone_progress` varchar(10) DEFAULT NULL,
  `sum_time` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`projectmilestoneid`),
  KEY `projectid` (`projectid`),
  CONSTRAINT `vtiger_projectmilestone_ibfk_1` FOREIGN KEY (`projectmilestoneid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectmilestone_priority`
--

CREATE TABLE `vtiger_projectmilestone_priority` (
  `projectmilestone_priorityid` int(10) NOT NULL AUTO_INCREMENT,
  `projectmilestone_priority` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projectmilestone_priorityid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectmilestone_priority_seq`
--

CREATE TABLE `vtiger_projectmilestone_priority_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectmilestonecf`
--

CREATE TABLE `vtiger_projectmilestonecf` (
  `projectmilestoneid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`projectmilestoneid`),
  CONSTRAINT `vtiger_projectmilestonecf_ibfk_1` FOREIGN KEY (`projectmilestoneid`) REFERENCES `vtiger_projectmilestone` (`projectmilestoneid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectmilestonetype`
--

CREATE TABLE `vtiger_projectmilestonetype` (
  `projectmilestonetypeid` int(10) NOT NULL AUTO_INCREMENT,
  `projectmilestonetype` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projectmilestonetypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectmilestonetype_seq`
--

CREATE TABLE `vtiger_projectmilestonetype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectpriority`
--

CREATE TABLE `vtiger_projectpriority` (
  `projectpriorityid` int(10) NOT NULL AUTO_INCREMENT,
  `projectpriority` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projectpriorityid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectpriority_seq`
--

CREATE TABLE `vtiger_projectpriority_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectstatus`
--

CREATE TABLE `vtiger_projectstatus` (
  `projectstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `projectstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  `color` varchar(25) DEFAULT '#E6FAD8',
  PRIMARY KEY (`projectstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projectstatus_seq`
--

CREATE TABLE `vtiger_projectstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttask`
--

CREATE TABLE `vtiger_projecttask` (
  `projecttaskid` int(10) NOT NULL,
  `projecttaskname` varchar(255) DEFAULT NULL,
  `projecttask_no` varchar(100) DEFAULT NULL,
  `projecttasktype` varchar(100) DEFAULT NULL,
  `projecttaskpriority` varchar(100) DEFAULT NULL,
  `projecttaskprogress` varchar(100) DEFAULT NULL,
  `startdate` date DEFAULT NULL,
  `enddate` date DEFAULT NULL,
  `projectid` int(10) DEFAULT NULL,
  `projecttasknumber` int(10) DEFAULT NULL,
  `projecttaskstatus` varchar(100) DEFAULT NULL,
  `sum_time` decimal(10,2) DEFAULT '0.00',
  `parentid` int(10) DEFAULT NULL,
  `projectmilestoneid` int(10) DEFAULT NULL,
  `targetenddate` date DEFAULT NULL,
  `estimated_work_time` decimal(8,2) DEFAULT NULL,
  PRIMARY KEY (`projecttaskid`),
  KEY `parentid` (`parentid`),
  KEY `projectmilestoneid` (`projectmilestoneid`),
  KEY `projectid` (`projectid`),
  KEY `projecttaskname` (`projecttaskname`),
  CONSTRAINT `vtiger_projecttask_ibfk_1` FOREIGN KEY (`projecttaskid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskcf`
--

CREATE TABLE `vtiger_projecttaskcf` (
  `projecttaskid` int(10) NOT NULL DEFAULT '0',
  PRIMARY KEY (`projecttaskid`),
  CONSTRAINT `vtiger_projecttaskcf_ibfk_1` FOREIGN KEY (`projecttaskid`) REFERENCES `vtiger_projecttask` (`projecttaskid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskpriority`
--

CREATE TABLE `vtiger_projecttaskpriority` (
  `projecttaskpriorityid` int(10) NOT NULL AUTO_INCREMENT,
  `projecttaskpriority` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projecttaskpriorityid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskpriority_seq`
--

CREATE TABLE `vtiger_projecttaskpriority_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskprogress`
--

CREATE TABLE `vtiger_projecttaskprogress` (
  `projecttaskprogressid` int(10) NOT NULL AUTO_INCREMENT,
  `projecttaskprogress` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projecttaskprogressid`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskprogress_seq`
--

CREATE TABLE `vtiger_projecttaskprogress_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskstatus`
--

CREATE TABLE `vtiger_projecttaskstatus` (
  `projecttaskstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `projecttaskstatus` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projecttaskstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttaskstatus_seq`
--

CREATE TABLE `vtiger_projecttaskstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttasktype`
--

CREATE TABLE `vtiger_projecttasktype` (
  `projecttasktypeid` int(10) NOT NULL AUTO_INCREMENT,
  `projecttasktype` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projecttasktypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttasktype_seq`
--

CREATE TABLE `vtiger_projecttasktype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttype`
--

CREATE TABLE `vtiger_projecttype` (
  `projecttypeid` int(10) NOT NULL AUTO_INCREMENT,
  `projecttype` varchar(200) NOT NULL,
  `presence` int(1) NOT NULL DEFAULT '1',
  `picklist_valueid` int(10) NOT NULL DEFAULT '0',
  `sortorderid` int(10) DEFAULT '0',
  PRIMARY KEY (`projecttypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_projecttype_seq`
--

CREATE TABLE `vtiger_projecttype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_propiedad`
--

CREATE TABLE `vtiger_propiedad` (
  `propiedadid` int(11) NOT NULL AUTO_INCREMENT,
  `propiedad` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`propiedadid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_proviene`
--

CREATE TABLE `vtiger_proviene` (
  `provieneid` int(11) NOT NULL AUTO_INCREMENT,
  `proviene` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provieneid`)
) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provienede`
--

CREATE TABLE `vtiger_provienede` (
  `provienedeid` int(11) NOT NULL AUTO_INCREMENT,
  `provienede` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provienedeid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provincia`
--

CREATE TABLE `vtiger_provincia` (
  `provinciaid` int(11) NOT NULL AUTO_INCREMENT,
  `provincia` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciaid`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provinciabi1`
--

CREATE TABLE `vtiger_provinciabi1` (
  `provinciabi1id` int(11) NOT NULL AUTO_INCREMENT,
  `provinciabi1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciabi1id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provinciabi2`
--

CREATE TABLE `vtiger_provinciabi2` (
  `provinciabi2id` int(11) NOT NULL AUTO_INCREMENT,
  `provinciabi2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciabi2id`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provinciacli`
--

CREATE TABLE `vtiger_provinciacli` (
  `provinciacliid` int(11) NOT NULL AUTO_INCREMENT,
  `provinciacli` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciacliid`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provinciadelcaso`
--

CREATE TABLE `vtiger_provinciadelcaso` (
  `provinciadelcasoid` int(11) NOT NULL AUTO_INCREMENT,
  `provinciadelcaso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciadelcasoid`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provinciadelcliente`
--

CREATE TABLE `vtiger_provinciadelcliente` (
  `provinciadelclienteid` int(11) NOT NULL AUTO_INCREMENT,
  `provinciadelcliente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciadelclienteid`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_provinciaempleador`
--

CREATE TABLE `vtiger_provinciaempleador` (
  `provinciaempleadorid` int(11) NOT NULL AUTO_INCREMENT,
  `provinciaempleador` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`provinciaempleadorid`)
) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pruebademandacomercial`
--

CREATE TABLE `vtiger_pruebademandacomercial` (
  `pruebademandacomercialid` int(11) NOT NULL,
  `pruebaddacom` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `rut` varchar(15) DEFAULT '',
  `nombre` varchar(100) DEFAULT '',
  PRIMARY KEY (`pruebademandacomercialid`),
  CONSTRAINT `fk_1_vtiger_pruebademandacomercialpruebademandacomercialid` FOREIGN KEY (`pruebademandacomercialid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pruebademandacomercialcf`
--

CREATE TABLE `vtiger_pruebademandacomercialcf` (
  `pruebademandacomercialid` int(11) NOT NULL,
  PRIMARY KEY (`pruebademandacomercialid`),
  CONSTRAINT `fk_1_vtiger_pruebademandacomercialcfpruebademandacomercialid` FOREIGN KEY (`pruebademandacomercialid`) REFERENCES `vtiger_pruebademandacomercial` (`pruebademandacomercialid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pruebadocumentos`
--

CREATE TABLE `vtiger_pruebadocumentos` (
  `pruebadocumentosid` int(11) NOT NULL,
  `id` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `reldoc` int(11) unsigned DEFAULT '0',
  PRIMARY KEY (`pruebadocumentosid`),
  KEY `vtiger_pruebadocumentos_reldoc_idx` (`reldoc`),
  CONSTRAINT `fk_1_vtiger_pruebadocumentospruebadocumentosid` FOREIGN KEY (`pruebadocumentosid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_pruebadocumentoscf`
--

CREATE TABLE `vtiger_pruebadocumentoscf` (
  `pruebadocumentosid` int(11) NOT NULL,
  PRIMARY KEY (`pruebadocumentosid`),
  CONSTRAINT `fk_1_vtiger_pruebadocumentoscfpruebadocumentosid` FOREIGN KEY (`pruebadocumentosid`) REFERENCES `vtiger_pruebadocumentos` (`pruebadocumentosid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_publicholiday`
--

CREATE TABLE `vtiger_publicholiday` (
  `publicholidayid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id of public holiday',
  `holidaydate` date NOT NULL COMMENT 'date of holiday',
  `holidayname` varchar(255) NOT NULL COMMENT 'name of holiday',
  `holidaytype` varchar(25) DEFAULT NULL COMMENT 'type of holiday',
  PRIMARY KEY (`publicholidayid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_quiendenuncio`
--

CREATE TABLE `vtiger_quiendenuncio` (
  `quiendenuncioid` int(11) NOT NULL AUTO_INCREMENT,
  `quiendenuncio` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`quiendenuncioid`)
) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_quienenvioppto`
--

CREATE TABLE `vtiger_quienenvioppto` (
  `quienenviopptoid` int(11) NOT NULL AUTO_INCREMENT,
  `quienenvioppto` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`quienenviopptoid`)
) ENGINE=InnoDB AUTO_INCREMENT=247 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_rangohorpre`
--

CREATE TABLE `vtiger_rangohorpre` (
  `rangohorpreid` int(11) NOT NULL AUTO_INCREMENT,
  `rangohorpre` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`rangohorpreid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_razongestionarprogreso`
--

CREATE TABLE `vtiger_razongestionarprogreso` (
  `razongestionarprogresoid` int(11) NOT NULL AUTO_INCREMENT,
  `razongestionarprogreso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`razongestionarprogresoid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_razonnoaplica`
--

CREATE TABLE `vtiger_razonnoaplica` (
  `razonnoaplicaid` int(11) NOT NULL AUTO_INCREMENT,
  `razonnoaplica` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  `color` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`razonnoaplicaid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_realization_process`
--

CREATE TABLE `vtiger_realization_process` (
  `module_id` int(10) NOT NULL,
  `status_indicate_closing` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_reconocimientodeuda`
--

CREATE TABLE `vtiger_reconocimientodeuda` (
  `reconocimientodeudaid` int(11) NOT NULL,
  `id` int(11) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `rut` varchar(20) DEFAULT '',
  `rol` varchar(30) DEFAULT '',
  `caratula` varchar(101) DEFAULT '',
  `tribunalcompetente` varchar(255) DEFAULT '',
  `tribunalradicado` varchar(255) DEFAULT '',
  `estadodda` varchar(255) DEFAULT '',
  `bienesembargados` varchar(255) DEFAULT '',
  `caratuladc` varchar(101) DEFAULT '',
  `roldc` varchar(40) DEFAULT '',
  `estadoddadc` varchar(255) DEFAULT '',
  `resultadoaudiencia` varchar(255) DEFAULT '',
  `generargestprep` tinyint(1) DEFAULT '0',
  `generarcumpleord` tinyint(1) DEFAULT '0',
  `genart44` tinyint(1) DEFAULT '0',
  `generarformato` tinyint(1) DEFAULT '0',
  `generardemanda` tinyint(1) DEFAULT '0',
  `generarautoprueba` tinyint(1) DEFAULT '0',
  `generaroirsentencia` tinyint(1) DEFAULT '0',
  `generarreposicion` tinyint(1) DEFAULT '0',
  `generarrepoyapela` tinyint(1) DEFAULT '0',
  `generarapela` tinyint(1) DEFAULT '0',
  `nombrereceptor` varchar(255) DEFAULT '',
  `comunacliente` varchar(255) DEFAULT '',
  `busquedanegativa` int(3) DEFAULT '0',
  `estadobusqueda` varchar(255) DEFAULT '',
  `not44` int(3) DEFAULT '0',
  `estadonot44` varchar(255) DEFAULT '',
  `notporcedula` int(3) DEFAULT '0',
  `estadonotcedula` varchar(255) DEFAULT '',
  `notpersonal` int(3) DEFAULT '0',
  `estadonotpersonal` varchar(255) DEFAULT '',
  `embargos` int(3) DEFAULT '0',
  `estadoembargo` varchar(255) DEFAULT '',
  `preciobusquedas` bigint(20) DEFAULT '0',
  `precionotcedula` bigint(20) DEFAULT '0',
  `precionot44` bigint(20) DEFAULT '0',
  `precioembargo` bigint(20) DEFAULT '0',
  `precionotpersonal` bigint(20) DEFAULT '0',
  `totalapagar` bigint(30) DEFAULT '0',
  `pagohistorico` bigint(30) DEFAULT '0',
  `estadocobranza` varchar(30) DEFAULT '',
  `indem` bigint(35) DEFAULT '0',
  `ciudadnotificacion` varchar(30) DEFAULT '',
  `direcnot` varchar(30) DEFAULT '',
  `montofact` bigint(30) DEFAULT '0',
  `correo` varchar(30) DEFAULT '',
  `telefono` varchar(30) DEFAULT '',
  `idcobranza` varchar(30) DEFAULT '',
  `relacioncobranza` int(11) unsigned DEFAULT '0',
  `pagar` tinyint(1) DEFAULT '0',
  `rolrecursoqueja` varchar(40) DEFAULT '',
  `claseapelacion` varchar(255) DEFAULT '',
  `rolapelacion` varchar(40) DEFAULT '',
  `clasecasacion` varchar(255) DEFAULT '',
  `rolrecursocasacion` varchar(40) DEFAULT '',
  `rolrecursohecho` varchar(40) DEFAULT '',
  `formatoica` tinyint(1) DEFAULT '0',
  `fechaaudienciaconfe` date DEFAULT NULL,
  `nrofacturasus` varchar(20) DEFAULT '',
  `nrofacturaasesoria` varchar(20) DEFAULT '',
  `fechafacturasus` date DEFAULT NULL,
  `fechafacturaasesoria` date DEFAULT NULL,
  `fechavencimientofacturasus` date DEFAULT NULL,
  `fechavencimientofacturaas` date DEFAULT NULL,
  `totaldeudasus` bigint(30) DEFAULT '0',
  `totaldeudaas` bigint(40) DEFAULT '0',
  `deudatotal` bigint(40) DEFAULT '0',
  `bienesembargadosdc` varchar(255) DEFAULT '',
  `ddasinopsusas` tinyint(1) DEFAULT '0',
  `ddaconopsussas` tinyint(1) DEFAULT '0',
  `generargestprepsusas` tinyint(1) DEFAULT '0',
  `demandado` int(11) unsigned DEFAULT '0',
  `nrocaso` int(11) unsigned DEFAULT '0',
  `comuna` varchar(255) DEFAULT '',
  `tribunalradicadodc` varchar(255) DEFAULT '',
  `cortecompetente` varchar(255) DEFAULT '',
  `tribunalcompetentedc` varchar(255) DEFAULT '',
  `listaprueba` varchar(255) DEFAULT '',
  `fechaaudpend` varchar(255) DEFAULT '',
  PRIMARY KEY (`reconocimientodeudaid`),
  KEY `vtiger_reconocimientodeuda_relacioncobranza_idx` (`relacioncobranza`),
  KEY `vtiger_reconocimientodeuda_demandado_idx` (`demandado`),
  KEY `vtiger_reconocimientodeuda_nrocaso_idx` (`nrocaso`),
  CONSTRAINT `fk_1_vtiger_reconocimientodeudareconocimientodeudaid` FOREIGN KEY (`reconocimientodeudaid`) REFERENCES `vtiger_crmentity` (`crmid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_reconocimientodeuda_inventory`
--

CREATE TABLE `vtiger_reconocimientodeuda_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `reconocimientodeuda_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_reconocimientodeuda_invfield`
--

CREATE TABLE `vtiger_reconocimientodeuda_invfield` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `columnname` varchar(30) NOT NULL,
  `label` varchar(50) NOT NULL,
  `invtype` varchar(30) NOT NULL,
  `presence` smallint(1) unsigned NOT NULL DEFAULT '0',
  `defaultvalue` varchar(255) DEFAULT NULL,
  `sequence` int(10) unsigned NOT NULL,
  `block` smallint(1) unsigned NOT NULL,
  `displaytype` smallint(1) unsigned NOT NULL DEFAULT '1',
  `params` text,
  `colspan` smallint(1) unsigned NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_reconocimientodeuda_invmap`
--

CREATE TABLE `vtiger_reconocimientodeuda_invmap` (
  `module` varchar(50) NOT NULL,
  `field` varchar(50) NOT NULL,
  `tofield` varchar(50) NOT NULL,
  PRIMARY KEY (`module`,`field`,`tofield`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_reconocimientodeudacf`
--

CREATE TABLE `vtiger_reconocimientodeudacf` (
  `reconocimientodeudaid` int(11) NOT NULL,
  PRIMARY KEY (`reconocimientodeudaid`),
  CONSTRAINT `fk_1_vtiger_reconocimientodeudacfreconocimientodeudaid` FOREIGN KEY (`reconocimientodeudaid`) REFERENCES `vtiger_reconocimientodeuda` (`reconocimientodeudaid`) ON DELETE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_recurring_frequency`
--

CREATE TABLE `vtiger_recurring_frequency` (
  `recurring_frequency_id` int(10) DEFAULT NULL,
  `recurring_frequency` varchar(200) DEFAULT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_recurring_frequency_seq`
--

CREATE TABLE `vtiger_recurring_frequency_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_region`
--

CREATE TABLE `vtiger_region` (
  `regionid` int(11) NOT NULL AUTO_INCREMENT,
  `region` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`regionid`)
) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_regionbi1`
--

CREATE TABLE `vtiger_regionbi1` (
  `regionbi1id` int(11) NOT NULL AUTO_INCREMENT,
  `regionbi1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`regionbi1id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_regionbi2`
--

CREATE TABLE `vtiger_regionbi2` (
  `regionbi2id` int(11) NOT NULL AUTO_INCREMENT,
  `regionbi2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`regionbi2id`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_regioncli`
--

CREATE TABLE `vtiger_regioncli` (
  `regioncliid` int(11) NOT NULL AUTO_INCREMENT,
  `regioncli` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`regioncliid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_regiondelcaso`
--

CREATE TABLE `vtiger_regiondelcaso` (
  `regiondelcasoid` int(11) NOT NULL AUTO_INCREMENT,
  `regiondelcaso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`regiondelcasoid`)
) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8;

--
-- Table structure for table `vtiger_regiondelcliente`
--

