DROP TABLE IF EXISTS `16_menu_dinamico`;
CREATE TABLE `16_menu_dinamico` (
  `id` int(11) NOT NULL,
  `pai` int(11) NOT NULL DEFAULT '0',
  `icone` varchar(255) DEFAULT NULL,
  `descricao` varchar(255) NOT NULL DEFAULT '',
  `link` varchar(255) NOT NULL DEFAULT '',
  `ordenacao` int(11) NOT NULL DEFAULT '0',
  `target` varchar(10) NOT NULL,
  `hint` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Actulaizar_casos_borrados`;
CREATE TABLE `Actulaizar_casos_borrados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `caso` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `ClayCrm`;
CREATE TABLE `ClayCrm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) DEFAULT NULL,
  `Fecha_Emision` date NOT NULL,
  `Mes_Año` varchar(10) NOT NULL,
  `Codigo_SII` varchar(50) NOT NULL,
  `Tipo` varchar(100) NOT NULL,
  `Emitida_Recibida` varchar(50) NOT NULL,
  `Num_Factura` int(32) NOT NULL,
  `Nro_caso` varchar(100) DEFAULT NULL,
  `1er_Item` varchar(100) NOT NULL,
  `Razon_Social_Emisor` varchar(100) NOT NULL,
  `RUT_Emisor` varchar(100) NOT NULL,
  `Direccion_Emisor` varchar(100) NOT NULL,
  `Razon_Social_Receptor` varchar(100) NOT NULL,
  `RUT_Receptor` varchar(100) NOT NULL,
  `Direccion_Receptor` varchar(100) NOT NULL,
  `Exento` varchar(100) NOT NULL,
  `Neto` varchar(100) NOT NULL,
  `Total_Neto` varchar(100) NOT NULL,
  `IVA` varchar(100) NOT NULL,
  `Otros_Impuestos` varchar(100) NOT NULL,
  `Total` varchar(100) NOT NULL,
  `Saldo` varchar(100) NOT NULL,
  `Pagado` varchar(100) NOT NULL,
  `Contabilizado` varchar(100) NOT NULL,
  `Rechazado` varchar(100) NOT NULL,
  `Monto_Incobrable` varchar(100) NOT NULL,
  `Vendedor` varchar(100) DEFAULT NULL,
  `Email` varchar(100) DEFAULT NULL,
  `Telefono` varchar(100) DEFAULT NULL,
  `Telefono2` varchar(100) DEFAULT NULL,
  `Suscripcion_SUS` varchar(100) DEFAULT NULL,
  `Caso_Siniestro_SUS` varchar(100) DEFAULT NULL,
  `Estado_Caso_Siniestro_SUS` varchar(100) DEFAULT NULL,
  `Fecha_suscripcion_SUS` varchar(100) DEFAULT NULL,
  `Captador_SUS` varchar(100) DEFAULT NULL,
  `Monto_SUS` varchar(100) DEFAULT NULL,
  `Saldo_CRM_SUS` varchar(100) DEFAULT NULL,
  `Estado_Factura_SUS` varchar(100) DEFAULT NULL,
  `Nro_Factura_SUS` varchar(100) DEFAULT NULL,
  `Fecha_Factura_SUS` varchar(100) DEFAULT NULL,
  `Nota_Credito_SUS` int(1) DEFAULT NULL,
  `Pagada_NC_SUS` varchar(100) DEFAULT NULL,
  `Nro_Nota_Credito_SUS` varchar(100) DEFAULT NULL,
  `Rut_Cliente_SUS` varchar(100) DEFAULT NULL,
  `Suscripcion_DDA` varchar(100) DEFAULT NULL,
  `Caso_Siniestro_DDA` varchar(100) DEFAULT NULL,
  `Estado_Caso_Siniestro_DDA` varchar(100) DEFAULT NULL,
  `Estado_Demanda_DDA` varchar(100) DEFAULT NULL,
  `Fecha_suscripcion_DDA` varchar(100) DEFAULT NULL,
  `Captador_DDA` varchar(100) DEFAULT NULL,
  `Monto_DDA` varchar(100) DEFAULT NULL,
  `Saldo_CRM_DDA` varchar(100) DEFAULT NULL,
  `Nro_Factura_DDA` varchar(100) DEFAULT NULL,
  `Estado_Factura_DDA` varchar(100) DEFAULT NULL,
  `Rut_Cliente_DDA` varchar(100) DEFAULT NULL,
  `Cobranza_COB` varchar(100) DEFAULT NULL,
  `Caso_Siniestro_COB` varchar(100) DEFAULT NULL,
  `Estado_Caso_Siniestro_COB` varchar(100) DEFAULT NULL,
  `Nro_Factura_COB` varchar(100) DEFAULT NULL,
  `Monto_Factura_COB` varchar(100) DEFAULT NULL,
  `Fecha_Factura_COB` varchar(100) DEFAULT NULL,
  `Estado_Cobranza_COB` varchar(100) DEFAULT NULL,
  `Rut_Cliente_COB` varchar(100) DEFAULT NULL,
  `Valida_RUT_OK` varchar(100) DEFAULT NULL,
  `Valida_Monto_OK` varchar(100) DEFAULT NULL,
  `Valida_Fecha_OK` varchar(100) DEFAULT NULL,
  `OK_SALDO_COBRA` varchar(100) DEFAULT NULL,
  `OK_SALDO_SUS` varchar(100) DEFAULT NULL,
  `OK_SALDO_SUS_DDA` varchar(100) DEFAULT NULL,
  `Valida_Estado_OK` varchar(100) DEFAULT NULL,
  `Valida_Existe_OK` varchar(100) DEFAULT NULL,
  `SUSCRIPCION_EX` int(2) DEFAULT NULL,
  `SUSCRIPCION_DDA_EX` int(2) DEFAULT NULL,
  `COBRANZA_EX` int(2) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2037 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `ClayCrm_comision`;
CREATE TABLE `ClayCrm_comision` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) NOT NULL,
  `Fecha_Emision` datetime NOT NULL,
  `Mes_Año` varchar(10) NOT NULL,
  `Codigo_SII` varchar(50) NOT NULL,
  `Tipo` varchar(10) NOT NULL,
  `Emitida_Recibida` varchar(50) NOT NULL,
  `Num_Factura` int(32) NOT NULL,
  `Nro_caso` varchar(100) NOT NULL,
  `1er_Item` varchar(100) NOT NULL,
  `Razon_Social_Emisor` varchar(100) NOT NULL,
  `RUT_Emisor` varchar(100) NOT NULL,
  `Direccion_Emisor` varchar(100) NOT NULL,
  `Razon_Social_Receptor` varchar(100) NOT NULL,
  `RUT_Receptor` varchar(100) NOT NULL,
  `Direccion_Receptor` varchar(100) NOT NULL,
  `Exento` varchar(100) NOT NULL,
  `Neto` varchar(100) NOT NULL,
  `Total_Neto` varchar(100) NOT NULL,
  `IVA` varchar(100) NOT NULL,
  `Otros_Impuestos` varchar(100) NOT NULL,
  `Total` varchar(100) NOT NULL,
  `Saldo` varchar(100) NOT NULL,
  `Pagado` varchar(100) NOT NULL,
  `Contabilizado` varchar(100) NOT NULL,
  `Rechazado` varchar(100) NOT NULL,
  `Monto_Incobrable` varchar(100) NOT NULL,
  `Vendedor` varchar(100) NOT NULL,
  `Email` varchar(100) NOT NULL,
  `Telefono` varchar(100) NOT NULL,
  `Telefono2` varchar(100) NOT NULL,
  `Suscripcion_SUS` varchar(100) NOT NULL,
  `Caso_Siniestro_SUS` varchar(100) NOT NULL,
  `Estado_Caso_Siniestro_SUS` varchar(100) NOT NULL,
  `Fecha_suscripcion_SUS` varchar(100) NOT NULL,
  `Captador_SUS` varchar(100) NOT NULL,
  `Monto_SUS` varchar(100) NOT NULL,
  `Saldo_CRM_SUS` varchar(100) NOT NULL,
  `Estado_Factura_SUS` varchar(100) NOT NULL,
  `Nro_Factura_SUS` varchar(100) NOT NULL,
  `Fecha_Factura_SUS` varchar(100) NOT NULL,
  `Nota_Credito_SUS` int(1) NOT NULL,
  `Pagada_NC_SUS` varchar(100) NOT NULL,
  `Nro_Nota_Credito_SUS` varchar(100) NOT NULL,
  `Rut_Cliente_SUS` varchar(100) NOT NULL,
  `Suscripcion_DDA` varchar(100) NOT NULL,
  `Caso_Siniestro_DDA` varchar(100) NOT NULL,
  `Estado_Caso_Siniestro_DDA` varchar(100) NOT NULL,
  `Estado_Demanda_DDA` varchar(100) NOT NULL,
  `Fecha_suscripcion_DDA` varchar(100) NOT NULL,
  `Captador_DDA` varchar(100) NOT NULL,
  `Monto_DDA` varchar(100) NOT NULL,
  `Saldo_CRM_DDA` varchar(100) NOT NULL,
  `Nro_Factura_DDA` varchar(100) NOT NULL,
  `Estado_Factura_DDA` varchar(100) NOT NULL,
  `Rut_Cliente_DDA` varchar(100) NOT NULL,
  `Cobranza_COB` varchar(100) NOT NULL,
  `Caso_Siniestro_COB` varchar(100) NOT NULL,
  `Estado_Caso_Siniestro_COB` varchar(100) NOT NULL,
  `Nro_Factura_COB` varchar(100) NOT NULL,
  `Monto_Factura_COB` varchar(100) NOT NULL,
  `Fecha_Factura_COB` varchar(100) NOT NULL,
  `Estado_Cobranza_COB` varchar(100) NOT NULL,
  `Rut_Cliente_COB` varchar(100) NOT NULL,
  `Valida_RUT_OK` varchar(100) NOT NULL,
  `Valida_Monto_OK` varchar(100) NOT NULL,
  `Valida_Fecha_OK` varchar(100) NOT NULL,
  `OK_SALDO_COBRA` varchar(100) NOT NULL,
  `OK_SALDO_SUS` varchar(100) NOT NULL,
  `OK_SALDO_SUS_DDA` varchar(100) NOT NULL,
  `Valida_Estado_OK` varchar(100) NOT NULL,
  `Valida_Existe_OK` varchar(100) NOT NULL,
  `SUSCRIPCION_EX` int(2) NOT NULL,
  `SUSCRIPCION_DDA_EX` int(2) NOT NULL,
  `COBRANZA_EX` int(2) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3365 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `ClayDuplicados`;
CREATE TABLE `ClayDuplicados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_Modulo` varchar(100) NOT NULL,
  `Rut_Cliente_crm` varchar(100) NOT NULL,
  `Nro_Siniestro` varchar(100) NOT NULL,
  `Nro_Factura_Duplicada` varchar(100) NOT NULL,
  `Modulo` varchar(100) NOT NULL,
  `Fecha_Factura_clay` varchar(100) NOT NULL,
  `Fecha_Factura_crm` varchar(100) NOT NULL,
  `Monto_clay` int(10) NOT NULL,
  `Saldo_clay` int(10) NOT NULL,
  `Monto_crm` int(10) NOT NULL,
  `Saldo_crm` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Clay_comision_pagos`;
CREATE TABLE `Clay_comision_pagos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Nro_de_Caso_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Nombre_del_Cliente_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Valor_del_Plan_Suscripción` varchar(100) NOT NULL,
  `Captador_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Fecha_de_creación_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Tipo_de_Siniestro_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Contrato_Firmado_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Abono_Pagado_Suscripción` varchar(100) NOT NULL,
  `Fecha_de_Pago_Abono_Suscripción` varchar(100) NOT NULL,
  `Nro_de_Factura_Suscripción` varchar(100) NOT NULL,
  `Valor_del_Plan_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Comisión_Pagada_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Fecha_Pago_Comisión_Caso_de_Siniestro` varchar(100) NOT NULL,
  `Ciudad_(Siniestro)_Caso_de_Siniestro` varchar(100) NOT NULL,
  `fecha_de_firma` varchar(100) NOT NULL,
  `firma_ok` varchar(100) NOT NULL,
  `fecha_deabono_pagado` varchar(100) NOT NULL,
  `pagado_si` varchar(100) NOT NULL,
  `cuanto_pago` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=66 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Claycons_cobra`;
CREATE TABLE `Claycons_cobra` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) NOT NULL,
  `Nro_Caso` varchar(100) NOT NULL,
  `Estado_Siniestro` varchar(100) NOT NULL,
  `Estado_de_Cobranza` varchar(100) NOT NULL,
  `Num_Factura_clay` int(10) NOT NULL,
  `Num_Factura_crm` int(10) NOT NULL,
  `Rev_Nro_Factura_clay_crm` varchar(100) NOT NULL,
  `Fecha_Emision_Factura_clay` varchar(100) NOT NULL,
  `Fecha_de_Factura_crm` varchar(100) NOT NULL,
  `Rev_Fecha_Factura_clay_crm` varchar(100) NOT NULL,
  `Rut_Cliente_clay` varchar(100) NOT NULL,
  `Rut_Cliente_crm` varchar(100) NOT NULL,
  `Rev_Rut_Cliente_clay_crm` varchar(100) NOT NULL,
  `Nombre` varchar(100) NOT NULL,
  `Email` varchar(100) NOT NULL,
  `Telefono_1` varchar(100) NOT NULL,
  `Telefono_2` varchar(100) NOT NULL,
  `Monto_clay` int(10) NOT NULL,
  `Valor_Factura_Pesos` int(10) NOT NULL,
  `Saldo_CLAY` int(10) NOT NULL,
  `Saldo_CRM` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=128 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Claycons_sus`;
CREATE TABLE `Claycons_sus` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) NOT NULL,
  `Nro_Caso` varchar(100) NOT NULL,
  `Estado_Siniestro` varchar(100) NOT NULL,
  `Num_Factura_clay` int(10) NOT NULL,
  `Num_Factura_crm` int(10) NOT NULL,
  `Rev_Nro_Factura_clay_crm` varchar(100) NOT NULL,
  `Fecha_Emision_Factura_clay` varchar(100) NOT NULL,
  `Fecha_de_Factura_crm` varchar(100) NOT NULL,
  `Rev_Fecha_Factura_clay_crm` varchar(100) NOT NULL,
  `Rut_Cliente_clay` varchar(100) NOT NULL,
  `Rut_Cliente_crm` varchar(100) NOT NULL,
  `Rev_Rut_Cliente_clay_crm` varchar(100) NOT NULL,
  `Nombre` varchar(100) NOT NULL,
  `Email` varchar(100) NOT NULL,
  `Telefono_1` varchar(100) NOT NULL,
  `Telefono_2` varchar(100) NOT NULL,
  `Comuna` varchar(100) NOT NULL,
  `Monto_del_presupuesto` int(10) NOT NULL,
  `Monto_clay` int(10) NOT NULL,
  `Valor_del_Plan` int(10) NOT NULL,
  `Saldo_CLAY` int(10) NOT NULL,
  `Saldo_CRM` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1122 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Claycons_sus_cobra`;
CREATE TABLE `Claycons_sus_cobra` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo_sus` varchar(100) NOT NULL,
  `Nro_Caso_sus` varchar(100) NOT NULL,
  `Estado_Siniestro_sus` varchar(100) NOT NULL,
  `Num_Factura_clay_sus` int(10) NOT NULL,
  `Num_Factura_crm_sus` int(10) NOT NULL,
  `Rev_Nro_Factura_clay_crm_sus` varchar(100) NOT NULL,
  `Fecha_Emision_Factura_clay_sus` varchar(100) NOT NULL,
  `Fecha_de_Factura_crm_sus` varchar(100) NOT NULL,
  `Rev_Fecha_Factura_clay_crm_sus` varchar(100) NOT NULL,
  `Rut_Cliente_clay_sus` varchar(100) NOT NULL,
  `Rut_Cliente_crm_sus` varchar(100) NOT NULL,
  `Rev_Rut_Cliente_clay_crm_sus` varchar(100) NOT NULL,
  `Nombre_sus` varchar(100) NOT NULL,
  `Email_sus` varchar(100) NOT NULL,
  `Telefono_1_sus` varchar(100) NOT NULL,
  `Telefono_2_sus` varchar(100) NOT NULL,
  `Comuna_sus` varchar(100) NOT NULL,
  `Monto_del_presupuesto_sus` int(10) NOT NULL,
  `Monto_clay_Sus` int(10) NOT NULL,
  `Valor_del_Plan_sus` int(10) NOT NULL,
  `Saldo_CLAY_sus` int(10) NOT NULL,
  `Saldo_CRM_Sus` int(10) NOT NULL,
  `Modulo_cobra` varchar(100) NOT NULL,
  `Nro_Caso_cobra` varchar(100) NOT NULL,
  `Estado_Siniestro_cobra` varchar(100) NOT NULL,
  `Estado_de_Cobranza_cobra` varchar(100) NOT NULL,
  `Num_Factura_clay_cobra` int(10) NOT NULL,
  `Num_Factura_crm_cobra` int(10) NOT NULL,
  `Rev_Nro_Factura_clay_crm_cobra` varchar(100) NOT NULL,
  `Fecha_Emision_Factura_clay_cobra` varchar(100) NOT NULL,
  `Fecha_de_Factura_crm_cobra` varchar(100) NOT NULL,
  `Rev_Fecha_Factura_clay_crm_cobra` varchar(100) NOT NULL,
  `Rut_Cliente_clay_cobra` varchar(100) NOT NULL,
  `Rut_Cliente_crm_cobra` varchar(100) NOT NULL,
  `Rev_Rut_Cliente_clay_crm_cobra` varchar(100) NOT NULL,
  `Nombre_cobra` varchar(100) NOT NULL,
  `Email_cobra` varchar(100) NOT NULL,
  `Telefono_1_cobra` varchar(100) NOT NULL,
  `Telefono_2_cobra` varchar(100) NOT NULL,
  `Monto_clay_cobra` int(10) NOT NULL,
  `Valor_Factura_Pesos_cobra` int(10) NOT NULL,
  `Saldo_CLAY_cobra` int(10) NOT NULL,
  `Saldo_CRM_cobra` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=187 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Claycons_sus_da`;
CREATE TABLE `Claycons_sus_da` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) NOT NULL,
  `Nro_Caso` varchar(100) NOT NULL,
  `Estado_Siniestro` varchar(100) NOT NULL,
  `Estado_Comercial_Demanda` varchar(100) NOT NULL,
  `Num_Factura_clay` int(10) NOT NULL,
  `Num_Factura_crm` int(10) NOT NULL,
  `Rev_Nro_Factura_clay_crm` varchar(100) NOT NULL,
  `Fecha_Emision_Factura_clay` varchar(100) NOT NULL,
  `Fecha_de_Factura_crm` varchar(100) NOT NULL,
  `Rev_Fecha_Factura_clay_crm` varchar(100) NOT NULL,
  `Rut_Cliente_clay` varchar(100) NOT NULL,
  `Rut_Cliente_crm` varchar(100) NOT NULL,
  `Rev_Rut_Cliente_clay_crm` varchar(100) NOT NULL,
  `Nombre` varchar(100) NOT NULL,
  `Email` varchar(100) NOT NULL,
  `Telefono_1` varchar(100) NOT NULL,
  `Telefono_2` varchar(100) NOT NULL,
  `Monto_clay` int(10) NOT NULL,
  `Valor_del_Plan` int(10) NOT NULL,
  `Saldo_CLAY` int(10) NOT NULL,
  `Saldo_CRM` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=188 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Claycons_sus_y_dda`;
CREATE TABLE `Claycons_sus_y_dda` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) NOT NULL,
  `Nro_Caso` varchar(100) NOT NULL,
  `Estado_Siniestro` varchar(100) NOT NULL,
  `Rut` varchar(100) DEFAULT NULL,
  `Nombre` varchar(100) NOT NULL,
  `Email` varchar(100) NOT NULL,
  `Telefono_1` varchar(100) NOT NULL,
  `Telefono_2` varchar(100) NOT NULL,
  `Comuna` varchar(100) DEFAULT NULL,
  `Monto_del_presupuesto` int(10) DEFAULT NULL,
  `Num_Factura_crm_sus` int(10) NOT NULL,
  `Fecha_de_Factura_crm_sus` varchar(100) DEFAULT NULL,
  `Fecha_Emision_Factura_clay_sus` varchar(100) NOT NULL,
  `Monto_clay_sus` int(10) NOT NULL,
  `Valor_del_Plan_sus` int(10) NOT NULL,
  `Saldo_CLAY_sus` int(10) NOT NULL,
  `Saldo_CRM_sus` int(10) NOT NULL,
  `Num_Factura_crm_dda` int(10) DEFAULT NULL,
  `Fecha_de_Factura_crm_dda` varchar(100) NOT NULL,
  `Fecha_Emision_Factura_clay_dda` varchar(100) DEFAULT NULL,
  `Monto_clay_dda` int(10) DEFAULT NULL,
  `Valor_del_Plan_dda` int(10) DEFAULT NULL,
  `Saldo_CLAY_dda` int(10) DEFAULT NULL,
  `Saldo_CRM_dda` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Duplicados`;
CREATE TABLE `Duplicados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_Modulo` varchar(100) NOT NULL,
  `Nro_Siniestro` varchar(100) NOT NULL,
  `Nro_Factura_Duplicada` varchar(100) NOT NULL,
  `Modulo` varchar(100) NOT NULL,
  `Fecha_Factura_clay` varchar(100) NOT NULL,
  `Fecha_Factura_crm` varchar(100) NOT NULL,
  `Monto_clay` int(10) NOT NULL,
  `Saldo_clay` int(10) NOT NULL,
  `Monto_crm` int(10) NOT NULL,
  `Saldo_crm` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Estado_PORTAL`;
CREATE TABLE `Estado_PORTAL` (
  `Estado` varchar(255) NOT NULL,
  `edo_complete` varchar(255) DEFAULT NULL,
  `descripcion` varchar(255) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `Gen_Cert_convenios`;
CREATE TABLE `Gen_Cert_convenios` (
  `id_gen_cer_cov` int(11) NOT NULL AUTO_INCREMENT,
  `Rut_GCC` varchar(100) NOT NULL,
  `Nombre_GCC` varchar(100) NOT NULL,
  `N_Acuerdo_GCC` varchar(100) NOT NULL,
  `N_Factura_GCC` varchar(100) NOT NULL,
  `Monto_Cancelado_GCC` int(10) NOT NULL,
  `Fecha_Aclaracion_GCC` date NOT NULL,
  `Fecha _e_Emision_del_Certificado_GCC` date NOT NULL,
  `Correo_del_Cliente_para_enviar_Certificado_GCC` varchar(100) NOT NULL,
  `est_env_correo_GCC` int(1) NOT NULL,
  PRIMARY KEY (`id_gen_cer_cov`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Ingreso_crm`;
CREATE TABLE `Ingreso_crm` (
  `id_auto` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `id` varchar(20) NOT NULL DEFAULT '',
  `ingresado` bit(1) NOT NULL DEFAULT b'0',
  `fecha_contrato` varchar(45) NOT NULL DEFAULT '',
  `dia` varchar(45) NOT NULL DEFAULT '',
  `mes` varchar(45) NOT NULL DEFAULT '',
  `ano` varchar(45) NOT NULL DEFAULT '',
  `nombres` varchar(45) NOT NULL DEFAULT '',
  `apellidos` varchar(45) NOT NULL DEFAULT '',
  `rut_cliente1` double NOT NULL DEFAULT '0',
  `digito_verificador` varchar(45) NOT NULL DEFAULT '',
  `numero_de_serie` varchar(45) NOT NULL DEFAULT '',
  `estado_civil` varchar(45) NOT NULL DEFAULT '',
  `profesion` varchar(45) NOT NULL DEFAULT '',
  `nacionalidad` varchar(45) NOT NULL DEFAULT '',
  `email_contacto` varchar(45) NOT NULL DEFAULT '',
  `telefono_celular` varchar(45) NOT NULL DEFAULT '',
  `telefono_alternativo` varchar(45) NOT NULL DEFAULT '',
  `calle_cliente` varchar(45) NOT NULL DEFAULT '',
  `comuna_cliente` varchar(45) NOT NULL DEFAULT '',
  `provincia_cliente` varchar(45) NOT NULL DEFAULT '',
  `region_cliente` varchar(45) NOT NULL DEFAULT '',
  `calle_caso` varchar(200) NOT NULL,
  `comuna_caso` varchar(45) NOT NULL DEFAULT '',
  `provincia_caso` varchar(45) NOT NULL DEFAULT '',
  `region_caso` varchar(45) NOT NULL DEFAULT '',
  `tipo_siniestro` varchar(45) NOT NULL DEFAULT '',
  `tipo_propiedad` varchar(45) NOT NULL DEFAULT '',
  `banco` varchar(45) NOT NULL DEFAULT '',
  `compania_seguros` varchar(45) NOT NULL DEFAULT '',
  `m2_aproximados` double NOT NULL DEFAULT '0',
  `valor_uf_estimado` double NOT NULL DEFAULT '0',
  `ejecutivo` varchar(45) NOT NULL DEFAULT '',
  `email_del_ejecutivo` varchar(45) NOT NULL DEFAULT '',
  `celular_del_ejecutivo` varchar(45) NOT NULL DEFAULT '',
  `observaciones_para_coordinar_` varchar(45) NOT NULL DEFAULT '',
  `validado` varchar(45) NOT NULL DEFAULT '',
  `dias_de_pago1` varchar(45) NOT NULL DEFAULT '',
  `nro_de_cuotas` varchar(45) NOT NULL DEFAULT '',
  `valor_de_cuotas` varchar(45) NOT NULL DEFAULT '',
  `abono` varchar(45) NOT NULL DEFAULT '',
  `valor_total_del_servicio` varchar(45) NOT NULL DEFAULT '',
  `tipo_de_plan` varchar(45) NOT NULL DEFAULT '',
  `caso_con_gestion_previa` varchar(45) NOT NULL DEFAULT '',
  `asesorseguros` varchar(45) NOT NULL DEFAULT '',
  `Tipo_de_pago` varchar(100) NOT NULL,
  `Tiene_arrendatario` int(11) NOT NULL,
  `Nombre_arrendataario` varchar(100) NOT NULL,
  `Telefono_arrendatario` varchar(100) NOT NULL,
  `Coordenada_completa` varchar(100) NOT NULL,
  `Latitud` varchar(100) NOT NULL,
  `Longitud` varchar(100) NOT NULL,
  `proviene_de` varchar(200) NOT NULL,
  `Rango_Horario_PREINSPECCION` varchar(200) NOT NULL,
  `Dias_Disponibles_Preinspeccion` varchar(200) NOT NULL,
  `Bloquefecha1` varchar(250) NOT NULL,
  `Bloquefecha2` varchar(250) NOT NULL,
  `Lunes` varchar(1) NOT NULL DEFAULT '0',
  `Martes` varchar(1) NOT NULL DEFAULT '0',
  `Miercoles` varchar(1) NOT NULL DEFAULT '0',
  `Jueves` varchar(1) NOT NULL DEFAULT '0',
  `Viernes` varchar(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id_auto`)
) ENGINE=InnoDB AUTO_INCREMENT=7331 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `LeadsNuevos`;
CREATE TABLE `LeadsNuevos` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `comuna` varchar(100) NOT NULL,
  `correo` varchar(100) NOT NULL,
  `telefono` varchar(100) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1027 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Reporte_Clientes_monflow`;
CREATE TABLE `Reporte_Clientes_monflow` (
  `Tipo_doc` int(11) DEFAULT NULL,
  `Num_documento` varchar(20) DEFAULT NULL,
  `Nombres` varchar(100) DEFAULT NULL,
  `Apellidos` varchar(100) DEFAULT NULL,
  `Genero` char(1) DEFAULT NULL,
  `Fecha_de_Nacimiento` date DEFAULT NULL,
  `Celular_1` varchar(20) DEFAULT NULL,
  `Celular_2` varchar(20) DEFAULT NULL,
  `Correo_1` varchar(100) DEFAULT NULL,
  `Correo_2` varchar(100) DEFAULT NULL,
  `ID_ext_cliente` varchar(20) DEFAULT NULL,
  `Indicador_Dia` int(11) DEFAULT NULL,
  `Prop_Pago` int(11) DEFAULT NULL,
  `Canal_comunicacion_preferido` int(11) DEFAULT NULL,
  `Canal_de_pago_Preferido` int(11) DEFAULT NULL,
  `Estado` varchar(50) DEFAULT NULL,
  `Variable_1` varchar(50) DEFAULT NULL,
  `Variable_2` varchar(50) DEFAULT NULL,
  `Variable_3` varchar(50) DEFAULT NULL,
  `Variable_4` varchar(50) DEFAULT NULL,
  `Variable_5` varchar(50) DEFAULT NULL,
  `Variable_6` varchar(50) DEFAULT NULL,
  `Variable_7` varchar(50) DEFAULT NULL,
  `Variable_8` varchar(50) DEFAULT NULL,
  `Variable_9` varchar(50) DEFAULT NULL,
  `Variable_10` varchar(50) DEFAULT NULL,
  `Asesor_Id` varchar(20) DEFAULT NULL,
  `Referencia_1_nombre` varchar(100) DEFAULT NULL,
  `Referencia_1_apellido` varchar(100) DEFAULT NULL,
  `Referencia_1_telefono` varchar(20) DEFAULT NULL,
  `Referencia_1_correo_electronico` varchar(100) DEFAULT NULL,
  `Referencia_2_nombre` varchar(100) DEFAULT NULL,
  `Referencia_2_apellido` varchar(100) DEFAULT NULL,
  `Referencia_2_telefono` varchar(20) DEFAULT NULL,
  `Referencia_2_correo_electronico` varchar(100) DEFAULT NULL,
  `Garante_1_nombre` varchar(100) DEFAULT NULL,
  `Garante_1_apellido` varchar(100) DEFAULT NULL,
  `Garante_1_telefono` varchar(20) DEFAULT NULL,
  `Garante_1_correo_electronico` varchar(100) DEFAULT NULL,
  `Garante_2_nombre` varchar(100) DEFAULT NULL,
  `Garante_2_apellido` varchar(100) DEFAULT NULL,
  `Garante_2_telefono` varchar(20) DEFAULT NULL,
  `Garante_2_correo_electronico` varchar(100) DEFAULT NULL,
  `Deleted` int(11) DEFAULT NULL,
  `Celular_1_codigo_pais` int(11) DEFAULT NULL,
  `Celular_2_codigo_pais` int(11) DEFAULT NULL,
  `Referencia_1_telefono_codigo_pais` int(11) DEFAULT NULL,
  `Referencia_2_telefono_codigo_pais` int(11) DEFAULT NULL,
  `Garante_1_telefono_codigo_pais` int(11) DEFAULT NULL,
  `Garante_2_telefono_codigo_pais` int(11) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Reporte_Ordenes_Pago`;
CREATE TABLE `Reporte_Ordenes_Pago` (
  `Tipo_doc` int(11) DEFAULT NULL,
  `Num_documento` varchar(20) DEFAULT NULL,
  `Producto` varchar(100) DEFAULT NULL,
  `Codigo_de_pago` varchar(20) DEFAULT NULL,
  `Cuota` int(11) DEFAULT NULL,
  `ID_ext_cliente` varchar(20) DEFAULT NULL,
  `Moneda` varchar(10) DEFAULT NULL,
  `Monto_OP` int(10) DEFAULT NULL,
  `Cargos_Intereses_OP` decimal(10,2) DEFAULT NULL,
  `Monto_total` decimal(10,2) DEFAULT NULL,
  `Fecha_vencimiento` date DEFAULT NULL,
  `Dias_de_atraso` int(11) DEFAULT NULL,
  `Estado` varchar(50) DEFAULT NULL,
  `Fecha_de_emision` date DEFAULT NULL,
  `ID_ext_orden` varchar(20) DEFAULT NULL,
  `Estado_Caso` varchar(50) DEFAULT NULL,
  `Captador` varchar(100) DEFAULT NULL,
  `Nombre` varchar(100) DEFAULT NULL,
  `Email` varchar(100) DEFAULT NULL,
  `Telefono` varchar(20) DEFAULT NULL,
  `Comuna` varchar(50) DEFAULT NULL,
  `Contrato_Firmado` varchar(2) DEFAULT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Reporte_clientes_garantia_v1`;
CREATE TABLE `Reporte_clientes_garantia_v1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fecha_siniestro` varchar(50) DEFAULT NULL,
  `comuna_caso` varchar(255) DEFAULT NULL,
  `cont_plat` varchar(10) DEFAULT NULL,
  `estado_caso_siniestro` varchar(255) DEFAULT NULL,
  `nro_caso` varchar(50) DEFAULT NULL,
  `banco_caso_siniestro` varchar(255) DEFAULT NULL,
  `nombre_cliente_caso_siniestro` varchar(255) DEFAULT NULL,
  `rut_cliente` varchar(20) DEFAULT NULL,
  `fact_pag_sus` varchar(10) DEFAULT NULL,
  `direccion_siniestro` varchar(255) DEFAULT NULL,
  `comuna_siniestro` varchar(255) DEFAULT NULL,
  `monto_presupuesto` varchar(50) DEFAULT NULL,
  `tipo_siniestro` varchar(100) DEFAULT NULL,
  `nro_siniestro` varchar(50) DEFAULT NULL,
  `fecha_siniestro_original` varchar(50) DEFAULT NULL,
  `compania_seguros` varchar(255) DEFAULT NULL,
  `liquidadora` varchar(255) DEFAULT NULL,
  `perd_rec_uf` varchar(50) DEFAULT NULL,
  `perd_rec_pesos` varchar(50) DEFAULT NULL,
  `perd_det_uf` varchar(50) DEFAULT NULL,
  `perd_ind` varchar(50) DEFAULT NULL,
  `cobertura` varchar(50) DEFAULT NULL,
  `movil_cliente` varchar(20) DEFAULT NULL,
  `rut_cliente_contacto` varchar(20) DEFAULT NULL,
  `nombre_cliente_contacto` varchar(100) DEFAULT NULL,
  `apellido_cliente_contacto` varchar(100) DEFAULT NULL,
  `correo_cliente` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Reporte_clientes_garantia_v11`;
CREATE TABLE `Reporte_clientes_garantia_v11` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `fecha_siniestro` varchar(50) DEFAULT NULL,
  `comuna_caso` varchar(255) DEFAULT NULL,
  `cont_plat` varchar(10) DEFAULT NULL,
  `estado_caso_siniestro` varchar(255) DEFAULT NULL,
  `nro_caso` varchar(50) DEFAULT NULL,
  `banco_caso_siniestro` varchar(255) DEFAULT NULL,
  `nombre_cliente_caso_siniestro` varchar(255) DEFAULT NULL,
  `rut_cliente` varchar(20) DEFAULT NULL,
  `fact_pag_sus` varchar(10) DEFAULT NULL,
  `direccion_siniestro` varchar(255) DEFAULT NULL,
  `comuna_siniestro` varchar(255) DEFAULT NULL,
  `monto_presupuesto` varchar(50) DEFAULT NULL,
  `tipo_siniestro` varchar(100) DEFAULT NULL,
  `nro_siniestro` varchar(50) DEFAULT NULL,
  `fecha_siniestro_original` varchar(50) DEFAULT NULL,
  `compania_seguros` varchar(255) DEFAULT NULL,
  `liquidadora` varchar(255) DEFAULT NULL,
  `perd_rec_uf1` varchar(50) DEFAULT NULL,
  `perd_rec_uf2` varchar(50) DEFAULT NULL,
  `perd_det_uf` varchar(50) DEFAULT NULL,
  `perd_rec_pesos` varchar(50) DEFAULT NULL,
  `perd_ind` varchar(50) DEFAULT NULL,
  `cobertura` varchar(50) DEFAULT NULL,
  `movil_cliente` varchar(20) DEFAULT NULL,
  `rut_cliente_contacto` varchar(20) DEFAULT NULL,
  `nombre_cliente_contacto` varchar(100) DEFAULT NULL,
  `apellido_cliente_contacto` varchar(100) DEFAULT NULL,
  `correo_cliente` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2427 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `Sheyet1`;
CREATE TABLE `Sheyet1` (
  `field_A` int(10) DEFAULT NULL,
  `field_B` date DEFAULT NULL,
  `field_C` varchar(255) DEFAULT NULL,
  `field_D` varchar(255) DEFAULT NULL,
  `field_E` varchar(255) DEFAULT NULL,
  `field_F` varchar(255) DEFAULT NULL,
  `field_G` varchar(255) DEFAULT NULL,
  `field_H` varchar(255) DEFAULT NULL,
  `field_I` varchar(255) DEFAULT NULL,
  `field_J` varchar(255) DEFAULT NULL,
  `field_K` varchar(255) DEFAULT NULL,
  `field_L` varchar(255) DEFAULT NULL,
  `field_M` varchar(255) DEFAULT NULL,
  `field_N` varchar(255) DEFAULT NULL,
  `field_O` int(10) DEFAULT NULL,
  `field_P` int(10) DEFAULT NULL,
  `field_Q` int(10) DEFAULT NULL,
  `field_R` int(10) DEFAULT NULL,
  `field_S` int(10) DEFAULT NULL,
  `field_T` int(10) DEFAULT NULL,
  `field_U` int(10) DEFAULT NULL,
  `field_V` varchar(255) DEFAULT NULL,
  `field_W` varchar(255) DEFAULT NULL,
  `field_X` varchar(255) DEFAULT NULL,
  `field_Y` int(10) DEFAULT NULL,
  `field_Z` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_adv_permission`;
CREATE TABLE `a_yf_adv_permission` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `tabid` smallint(5) DEFAULT NULL,
  `status` tinyint(1) unsigned NOT NULL,
  `action` tinyint(1) unsigned NOT NULL,
  `conditions` text,
  `members` text NOT NULL,
  `priority` tinyint(1) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `tabid` (`tabid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_bruteforce`;
CREATE TABLE `a_yf_bruteforce` (
  `attempsnumber` tinyint(2) NOT NULL,
  `timelock` smallint(5) NOT NULL,
  `active` tinyint(1) DEFAULT '0',
  `sent` tinyint(1) DEFAULT '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_bruteforce_blocked`;
CREATE TABLE `a_yf_bruteforce_blocked` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `ip` varchar(50) NOT NULL,
  `time` timestamp NULL DEFAULT NULL,
  `attempts` tinyint(2) DEFAULT '0',
  `blocked` tinyint(1) DEFAULT '0',
  `userid` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `bf1_mixed` (`ip`,`time`,`blocked`)
) ENGINE=InnoDB AUTO_INCREMENT=1552 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_discounts_config`;
CREATE TABLE `a_yf_discounts_config` (
  `param` varchar(30) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY (`param`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_discounts_global`;
CREATE TABLE `a_yf_discounts_global` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `value` decimal(5,2) unsigned NOT NULL DEFAULT '0.00',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_encryption`;
CREATE TABLE `a_yf_encryption` (
  `method` varchar(40) NOT NULL,
  `pass` varchar(16) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_inventory_limits`;
CREATE TABLE `a_yf_inventory_limits` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `name` varchar(50) NOT NULL,
  `value` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  KEY `status` (`status`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_mapped_config`;
CREATE TABLE `a_yf_mapped_config` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `tabid` smallint(5) unsigned NOT NULL,
  `reltabid` smallint(5) unsigned NOT NULL,
  `status` tinyint(1) unsigned DEFAULT '0',
  `conditions` text,
  `permissions` varchar(255) DEFAULT NULL,
  `params` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `tabid` (`tabid`),
  KEY `reltabid` (`reltabid`),
  KEY `tabid_2` (`tabid`,`status`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_pdf`;
CREATE TABLE `a_yf_pdf` (
  `pdfid` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id of record',
  `module_name` varchar(25) NOT NULL COMMENT 'name of the module',
  `header_content` text NOT NULL,
  `body_content` text NOT NULL,
  `footer_content` text NOT NULL,
  `status` tinyint(1) NOT NULL DEFAULT '0',
  `primary_name` varchar(255) NOT NULL,
  `secondary_name` varchar(255) NOT NULL,
  `meta_author` varchar(255) NOT NULL,
  `meta_creator` varchar(255) NOT NULL,
  `meta_keywords` varchar(255) NOT NULL,
  `metatags_status` tinyint(1) NOT NULL,
  `meta_subject` varchar(255) NOT NULL,
  `meta_title` varchar(255) NOT NULL,
  `page_format` varchar(255) NOT NULL,
  `margin_chkbox` tinyint(1) DEFAULT NULL,
  `margin_top` smallint(2) unsigned NOT NULL,
  `margin_bottom` smallint(2) unsigned NOT NULL,
  `margin_left` smallint(2) unsigned NOT NULL,
  `margin_right` smallint(2) unsigned NOT NULL,
  `header_height` smallint(2) unsigned NOT NULL,
  `footer_height` smallint(2) unsigned NOT NULL,
  `page_orientation` varchar(30) NOT NULL,
  `language` varchar(7) NOT NULL,
  `filename` varchar(255) NOT NULL,
  `visibility` varchar(200) NOT NULL,
  `default` tinyint(1) DEFAULT NULL,
  `conditions` text NOT NULL,
  `watermark_type` tinyint(1) NOT NULL DEFAULT '0',
  `watermark_text` varchar(255) NOT NULL,
  `watermark_size` tinyint(2) unsigned NOT NULL,
  `watermark_angle` smallint(3) unsigned NOT NULL,
  `watermark_image` varchar(255) NOT NULL,
  `template_members` text NOT NULL,
  `one_pdf` tinyint(1) DEFAULT NULL,
  PRIMARY KEY (`pdfid`),
  KEY `module_name` (`module_name`,`status`),
  KEY `module_name_2` (`module_name`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_relatedlists_inv_fields`;
CREATE TABLE `a_yf_relatedlists_inv_fields` (
  `relation_id` int(10) DEFAULT NULL,
  `fieldname` varchar(30) DEFAULT NULL,
  `sequence` tinyint(1) DEFAULT NULL,
  KEY `relation_id` (`relation_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_smsnotifier_servers`;
CREATE TABLE `a_yf_smsnotifier_servers` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `providertype` varchar(50) NOT NULL,
  `isactive` tinyint(1) DEFAULT '0',
  `api_key` varchar(255) NOT NULL,
  `parameters` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_taxes_config`;
CREATE TABLE `a_yf_taxes_config` (
  `param` varchar(30) NOT NULL,
  `value` varchar(255) NOT NULL,
  PRIMARY KEY (`param`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `a_yf_taxes_global`;
CREATE TABLE `a_yf_taxes_global` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `value` decimal(5,2) unsigned NOT NULL DEFAULT '0.00',
  `status` tinyint(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `actualiza_DDA_GARANTIA`;
CREATE TABLE `actualiza_DDA_GARANTIA` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `SINI` varchar(100) NOT NULL,
  `CHEC` int(11) NOT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=280 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `actualiza_error_asigna`;
CREATE TABLE `actualiza_error_asigna` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_reg` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=116 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `actualizar_fechasiniestro`;
CREATE TABLE `actualizar_fechasiniestro` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `NumeroDeCaso` varchar(255) DEFAULT NULL,
  `FechaCreacionCliente` datetime DEFAULT NULL,
  `FechaSiniestro` date DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=MyISAM AUTO_INCREMENT=2014 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `actualizar_vd1`;
CREATE TABLE `actualizar_vd1` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idsiniestro` varchar(100) NOT NULL,
  `comisionpagada` tinyint(1) NOT NULL,
  `categoiacomision` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=114 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `actualizar_vd2`;
CREATE TABLE `actualizar_vd2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idc` int(12) NOT NULL,
  `siniestro` varchar(200) NOT NULL,
  `abogadoasignado` varchar(200) NOT NULL,
  `mesasignacion` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=37 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `actulaiza_sini_estados`;
CREATE TABLE `actulaiza_sini_estados` (
  `ncaso` varchar(100) NOT NULL,
  `estado` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `asignacion_cli_user_PAC`;
CREATE TABLE `asignacion_cli_user_PAC` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `idcliente` int(10) NOT NULL,
  `user_crm` varchar(100) NOT NULL,
  `Rut` varchar(100) NOT NULL,
  `Nombre` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=8198 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `busquedaexcap`;
CREATE TABLE `busquedaexcap` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sini` varchar(100) NOT NULL,
  `user` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1620 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `carro_pago_fintoc`;
CREATE TABLE `carro_pago_fintoc` (
  `id_cpf` int(11) NOT NULL AUTO_INCREMENT,
  `modulo_cpf` varchar(100) NOT NULL,
  `id_modulo_cpf` varchar(100) NOT NULL,
  `rut_cli_cpf` varchar(100) NOT NULL,
  `descrip_cpf` varchar(200) NOT NULL,
  `total_cpf` int(10) NOT NULL,
  `estado_cpf` int(11) NOT NULL,
  PRIMARY KEY (`id_cpf`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `casosASL`;
CREATE TABLE `casosASL` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nro_caso` varchar(20) DEFAULT NULL,
  `nro_factura` varchar(20) DEFAULT NULL,
  `fecha_factura` date DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=86 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `ciu_relBase`;
CREATE TABLE `ciu_relBase` (
  `id` int(11) NOT NULL,
  `cui` varchar(200) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflow_activatedonce`;
CREATE TABLE `com_vtiger_workflow_activatedonce` (
  `workflow_id` int(10) NOT NULL,
  `entity_id` int(10) NOT NULL,
  PRIMARY KEY (`workflow_id`,`entity_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflow_tasktypes`;
CREATE TABLE `com_vtiger_workflow_tasktypes` (
  `id` int(10) NOT NULL,
  `tasktypename` varchar(255) NOT NULL,
  `label` varchar(255) DEFAULT NULL,
  `classname` varchar(255) DEFAULT NULL,
  `classpath` varchar(255) DEFAULT NULL,
  `templatepath` varchar(255) DEFAULT NULL,
  `modules` varchar(500) DEFAULT NULL,
  `sourcemodule` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflow_tasktypes_seq`;
CREATE TABLE `com_vtiger_workflow_tasktypes_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflows`;
CREATE TABLE `com_vtiger_workflows` (
  `workflow_id` int(10) NOT NULL AUTO_INCREMENT,
  `module_name` varchar(100) DEFAULT NULL,
  `summary` varchar(400) NOT NULL,
  `test` text,
  `execution_condition` int(10) NOT NULL,
  `defaultworkflow` int(1) DEFAULT NULL,
  `type` varchar(255) DEFAULT NULL,
  `filtersavedinnew` int(1) DEFAULT NULL,
  `schtypeid` int(10) DEFAULT NULL,
  `schdayofmonth` varchar(100) DEFAULT NULL,
  `schdayofweek` varchar(100) DEFAULT NULL,
  `schannualdates` varchar(100) DEFAULT NULL,
  `schtime` varchar(50) DEFAULT NULL,
  `nexttrigger_time` datetime DEFAULT NULL,
  PRIMARY KEY (`workflow_id`),
  UNIQUE KEY `com_vtiger_workflows_idx` (`workflow_id`)
) ENGINE=InnoDB AUTO_INCREMENT=394 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflowtask_queue`;
CREATE TABLE `com_vtiger_workflowtask_queue` (
  `task_id` int(10) DEFAULT NULL,
  `entity_id` varchar(100) DEFAULT NULL,
  `do_after` int(10) DEFAULT NULL,
  `task_contents` text
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflowtasks_entitymethod`;
CREATE TABLE `com_vtiger_workflowtasks_entitymethod` (
  `workflowtasks_entitymethod_id` int(10) NOT NULL,
  `module_name` varchar(100) DEFAULT NULL,
  `method_name` varchar(100) DEFAULT NULL,
  `function_path` varchar(400) DEFAULT NULL,
  `function_name` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`workflowtasks_entitymethod_id`),
  UNIQUE KEY `com_vtiger_workflowtasks_entitymethod_idx` (`workflowtasks_entitymethod_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflowtasks_entitymethod_seq`;
CREATE TABLE `com_vtiger_workflowtasks_entitymethod_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflowtasks_seq`;
CREATE TABLE `com_vtiger_workflowtasks_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `com_vtiger_workflowtemplates`;
CREATE TABLE `com_vtiger_workflowtemplates` (
  `template_id` int(10) NOT NULL AUTO_INCREMENT,
  `module_name` varchar(100) DEFAULT NULL,
  `title` varchar(400) DEFAULT NULL,
  `template` text,
  PRIMARY KEY (`template_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `comu_relBase`;
CREATE TABLE `comu_relBase` (
  `id` int(11) NOT NULL,
  `id_city` int(11) NOT NULL,
  `com` varchar(200) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `config_sus_pac`;
CREATE TABLE `config_sus_pac` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Desde` date NOT NULL,
  `Hasta` date NOT NULL,
  `Estado` int(11) NOT NULL DEFAULT '0',
  `Nombre` varchar(100) NOT NULL,
  `id_mod` int(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `config_sus_pac_mod`;
CREATE TABLE `config_sus_pac_mod` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Modulo` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `contra_plantilla`;
CREATE TABLE `contra_plantilla` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `cuerpo` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `crm_actualizar_estados`;
CREATE TABLE `crm_actualizar_estados` (
  `actualizaestadoid` int(11) NOT NULL AUTO_INCREMENT,
  `idsiniestro` int(11) NOT NULL,
  `estado_` varchar(60) NOT NULL,
  `ingcrm` tinyint(4) NOT NULL,
  `preinsp_prg` tinyint(4) NOT NULL,
  `preinsp_reprg` tinyint(4) NOT NULL,
  `preinsp_rel` tinyint(4) NOT NULL,
  `preinsp_rev` tinyint(4) NOT NULL,
  `noapl` tinyint(4) NOT NULL,
  `preprog` tinyint(4) NOT NULL,
  `preliqasg` tinyint(4) NOT NULL,
  `enprog` tinyint(4) NOT NULL,
  `liqasg` tinyint(4) NOT NULL,
  `visreprg` tinyint(4) NOT NULL,
  `visprg` tinyint(4) NOT NULL,
  `visrel` tinyint(4) NOT NULL,
  `esp` tinyint(4) NOT NULL,
  `espprg` tinyint(4) NOT NULL,
  `infliqimpgpr` tinyint(4) NOT NULL,
  `infliqimpg2pr` tinyint(4) NOT NULL,
  `revresimpgpr` tinyint(4) NOT NULL,
  `infliqimpgcob` tinyint(4) NOT NULL,
  `infliqimpg2cob` tinyint(4) NOT NULL,
  `revresimpgcob` tinyint(4) NOT NULL,
  PRIMARY KEY (`actualizaestadoid`)
) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `crm_tipo_docs`;
CREATE TABLE `crm_tipo_docs` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `crm_tipo_estados`;
CREATE TABLE `crm_tipo_estados` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nombre` varchar(60) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `crm_val_docs`;
CREATE TABLE `crm_val_docs` (
  `id` int(12) NOT NULL AUTO_INCREMENT,
  `idsiniestro` int(11) NOT NULL,
  `m_ingcrm` tinyint(4) NOT NULL,
  `m_preinsp_prg` tinyint(4) NOT NULL,
  `m_preinsp_rev` tinyint(4) NOT NULL,
  `m_noapl` tinyint(4) NOT NULL,
  `m_enprog` tinyint(4) NOT NULL,
  `m_liqasg` tinyint(4) NOT NULL,
  `m_visprg` tinyint(4) NOT NULL,
  `m_esp` tinyint(4) NOT NULL,
  `m_espprg` tinyint(4) NOT NULL,
  `m_infliqimpgpr` tinyint(4) NOT NULL,
  `m_infliqimpgcob` tinyint(4) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `crmclay_router`;
CREATE TABLE `crmclay_router` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ncaso` varchar(100) NOT NULL,
  `sus` int(1) NOT NULL,
  `co` int(1) NOT NULL,
  `dda` int(1) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=1815 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `cruze_evaluador_preevaluador`;
CREATE TABLE `cruze_evaluador_preevaluador` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ncaso` varchar(100) NOT NULL,
  `fecha` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=121 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `css_Gen_Cert_Convenios`;
CREATE TABLE `css_Gen_Cert_Convenios` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `Nombre APP` varchar(100) NOT NULL,
  `CSS` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `dav_addressbookchanges`;
CREATE TABLE `dav_addressbookchanges` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uri` varbinary(200) NOT NULL,
  `synctoken` int(10) unsigned NOT NULL,
  `addressbookid` int(10) unsigned NOT NULL,
  `operation` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `addressbookid_synctoken` (`addressbookid`,`synctoken`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_calendarchanges`;
CREATE TABLE `dav_calendarchanges` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uri` varbinary(200) NOT NULL,
  `synctoken` int(10) unsigned NOT NULL,
  `calendarid` int(10) unsigned NOT NULL,
  `operation` tinyint(1) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `calendarid_synctoken` (`calendarid`,`synctoken`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_calendars`;
CREATE TABLE `dav_calendars` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `principaluri` varbinary(100) DEFAULT NULL,
  `displayname` varchar(100) DEFAULT NULL,
  `uri` varbinary(200) DEFAULT NULL,
  `synctoken` int(10) unsigned NOT NULL DEFAULT '1',
  `description` text,
  `calendarorder` int(10) unsigned NOT NULL DEFAULT '0',
  `calendarcolor` varbinary(10) DEFAULT NULL,
  `timezone` text,
  `components` varbinary(21) DEFAULT NULL,
  `transparent` tinyint(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  UNIQUE KEY `principaluri` (`principaluri`,`uri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_calendarsubscriptions`;
CREATE TABLE `dav_calendarsubscriptions` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uri` varbinary(200) NOT NULL,
  `principaluri` varbinary(100) NOT NULL,
  `source` text,
  `displayname` varchar(100) DEFAULT NULL,
  `refreshrate` varchar(10) DEFAULT NULL,
  `calendarorder` int(10) unsigned NOT NULL DEFAULT '0',
  `calendarcolor` varbinary(10) DEFAULT NULL,
  `striptodos` tinyint(1) DEFAULT NULL,
  `stripalarms` tinyint(1) DEFAULT NULL,
  `stripattachments` tinyint(1) DEFAULT NULL,
  `lastmodified` int(10) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `principaluri` (`principaluri`,`uri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_groupmembers`;
CREATE TABLE `dav_groupmembers` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `principal_id` int(10) unsigned NOT NULL,
  `member_id` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `principal_id` (`principal_id`,`member_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_principals`;
CREATE TABLE `dav_principals` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `uri` varbinary(200) NOT NULL,
  `email` varbinary(80) DEFAULT NULL,
  `displayname` varchar(80) DEFAULT NULL,
  `userid` int(10) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `uri` (`uri`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_propertystorage`;
CREATE TABLE `dav_propertystorage` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `path` varbinary(1024) NOT NULL,
  `name` varbinary(100) NOT NULL,
  `valuetype` int(10) unsigned DEFAULT NULL,
  `value` mediumblob,
  PRIMARY KEY (`id`),
  UNIQUE KEY `path_property` (`path`(600),`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_schedulingobjects`;
CREATE TABLE `dav_schedulingobjects` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `principaluri` varbinary(255) DEFAULT NULL,
  `calendardata` mediumblob,
  `uri` varbinary(200) DEFAULT NULL,
  `lastmodified` int(10) unsigned DEFAULT NULL,
  `etag` varbinary(32) DEFAULT NULL,
  `size` int(10) unsigned NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `dav_users`;
CREATE TABLE `dav_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varbinary(50) DEFAULT NULL,
  `digesta1` varbinary(32) DEFAULT NULL,
  `userid` int(10) unsigned DEFAULT NULL,
  `key` varchar(50) DEFAULT NULL,
  PRIMARY KEY (`id`),
  UNIQUE KEY `username` (`username`),
  UNIQUE KEY `userid` (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `delcasoVD`;
CREATE TABLE `delcasoVD` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `caso` varchar(100) NOT NULL,
  `est` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=255 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `desactivar_users`;
CREATE TABLE `desactivar_users` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `users` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=138 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `det_maestro_Simplirute`;
CREATE TABLE `det_maestro_Simplirute` (
  `id_det_msr` int(11) NOT NULL AUTO_INCREMENT,
  `id_msr` int(11) NOT NULL,
  `id_sr` int(11) NOT NULL,
  `status` varchar(200) NOT NULL,
  `Nombre_plan_dms` varchar(200) NOT NULL,
  `Id_ruta_dms` varchar(200) NOT NULL,
  `start_date_dms` varchar(200) NOT NULL,
  `sw` int(11) NOT NULL,
  PRIMARY KEY (`id_det_msr`)
) ENGINE=MyISAM AUTO_INCREMENT=522 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `estado_casos`;
CREATE TABLE `estado_casos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `siniestros` varchar(20) NOT NULL,
  `estado` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=237 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `filtro`;
CREATE TABLE `filtro` (
  `filtro_id` int(11) NOT NULL AUTO_INCREMENT,
  `filtro_arr` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`filtro_id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `fintoc_conf`;
CREATE TABLE `fintoc_conf` (
  `id_fc` int(11) NOT NULL AUTO_INCREMENT,
  `ap_Public_Key_fc` varchar(200) NOT NULL,
  `ap_Secret_Key_fc` varchar(200) NOT NULL,
  `Webhook_Endpoints_fc` varchar(200) NOT NULL,
  `modo_fc` int(11) NOT NULL,
  PRIMARY KEY (`id_fc`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `ingresos1_2019_grupo_santiago`;
CREATE TABLE `ingresos1_2019_grupo_santiago` (
  `id` varchar(50) NOT NULL,
  `ingresado` bit(1) NOT NULL DEFAULT b'0',
  `fecha_contrato` varchar(255) DEFAULT NULL,
  `dia` varchar(255) DEFAULT NULL,
  `mes` varchar(255) DEFAULT NULL,
  `ano` varchar(255) DEFAULT NULL,
  `nombres` varchar(255) DEFAULT NULL,
  `apellidos` varchar(255) DEFAULT NULL,
  `rut_cliente1` double DEFAULT NULL,
  `digito_verificador` varchar(255) DEFAULT NULL,
  `numero_de_serie` varchar(255) DEFAULT NULL,
  `estado_civil` varchar(255) DEFAULT NULL,
  `profesion` varchar(255) DEFAULT NULL,
  `nacionalidad` varchar(255) DEFAULT NULL,
  `email_contacto` varchar(255) DEFAULT NULL,
  `telefono_celular` varchar(255) DEFAULT NULL,
  `telefono_alternativo` varchar(255) DEFAULT NULL,
  `calle_cliente` varchar(255) DEFAULT NULL,
  `comuna_cliente` varchar(255) DEFAULT NULL,
  `provincia_cliente` varchar(255) DEFAULT NULL,
  `region_cliente` varchar(255) DEFAULT NULL,
  `calle_caso` varchar(255) DEFAULT NULL,
  `comuna_caso` varchar(255) DEFAULT NULL,
  `provincia_caso` varchar(255) DEFAULT NULL,
  `region_caso` varchar(255) DEFAULT NULL,
  `tipo_siniestro` varchar(255) DEFAULT NULL,
  `tipo_propiedad` varchar(255) DEFAULT NULL,
  `banco` varchar(255) DEFAULT NULL,
  `compania_seguros` varchar(255) DEFAULT NULL,
  `m2_aproximados` double DEFAULT NULL,
  `valor_uf_estimado` double DEFAULT NULL,
  `tipo_plan` varchar(255) DEFAULT NULL,
  `valor_total` varchar(255) DEFAULT NULL,
  `valor_cuota` varchar(255) DEFAULT NULL,
  `pago_total` varchar(255) DEFAULT NULL,
  `banco_cargo` varchar(255) DEFAULT NULL,
  `nro_de_cuenta` double DEFAULT NULL,
  `tipo_cuenta1` varchar(255) DEFAULT NULL,
  `sucursal` varchar(255) DEFAULT NULL,
  `dias_pago` varchar(255) DEFAULT NULL,
  `obs_de_operaciones` varchar(255) DEFAULT NULL,
  `ejecutivo` varchar(255) DEFAULT NULL,
  `email_del_ejecutivo` varchar(255) DEFAULT NULL,
  `celular_del_ejecutivo` varchar(255) DEFAULT NULL,
  `desde_donde_se_envio` varchar(255) DEFAULT NULL,
  `observaciones_para_coordinar_` varchar(255) DEFAULT NULL,
  `validado` varchar(255) DEFAULT NULL,
  `foto` varchar(255) DEFAULT NULL,
  `dias_de_pago1` varchar(255) DEFAULT NULL,
  `nro_de_cuotas` varchar(255) DEFAULT NULL,
  `valor_de_cuotas` varchar(255) DEFAULT NULL,
  `abono` varchar(255) DEFAULT NULL,
  `valor_total_del_servicio` varchar(255) DEFAULT NULL,
  `tipo_de_plan` varchar(255) DEFAULT NULL,
  `caso_con_gestion_previa` varchar(255) DEFAULT NULL,
  `asesorseguros` varchar(255) DEFAULT NULL,
  `Estado_sms_mati` int(11) NOT NULL DEFAULT '0',
  `Estado_mati` int(11) NOT NULL DEFAULT '0',
  `Estado_sms_firma` int(11) NOT NULL DEFAULT '0',
  `Estado_Firma` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `l_yf_profile`;
CREATE TABLE `l_yf_profile` (
  `id` int(10) unsigned NOT NULL DEFAULT '0',
  `category` varchar(255) NOT NULL,
  `info` text,
  `log_time` varchar(20) NOT NULL,
  `trace` text,
  `level` varchar(255) DEFAULT NULL,
  `duration` decimal(3,3) NOT NULL,
  KEY `id` (`id`),
  KEY `category` (`category`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `l_yf_settings_tracker_basic`;
CREATE TABLE `l_yf_settings_tracker_basic` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `user_id` int(10) unsigned NOT NULL,
  `type` tinyint(1) NOT NULL,
  `action` varchar(50) NOT NULL,
  `record_id` int(10) DEFAULT NULL,
  `module_name` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=33168 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `l_yf_settings_tracker_detail`;
CREATE TABLE `l_yf_settings_tracker_detail` (
  `id` int(10) unsigned NOT NULL,
  `prev_value` varchar(255) NOT NULL DEFAULT '',
  `post_value` varchar(255) NOT NULL DEFAULT '',
  `field` varchar(255) NOT NULL,
  KEY `id` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `l_yf_sqltime`;
CREATE TABLE `l_yf_sqltime` (
  `id` int(10) NOT NULL,
  `type` varchar(20) DEFAULT NULL,
  `content` text,
  `date` datetime DEFAULT NULL,
  `qtime` decimal(20,3) DEFAULT NULL,
  `group` int(10) DEFAULT NULL,
  KEY `id` (`id`),
  KEY `type` (`type`),
  KEY `group` (`group`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `l_yf_switch_users`;
CREATE TABLE `l_yf_switch_users` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `date` datetime NOT NULL,
  `status` varchar(10) NOT NULL,
  `baseid` int(10) NOT NULL,
  `destid` int(10) NOT NULL,
  `busername` varchar(50) NOT NULL,
  `dusername` varchar(50) NOT NULL,
  `ip` varchar(100) NOT NULL,
  `agent` varchar(255) NOT NULL,
  PRIMARY KEY (`id`),
  KEY `baseid` (`baseid`),
  KEY `destid` (`destid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `l_yf_username_history`;
CREATE TABLE `l_yf_username_history` (
  `user_name` varchar(32) DEFAULT NULL,
  `user_id` int(10) unsigned DEFAULT NULL,
  `date` datetime DEFAULT NULL,
  KEY `user_id` (`user_id`),
  KEY `user_name` (`user_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `l_yf_userpass_history`;
CREATE TABLE `l_yf_userpass_history` (
  `pass` varchar(200) NOT NULL,
  `user_id` int(10) unsigned NOT NULL,
  `date` datetime NOT NULL,
  KEY `user_id` (`user_id`,`pass`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `leads_disponibles_2`;
CREATE TABLE `leads_disponibles_2` (
  `id` varchar(30) NOT NULL,
  `created_time` varchar(30) NOT NULL,
  `ad_id` varchar(30) NOT NULL,
  `ad_name` varchar(30) NOT NULL,
  `adset_id` varchar(30) NOT NULL,
  `adset_name` varchar(30) NOT NULL,
  `campaign_id` varchar(80) NOT NULL,
  `campaign_name` varchar(90) NOT NULL,
  `form_id` varchar(30) NOT NULL,
  `form_name` varchar(30) NOT NULL,
  `platform` varchar(5) NOT NULL,
  `dividendo` varchar(5) NOT NULL,
  `comuna` varchar(30) NOT NULL,
  `full_name` varchar(80) NOT NULL,
  `telefono` varchar(30) NOT NULL,
  `email` varchar(100) NOT NULL,
  `dirtn` int(8) NOT NULL,
  `ID2` int(11) NOT NULL AUTO_INCREMENT,
  PRIMARY KEY (`ID2`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;;

DROP TABLE IF EXISTS `maestro_SimpliRute`;
CREATE TABLE `maestro_SimpliRute` (
  `id_m_sr` int(11) NOT NULL AUTO_INCREMENT,
  `Titulo` varchar(200) NOT NULL,
  `Direccion_completa` varchar(200) NOT NULL,
  `Carga` int(8) NOT NULL,
  `Hora_inicial` varchar(100) NOT NULL,
  `Hora_final` varchar(100) NOT NULL,
  `Tiempo_de_servicio` varchar(8) NOT NULL,
  `Notas` varchar(200) NOT NULL,
  `Latitud` varchar(200) NOT NULL,
  `Longitud` varchar(200) NOT NULL,
  `ID_de_referencia` varchar(200) NOT NULL,
  `Habilidades_requeridas` varchar(200) NOT NULL,
  `Habilidades_opcionales` varchar(200) NOT NULL,
  `Persona_de_contacto` varchar(200) NOT NULL,
  `Telefono_de_contacto` varchar(200) NOT NULL,
  `Hora_inicial_2` varchar(100) NOT NULL,
  `Hora_final_2` varchar(100) NOT NULL,
  `Carga_2` int(8) NOT NULL,
  `Carga_3` int(8) NOT NULL,
  `Prioridad` int(8) NOT NULL,
  `SMS` varchar(200) NOT NULL,
  `Correo_electronico_de_contacto` varchar(200) NOT NULL,
  `Carga_pick` int(8) NOT NULL,
  `Carga_pick_2` int(8) NOT NULL,
  `Carga_pick_3` int(8) NOT NULL,
  `Fecha_programada` varchar(200) NOT NULL,
  `Tipo_de_visita` varchar(200) NOT NULL,
  `Estado` int(8) NOT NULL DEFAULT '1',
  `Tipo_actividad` varchar(200) NOT NULL,
  PRIMARY KEY (`id_m_sr`)
) ENGINE=MyISAM AUTO_INCREMENT=522 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `maestro_realizado_fallido`;
CREATE TABLE `maestro_realizado_fallido` (
  `id_mrf` int(11) NOT NULL,
  `id_sr` varchar(200) NOT NULL,
  `id_reference` varchar(200) NOT NULL,
  `estado` varchar(200) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `mai2`;
CREATE TABLE `mai2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `resourse` varchar(200) NOT NULL,
  `estatus` varchar(50) NOT NULL,
  `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `actual` int(1) NOT NULL DEFAULT '0',
  `rut` varchar(11) NOT NULL,
  `qury` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `mai2_clave_firma_contrato`;
CREATE TABLE `mai2_clave_firma_contrato` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_mai` varchar(20) NOT NULL,
  `clave` varchar(7) NOT NULL,
  `fechahora` varchar(50) NOT NULL,
  `firma` varchar(1000) NOT NULL,
  `url` varchar(300) NOT NULL,
  `ip` varchar(15) NOT NULL,
  `CVU` varchar(100) NOT NULL,
  `urlPDF` varchar(100) NOT NULL,
  `firmaMandato` int(11) NOT NULL,
  `qr` varchar(1000) NOT NULL,
  `TIPO_CS` int(11) NOT NULL,
  `TIPO_VD` int(11) NOT NULL,
  `TIPO_TC` int(11) NOT NULL,
  `TIPO_DC` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13315 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `mai2_cont_sms`;
CREATE TABLE `mai2_cont_sms` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_mai2` varchar(20) NOT NULL,
  `cont` int(11) NOT NULL,
  `fechahora` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `mai2_cont_sms_firma`;
CREATE TABLE `mai2_cont_sms_firma` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_mai2` varchar(20) NOT NULL,
  `fechahora` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
  `cont` int(11) NOT NULL DEFAULT '1',
  `TIPO_CS` int(11) NOT NULL,
  `TIPO_VD` int(11) NOT NULL,
  `TIPO_TC` int(11) NOT NULL,
  `TIPO_DC` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=13252 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `numeros_no_verificados`;
CREATE TABLE `numeros_no_verificados` (
  `Contacto` varchar(100) NOT NULL,
  `Mail` varchar(200) NOT NULL,
  `Celular` varchar(100) NOT NULL,
  `Comuna` varchar(80) NOT NULL,
  `Verificar` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `numeros_verificados`;
CREATE TABLE `numeros_verificados` (
  `Contacto` varchar(100) NOT NULL,
  `Mail` varchar(200) NOT NULL,
  `Celular` varchar(100) NOT NULL,
  `Comuna` varchar(80) NOT NULL,
  `Verificar` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `o_yf_access_for_admin`;
CREATE TABLE `o_yf_access_for_admin` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  `ip` varchar(100) NOT NULL,
  `module` varchar(30) NOT NULL,
  `url` varchar(300) NOT NULL,
  `agent` varchar(255) NOT NULL,
  `request` varchar(300) NOT NULL,
  `referer` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `o_yf_access_for_api`;
CREATE TABLE `o_yf_access_for_api` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  `ip` varchar(100) NOT NULL,
  `url` varchar(300) NOT NULL,
  `agent` varchar(255) NOT NULL,
  `request` varchar(300) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `o_yf_access_for_user`;
CREATE TABLE `o_yf_access_for_user` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  `ip` varchar(100) DEFAULT NULL,
  `module` varchar(30) NOT NULL,
  `url` varchar(300) NOT NULL,
  `agent` varchar(255) DEFAULT NULL,
  `request` varchar(300) NOT NULL,
  `referer` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=724368 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `o_yf_access_to_record`;
CREATE TABLE `o_yf_access_to_record` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  `ip` varchar(100) NOT NULL,
  `record` int(10) NOT NULL,
  `module` varchar(30) NOT NULL,
  `url` varchar(300) NOT NULL,
  `agent` varchar(255) NOT NULL,
  `request` varchar(300) NOT NULL,
  `referer` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=25913 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `o_yf_csrf`;
CREATE TABLE `o_yf_csrf` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(50) NOT NULL,
  `date` datetime NOT NULL,
  `ip` varchar(100) NOT NULL,
  `referer` varchar(300) NOT NULL,
  `url` varchar(300) NOT NULL,
  `agent` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=68 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `pagos_archivos`;
CREATE TABLE `pagos_archivos` (
  `id_pagos` int(11) NOT NULL AUTO_INCREMENT,
  `id_suscripcion` int(11) NOT NULL,
  `rut_dep` varchar(13) DEFAULT NULL,
  `nombre_dep` varchar(100) DEFAULT NULL,
  `id_medio_dep` int(11) NOT NULL DEFAULT '0',
  `ruta_archiv` varchar(300) NOT NULL,
  `carga` int(11) NOT NULL,
  `revisado` int(11) NOT NULL DEFAULT '0',
  `abono` int(15) NOT NULL DEFAULT '0',
  `fech_abono` date DEFAULT NULL,
  `abonopagado` int(11) NOT NULL,
  `clay_abono` int(11) NOT NULL,
  `vcuota1` int(15) NOT NULL DEFAULT '0',
  `vcuota2` int(15) NOT NULL DEFAULT '0',
  `1cuota` int(11) NOT NULL DEFAULT '0',
  `2cuota` int(11) NOT NULL DEFAULT '0',
  `clay1` int(11) NOT NULL,
  `clay2` int(11) NOT NULL,
  `fech_cuota1` date DEFAULT NULL,
  `fech_cuota2` date DEFAULT NULL,
  `fecha_pago` date DEFAULT NULL,
  `bancopago` int(11) DEFAULT '0',
  `n_cuota` int(11) NOT NULL,
  `estado` int(11) NOT NULL DEFAULT '0',
  `estado_wf` int(11) NOT NULL DEFAULT '0',
  `estado_rev` int(11) NOT NULL DEFAULT '0',
  `Observacion` varchar(1000) NOT NULL,
  PRIMARY KEY (`id_pagos`)
) ENGINE=MyISAM AUTO_INCREMENT=16 DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `pagos_archivos_conf`;
CREATE TABLE `pagos_archivos_conf` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `conf` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `pagos_archivos_demadas`;
CREATE TABLE `pagos_archivos_demadas` (
  `id_pagos` int(11) NOT NULL AUTO_INCREMENT,
  `id_demanda` int(11) NOT NULL,
  `rut_dep` varchar(13) DEFAULT NULL,
  `nombre_dep` varchar(100) DEFAULT NULL,
  `id_medio_dep` int(11) NOT NULL DEFAULT '0',
  `ruta_archiv` varchar(300) NOT NULL,
  `carga` int(11) NOT NULL,
  `revisado` int(11) NOT NULL DEFAULT '0',
  `abono` int(15) NOT NULL DEFAULT '0',
  `fech_abono` date DEFAULT NULL,
  `abonopagado` int(11) NOT NULL,
  `clay_abono` int(11) NOT NULL,
  `vcuota1` int(15) NOT NULL DEFAULT '0',
  `vcuota2` int(15) NOT NULL DEFAULT '0',
  `vcuota3` int(11) NOT NULL,
  `1cuota` int(11) NOT NULL DEFAULT '0',
  `2cuota` int(11) NOT NULL DEFAULT '0',
  `3cuota` int(11) NOT NULL,
  `clay1` int(11) NOT NULL,
  `clay2` int(11) NOT NULL,
  `clay3` int(11) NOT NULL,
  `fech_cuota1` date DEFAULT NULL,
  `fech_cuota2` date DEFAULT NULL,
  `fech_cuota3` int(11) NOT NULL,
  `fecha_pago` date DEFAULT NULL,
  `bancopago` int(11) DEFAULT '0',
  `n_cuota` int(11) NOT NULL,
  `estado` int(11) NOT NULL DEFAULT '0',
  `estado_wf` int(11) NOT NULL DEFAULT '0',
  `estado_rev` int(11) NOT NULL DEFAULT '0',
  `Observacion` varchar(1000) NOT NULL,
  PRIMARY KEY (`id_pagos`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `par_plan_crm_rbase`;
CREATE TABLE `par_plan_crm_rbase` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_plan_relBase` int(11) NOT NULL,
  `id_plan_CRM` int(11) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `pruebareg`;
CREATE TABLE `pruebareg` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ok` varchar(10) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `reasignar_masivo`;
CREATE TABLE `reasignar_masivo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ncaso` varchar(100) NOT NULL,
  `user` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=119 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `rep_fecha_fact_masivo`;
CREATE TABLE `rep_fecha_fact_masivo` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `nro_factura` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=40 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `reporte_moonflow_client_endpoint`;
CREATE TABLE `reporte_moonflow_client_endpoint` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `documentTypeId` int(6) NOT NULL,
  `documentNumber` varchar(20) NOT NULL,
  `name` varchar(50) NOT NULL,
  `lastName` varchar(50) NOT NULL,
  `genero` varchar(4) NOT NULL,
  `cellphone1` int(16) NOT NULL,
  `cellphone2` int(16) NOT NULL,
  `email1` varchar(80) NOT NULL,
  `email2` varchar(80) NOT NULL,
  `externalClientId` varchar(20) NOT NULL,
  `indicador_dia` tinyint(4) NOT NULL,
  `prop_pago` tinyint(4) NOT NULL,
  `lastPaymentStatus` varchar(8) NOT NULL,
  `registerDate` datetime NOT NULL,
  `field1` varchar(25) NOT NULL,
  `field2` varchar(25) NOT NULL,
  `field3` varchar(25) NOT NULL,
  `field4` varchar(25) NOT NULL,
  `field5` varchar(25) NOT NULL,
  `field6` varchar(25) NOT NULL,
  `field7` varchar(25) NOT NULL,
  `field8` varchar(25) NOT NULL,
  `field9` varchar(25) NOT NULL,
  `field10` varchar(25) NOT NULL,
  `asesor_id` int(8) NOT NULL,
  `deleted` int(8) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=2129 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `rev_casos_simplerute`;
CREATE TABLE `rev_casos_simplerute` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `id_referencia` varchar(200) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=41 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `rev_ugr`;
CREATE TABLE `rev_ugr` (
  `id` int(11) NOT NULL,
  `rut` varchar(100) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `movil` varchar(100) NOT NULL,
  `email` varchar(100) NOT NULL,
  `descrip` text NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `revcasos`;
CREATE TABLE `revcasos` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `caso` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=32 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `roundcube_cache_shared`;
CREATE TABLE `roundcube_cache_shared` (
  `cache_key` varchar(255) CHARACTER SET ascii NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `expires` datetime DEFAULT NULL,
  `data` longtext NOT NULL,
  KEY `expires_index` (`expires`),
  KEY `cache_key_index` (`cache_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `roundcube_session`;
CREATE TABLE `roundcube_session` (
  `sess_id` varchar(128) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `changed` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `ip` varchar(40) NOT NULL,
  `vars` mediumtext NOT NULL,
  PRIMARY KEY (`sess_id`),
  KEY `changed_index` (`changed`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `roundcube_system`;
CREATE TABLE `roundcube_system` (
  `name` varchar(64) NOT NULL,
  `value` mediumtext,
  PRIMARY KEY (`name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `roundcube_users`;
CREATE TABLE `roundcube_users` (
  `user_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `username` varchar(128) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
  `mail_host` varchar(128) NOT NULL,
  `created` datetime NOT NULL DEFAULT '1000-01-01 00:00:00',
  `last_login` datetime DEFAULT NULL,
  `failed_login` datetime DEFAULT NULL,
  `failed_login_counter` int(10) unsigned DEFAULT NULL,
  `language` varchar(5) DEFAULT NULL,
  `preferences` longtext,
  `actions` text,
  `password` varchar(200) DEFAULT NULL,
  `crm_user_id` int(10) DEFAULT '0',
  PRIMARY KEY (`user_id`),
  UNIQUE KEY `username` (`username`,`mail_host`),
  KEY `crm_user_id` (`crm_user_id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_automatic_assignment`;
CREATE TABLE `s_yf_automatic_assignment` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `tabid` smallint(5) unsigned NOT NULL,
  `field` varchar(30) NOT NULL,
  `value` varchar(255) DEFAULT NULL,
  `roles` text,
  `smowners` text,
  `assign` smallint(5) DEFAULT NULL,
  `active` tinyint(1) DEFAULT '1',
  `conditions` text,
  `user_limit` tinyint(1) DEFAULT NULL,
  `roleid` varchar(200) DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_companies`;
CREATE TABLE `s_yf_companies` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(100) NOT NULL,
  `short_name` varchar(100) DEFAULT NULL,
  `default` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `industry` varchar(50) DEFAULT NULL,
  `street` varchar(150) DEFAULT NULL,
  `city` varchar(100) DEFAULT NULL,
  `code` varchar(30) DEFAULT NULL,
  `state` varchar(100) DEFAULT NULL,
  `country` varchar(100) DEFAULT NULL,
  `phone` varchar(30) DEFAULT NULL,
  `fax` varchar(30) DEFAULT NULL,
  `website` varchar(100) DEFAULT NULL,
  `vatid` varchar(50) DEFAULT NULL,
  `id1` varchar(50) DEFAULT NULL,
  `id2` varchar(50) DEFAULT NULL,
  `email` varchar(100) DEFAULT NULL,
  `logo_login` varchar(50) DEFAULT NULL,
  `logo_login_height` tinyint(3) unsigned DEFAULT NULL,
  `logo_main` varchar(50) DEFAULT NULL,
  `logo_main_height` tinyint(3) unsigned DEFAULT NULL,
  `logo_mail` varchar(50) DEFAULT NULL,
  `logo_mail_height` tinyint(3) unsigned DEFAULT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_handler_updater`;
CREATE TABLE `s_yf_handler_updater` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `tabid` smallint(5) unsigned NOT NULL,
  `crmid` int(10) unsigned NOT NULL,
  `userid` int(10) unsigned NOT NULL,
  `handler_name` varchar(50) NOT NULL,
  `class` varchar(50) NOT NULL,
  `params` text NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_mail_relation_updater`;
CREATE TABLE `s_yf_mail_relation_updater` (
  `tabid` smallint(5) unsigned NOT NULL,
  `crmid` int(10) unsigned NOT NULL,
  KEY `tabid` (`tabid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_mail_smtp`;
CREATE TABLE `s_yf_mail_smtp` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `mailer_type` varchar(10) DEFAULT 'smtp',
  `default` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `name` varchar(255) NOT NULL,
  `host` varchar(255) NOT NULL,
  `port` smallint(5) unsigned DEFAULT NULL,
  `username` varchar(255) DEFAULT NULL,
  `password` varchar(255) DEFAULT NULL,
  `authentication` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `secure` varchar(10) DEFAULT NULL,
  `options` text,
  `from_email` varchar(255) DEFAULT NULL,
  `from_name` varchar(255) DEFAULT NULL,
  `reply_to` varchar(255) DEFAULT NULL,
  `individual_delivery` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `params` text,
  `save_send_mail` tinyint(1) DEFAULT '0',
  `smtp_host` varchar(255) DEFAULT NULL,
  `smtp_port` smallint(5) DEFAULT NULL,
  `smtp_username` varchar(255) DEFAULT NULL,
  `smtp_password` varchar(255) DEFAULT NULL,
  `smtp_folder` varchar(50) DEFAULT NULL,
  `smtp_validate_cert` tinyint(1) DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_multireference`;
CREATE TABLE `s_yf_multireference` (
  `source_module` varchar(50) NOT NULL,
  `dest_module` varchar(50) NOT NULL,
  `lastid` int(10) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(1) NOT NULL DEFAULT '0',
  KEY `source_module` (`source_module`,`dest_module`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_pbx`;
CREATE TABLE `s_yf_pbx` (
  `pbxid` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `default` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `name` varchar(50) DEFAULT NULL,
  `type` varchar(50) DEFAULT NULL,
  `param` text,
  PRIMARY KEY (`pbxid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_privileges_updater`;
CREATE TABLE `s_yf_privileges_updater` (
  `module` varchar(30) NOT NULL DEFAULT '',
  `crmid` int(10) NOT NULL DEFAULT '0',
  `priority` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `type` tinyint(1) NOT NULL DEFAULT '0',
  UNIQUE KEY `module` (`module`,`crmid`,`type`),
  KEY `crmid` (`crmid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `s_yf_smsnotifier_queue`;
CREATE TABLE `s_yf_smsnotifier_queue` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `message` varchar(255) NOT NULL,
  `tonumbers` text NOT NULL,
  `records` text NOT NULL,
  `module` varchar(30) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sc_log`;
CREATE TABLE `sc_log` (
  `id` int(8) NOT NULL AUTO_INCREMENT,
  `inserted_date` datetime DEFAULT NULL,
  `username` varchar(90) NOT NULL,
  `application` varchar(255) NOT NULL,
  `creator` varchar(30) NOT NULL,
  `ip_user` varchar(255) NOT NULL,
  `action` varchar(30) NOT NULL,
  `description` text,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4421 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sec_apps`;
CREATE TABLE `sec_apps` (
  `app_name` varchar(128) NOT NULL,
  `app_type` varchar(255) DEFAULT NULL,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`app_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sec_groups`;
CREATE TABLE `sec_groups` (
  `group_id` int(11) NOT NULL AUTO_INCREMENT,
  `description` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`group_id`),
  UNIQUE KEY `description` (`description`)
) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sec_groups_apps`;
CREATE TABLE `sec_groups_apps` (
  `group_id` int(11) NOT NULL,
  `app_name` varchar(128) NOT NULL,
  `priv_access` varchar(1) DEFAULT NULL,
  `priv_insert` varchar(1) DEFAULT NULL,
  `priv_delete` varchar(1) DEFAULT NULL,
  `priv_update` varchar(1) DEFAULT NULL,
  `priv_export` varchar(1) DEFAULT NULL,
  `priv_print` varchar(1) DEFAULT NULL,
  PRIMARY KEY (`group_id`,`app_name`),
  KEY `sec_groups_apps_ibfk_2` (`app_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sec_settings`;
CREATE TABLE `sec_settings` (
  `set_name` varchar(255) NOT NULL,
  `set_value` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`set_name`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sec_users`;
CREATE TABLE `sec_users` (
  `login` varchar(255) NOT NULL,
  `pswd` varchar(255) NOT NULL,
  `name` varchar(64) DEFAULT NULL,
  `email` varchar(255) DEFAULT NULL,
  `active` varchar(1) DEFAULT NULL,
  `activation_code` varchar(32) DEFAULT NULL,
  `priv_admin` varchar(1) DEFAULT NULL,
  `mfa` varchar(255) DEFAULT NULL,
  `picture` longblob,
  PRIMARY KEY (`login`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `sec_users_groups`;
CREATE TABLE `sec_users_groups` (
  `login` varchar(255) NOT NULL,
  `group_id` int(11) NOT NULL,
  PRIMARY KEY (`login`,`group_id`),
  KEY `sec_users_groups_ibfk_2` (`group_id`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `siniestro_cd`;
CREATE TABLE `siniestro_cd` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sini` varchar(20) NOT NULL,
  `dedu` varchar(20) NOT NULL,
  `cober` varchar(20) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=226 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `subir_dda`;
CREATE TABLE `subir_dda` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `caratula` varchar(100) NOT NULL,
  `siniestro` varchar(100) NOT NULL,
  `rutcomp` varchar(100) NOT NULL,
  `ddo` varchar(100) NOT NULL,
  `estadodda` varchar(100) NOT NULL,
  `tribunalradica` varchar(100) NOT NULL,
  `rol` varchar(100) NOT NULL,
  `rut` varchar(100) NOT NULL,
  `demandadoid` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `subir_dda_up_estado`;
CREATE TABLE `subir_dda_up_estado` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `siniestro` varchar(100) NOT NULL,
  `estadodda` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=51 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `subircasosVD`;
CREATE TABLE `subircasosVD` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sini` varchar(100) NOT NULL,
  `id_user` varchar(100) NOT NULL,
  `est` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=177 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `tabla_comunas`;
CREATE TABLE `tabla_comunas` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `comunas` varchar(255) DEFAULT NULL,
  `provincias` varchar(255) DEFAULT NULL,
  `regiones` varchar(255) DEFAULT NULL,
  `CIUDAD` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=347 DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `table_numeros_porverificar`;
CREATE TABLE `table_numeros_porverificar` (
  `Contacto` varchar(100) NOT NULL,
  `Mail` varchar(200) NOT NULL,
  `Celular` varchar(100) NOT NULL,
  `Comuna` varchar(80) NOT NULL,
  `Verificar` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `telefonos_noexistentes`;
CREATE TABLE `telefonos_noexistentes` (
  `id` int(6) unsigned NOT NULL AUTO_INCREMENT,
  `numero_telefono` varchar(16) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=742 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `tipo_contrato`;
CREATE TABLE `tipo_contrato` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `TIPO` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `transfer_geo_crm`;
CREATE TABLE `transfer_geo_crm` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `ncaso` varchar(100) NOT NULL,
  `latit` varchar(100) NOT NULL,
  `longi` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=226 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_attachments`;
CREATE TABLE `u_yf_attachments` (
  `attachmentid` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `type` varchar(100) DEFAULT NULL,
  `path` text NOT NULL,
  `status` smallint(1) DEFAULT '0',
  `fieldid` int(10) DEFAULT NULL,
  `crmid` int(10) DEFAULT NULL,
  `createdtime` datetime DEFAULT NULL,
  PRIMARY KEY (`attachmentid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_browsinghistory`;
CREATE TABLE `u_yf_browsinghistory` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `userid` int(10) NOT NULL,
  `date` datetime DEFAULT NULL,
  `title` varchar(255) DEFAULT NULL,
  `url` text,
  PRIMARY KEY (`id`),
  KEY `browsinghistory_user_idx` (`userid`)
) ENGINE=InnoDB AUTO_INCREMENT=2159114 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_chat_messages`;
CREATE TABLE `u_yf_chat_messages` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `userid` smallint(5) unsigned NOT NULL,
  `user_name` varchar(50) NOT NULL,
  `created` int(10) unsigned DEFAULT NULL,
  `messages` text,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_countries`;
CREATE TABLE `u_yf_countries` (
  `id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(50) NOT NULL,
  `code` char(2) NOT NULL,
  `status` tinyint(1) unsigned DEFAULT '0',
  `sortorderid` smallint(5) unsigned NOT NULL,
  `phone` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `uitype` tinyint(1) unsigned NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `code` (`code`),
  KEY `phone` (`status`,`phone`),
  KEY `uitype` (`status`,`uitype`)
) ENGINE=InnoDB AUTO_INCREMENT=242 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_crmentity_label`;
CREATE TABLE `u_yf_crmentity_label` (
  `crmid` int(10) unsigned NOT NULL,
  `label` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`crmid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_crmentity_rel_tree`;
CREATE TABLE `u_yf_crmentity_rel_tree` (
  `crmid` int(10) NOT NULL,
  `module` int(10) NOT NULL,
  `tree` varchar(50) NOT NULL,
  `relmodule` int(10) NOT NULL,
  `rel_created_user` int(10) NOT NULL,
  `rel_created_time` datetime NOT NULL,
  `rel_comment` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_crmentity_search_label`;
CREATE TABLE `u_yf_crmentity_search_label` (
  `crmid` int(10) unsigned NOT NULL,
  `searchlabel` varchar(255) NOT NULL,
  `setype` varchar(30) NOT NULL,
  `userid` text,
  PRIMARY KEY (`crmid`),
  KEY `searchlabel` (`searchlabel`),
  KEY `searchlabel_2` (`searchlabel`,`setype`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_dashboard_type`;
CREATE TABLE `u_yf_dashboard_type` (
  `dashboard_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `name` varchar(255) NOT NULL,
  `system` smallint(1) DEFAULT '0',
  PRIMARY KEY (`dashboard_id`)
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8;;

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

DROP TABLE IF EXISTS `u_yf_fcorectinginvoice_invmap`;
CREATE TABLE `u_yf_fcorectinginvoice_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;;

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

DROP TABLE IF EXISTS `u_yf_finvoice_invmap`;
CREATE TABLE `u_yf_finvoice_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;;

DROP TABLE IF EXISTS `u_yf_finvoicecost_inventory`;
CREATE TABLE `u_yf_finvoicecost_inventory` (
  `id` int(10) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  `name` int(10) DEFAULT '0',
  `qty` decimal(25,3) DEFAULT '0.000',
  `qtyparam` smallint(1) DEFAULT '0',
  `discount` decimal(28,8) DEFAULT '0.00000000',
  `discountparam` varchar(255) DEFAULT NULL,
  `comment1` text,
  `currency` int(10) DEFAULT NULL,
  `currencyparam` varchar(1024) DEFAULT NULL,
  `discountmode` smallint(1) DEFAULT '0',
  `taxmode` smallint(1) DEFAULT '0',
  `price` decimal(28,8) DEFAULT '0.00000000',
  `gross` decimal(28,8) DEFAULT '0.00000000',
  `net` decimal(28,8) DEFAULT '0.00000000',
  `tax` decimal(28,8) DEFAULT '0.00000000',
  `taxparam` varchar(255) DEFAULT NULL,
  `total` decimal(28,8) DEFAULT '0.00000000',
  `unit` varchar(255) DEFAULT NULL,
  `subunit` varchar(255) DEFAULT NULL,
  KEY `finvoicecost_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_finvoicecost_invfield`;
CREATE TABLE `u_yf_finvoicecost_invfield` (
  `id` int(10) 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 AUTO_INCREMENT=15 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_finvoicecost_invmap`;
CREATE TABLE `u_yf_finvoicecost_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;;

DROP TABLE IF EXISTS `u_yf_finvoiceproforma_address`;
CREATE TABLE `u_yf_finvoiceproforma_address` (
  `finvoiceproformaaddressid` int(10) NOT NULL,
  `addresslevel1c` varchar(255) DEFAULT NULL,
  `addresslevel2c` varchar(255) DEFAULT NULL,
  `addresslevel3c` varchar(255) DEFAULT NULL,
  `addresslevel4c` varchar(255) DEFAULT NULL,
  `addresslevel5c` varchar(255) DEFAULT NULL,
  `addresslevel6c` varchar(255) DEFAULT NULL,
  `addresslevel7c` varchar(255) DEFAULT NULL,
  `addresslevel8c` varchar(255) DEFAULT NULL,
  `buildingnumberc` varchar(255) DEFAULT NULL,
  `localnumberc` varchar(255) DEFAULT NULL,
  `poboxc` varchar(255) DEFAULT NULL,
  PRIMARY KEY (`finvoiceproformaaddressid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

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

DROP TABLE IF EXISTS `u_yf_finvoiceproforma_invmap`;
CREATE TABLE `u_yf_finvoiceproforma_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;;

DROP TABLE IF EXISTS `u_yf_github`;
CREATE TABLE `u_yf_github` (
  `github_id` int(10) NOT NULL AUTO_INCREMENT,
  `client_id` varchar(20) DEFAULT NULL,
  `token` varchar(100) DEFAULT NULL,
  `username` varchar(32) DEFAULT NULL,
  PRIMARY KEY (`github_id`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

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

DROP TABLE IF EXISTS `u_yf_igdn_invmap`;
CREATE TABLE `u_yf_igdn_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;;

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

DROP TABLE IF EXISTS `u_yf_igdnc_invmap`;
CREATE TABLE `u_yf_igdnc_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;;

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

DROP TABLE IF EXISTS `u_yf_igin_invmap`;
CREATE TABLE `u_yf_igin_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;;

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

DROP TABLE IF EXISTS `u_yf_igrn_invmap`;
CREATE TABLE `u_yf_igrn_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;;

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

DROP TABLE IF EXISTS `u_yf_igrnc_invmap`;
CREATE TABLE `u_yf_igrnc_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;;

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

DROP TABLE IF EXISTS `u_yf_iidn_invmap`;
CREATE TABLE `u_yf_iidn_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;;

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

DROP TABLE IF EXISTS `u_yf_ipreorder_invmap`;
CREATE TABLE `u_yf_ipreorder_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;;

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

DROP TABLE IF EXISTS `u_yf_istdn_invmap`;
CREATE TABLE `u_yf_istdn_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;;

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

DROP TABLE IF EXISTS `u_yf_istrn_invmap`;
CREATE TABLE `u_yf_istrn_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;;

DROP TABLE IF EXISTS `u_yf_mail_autologin`;
CREATE TABLE `u_yf_mail_autologin` (
  `ruid` smallint(5) unsigned NOT NULL,
  `key` varchar(50) NOT NULL,
  `cuid` smallint(5) unsigned NOT NULL,
  `params` text NOT NULL,
  KEY `ruid` (`ruid`),
  KEY `cuid` (`cuid`),
  KEY `key` (`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_mail_compose_data`;
CREATE TABLE `u_yf_mail_compose_data` (
  `userid` smallint(5) unsigned NOT NULL,
  `key` varchar(32) NOT NULL,
  `data` text NOT NULL,
  UNIQUE KEY `userid` (`userid`,`key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_openstreetmap`;
CREATE TABLE `u_yf_openstreetmap` (
  `crmid` int(10) unsigned NOT NULL,
  `type` char(1) NOT NULL,
  `lat` decimal(10,7) DEFAULT NULL,
  `lon` decimal(10,7) DEFAULT NULL,
  KEY `u_yf_openstreetmap_lat_lon` (`lat`,`lon`),
  KEY `crmid_type` (`crmid`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_openstreetmap_address_updater`;
CREATE TABLE `u_yf_openstreetmap_address_updater` (
  `crmid` int(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_openstreetmap_cache`;
CREATE TABLE `u_yf_openstreetmap_cache` (
  `user_id` int(10) unsigned NOT NULL,
  `module_name` varchar(50) NOT NULL,
  `crmids` int(10) unsigned NOT NULL,
  KEY `u_yf_openstreetmap_cache_user_id_module_name_idx` (`user_id`,`module_name`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_openstreetmap_record_updater`;
CREATE TABLE `u_yf_openstreetmap_record_updater` (
  `crmid` int(10) NOT NULL,
  `type` char(1) NOT NULL,
  `address` text NOT NULL,
  KEY `crmid` (`crmid`,`type`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_recurring_info`;
CREATE TABLE `u_yf_recurring_info` (
  `srecurringordersid` int(10) NOT NULL DEFAULT '0',
  `target_module` varchar(25) DEFAULT NULL,
  `recurring_frequency` varchar(100) DEFAULT NULL,
  `start_period` date DEFAULT NULL,
  `end_period` date DEFAULT NULL,
  `date_start` date DEFAULT NULL,
  `date_end` date DEFAULT NULL,
  `last_recurring_date` date DEFAULT NULL,
  PRIMARY KEY (`srecurringordersid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

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

DROP TABLE IF EXISTS `u_yf_scalculations_invmap`;
CREATE TABLE `u_yf_scalculations_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;;

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

DROP TABLE IF EXISTS `u_yf_squoteenquiries_invmap`;
CREATE TABLE `u_yf_squoteenquiries_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;;

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

DROP TABLE IF EXISTS `u_yf_squotes_invmap`;
CREATE TABLE `u_yf_squotes_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;;

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

DROP TABLE IF EXISTS `u_yf_srecurringorders_invmap`;
CREATE TABLE `u_yf_srecurringorders_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;;

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

DROP TABLE IF EXISTS `u_yf_srequirementscards_invmap`;
CREATE TABLE `u_yf_srequirementscards_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;;

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

DROP TABLE IF EXISTS `u_yf_ssingleorders_invmap`;
CREATE TABLE `u_yf_ssingleorders_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;;

DROP TABLE IF EXISTS `u_yf_svendorenquiries_inventory`;
CREATE TABLE `u_yf_svendorenquiries_inventory` (
  `id` int(10) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  `name` int(10) DEFAULT '0',
  `qty` decimal(25,3) DEFAULT '0.000',
  `qtyparam` smallint(1) DEFAULT '0',
  `comment1` text,
  `price` decimal(28,8) DEFAULT '0.00000000',
  `total` decimal(28,8) DEFAULT '0.00000000',
  `purchase` decimal(28,8) DEFAULT '0.00000000',
  `marginp` decimal(28,8) DEFAULT '0.00000000',
  `margin` decimal(28,8) DEFAULT '0.00000000',
  `unit` varchar(255) DEFAULT NULL,
  `subunit` varchar(255) DEFAULT NULL,
  KEY `svendorenquiries_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_svendorenquiries_invfield`;
CREATE TABLE `u_yf_svendorenquiries_invfield` (
  `id` int(10) 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 AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `u_yf_svendorenquiries_invmap`;
CREATE TABLE `u_yf_svendorenquiries_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;;

DROP TABLE IF EXISTS `u_yf_watchdog_module`;
CREATE TABLE `u_yf_watchdog_module` (
  `member` varchar(50) NOT NULL,
  `module` int(10) unsigned NOT NULL,
  `lock` tinyint(1) DEFAULT '0',
  `exceptions` text,
  PRIMARY KEY (`member`,`module`),
  KEY `userid` (`member`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `update_sini`;
CREATE TABLE `update_sini` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `sini` varchar(20) NOT NULL,
  `rut` varchar(15) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=MyISAM AUTO_INCREMENT=479 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_abogadoasignado`;
CREATE TABLE `vtiger_abogadoasignado` (
  `abogadoasignadoid` int(11) NOT NULL AUTO_INCREMENT,
  `abogadoasignado` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`abogadoasignadoid`)
) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_accounts_status`;
CREATE TABLE `vtiger_accounts_status` (
  `accounts_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `accounts_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 (`accounts_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_accounttype`;
CREATE TABLE `vtiger_accounttype` (
  `accounttypeid` int(10) NOT NULL AUTO_INCREMENT,
  `accounttype` 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 (`accounttypeid`),
  UNIQUE KEY `accounttype_accounttype_idx` (`accounttype`)
) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_accounttype_seq`;
CREATE TABLE `vtiger_accounttype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_acreditacionpie`;
CREATE TABLE `vtiger_acreditacionpie` (
  `acreditacionpieid` int(11) NOT NULL AUTO_INCREMENT,
  `acreditacionpie` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`acreditacionpieid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_actionmapping`;
CREATE TABLE `vtiger_actionmapping` (
  `actionid` int(10) NOT NULL,
  `actionname` varchar(200) NOT NULL,
  `securitycheck` int(10) DEFAULT NULL,
  PRIMARY KEY (`actionid`,`actionname`),
  KEY `actionname` (`actionname`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_actividadasegurado`;
CREATE TABLE `vtiger_actividadasegurado` (
  `actividadaseguradoid` int(11) NOT NULL AUTO_INCREMENT,
  `actividadasegurado` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`actividadaseguradoid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_actividadcia`;
CREATE TABLE `vtiger_actividadcia` (
  `actividadciaid` int(11) NOT NULL AUTO_INCREMENT,
  `actividadcia` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`actividadciaid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_actividadcmf`;
CREATE TABLE `vtiger_actividadcmf` (
  `actividadcmfid` int(11) NOT NULL AUTO_INCREMENT,
  `actividadcmf` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`actividadcmfid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_actividadcorredor`;
CREATE TABLE `vtiger_actividadcorredor` (
  `actividadcorredorid` int(11) NOT NULL AUTO_INCREMENT,
  `actividadcorredor` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`actividadcorredorid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_actividadliquidador`;
CREATE TABLE `vtiger_actividadliquidador` (
  `actividadliquidadorid` int(11) NOT NULL AUTO_INCREMENT,
  `actividadliquidador` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`actividadliquidadorid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activity_inventory`;
CREATE TABLE `vtiger_activity_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `calendar_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activity_invfield`;
CREATE TABLE `vtiger_activity_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;;

DROP TABLE IF EXISTS `vtiger_activity_invmap`;
CREATE TABLE `vtiger_activity_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;;

DROP TABLE IF EXISTS `vtiger_activity_view`;
CREATE TABLE `vtiger_activity_view` (
  `activity_viewid` int(10) NOT NULL AUTO_INCREMENT,
  `activity_view` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`activity_viewid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activity_view_seq`;
CREATE TABLE `vtiger_activity_view_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activitystatus`;
CREATE TABLE `vtiger_activitystatus` (
  `activitystatusid` int(10) NOT NULL AUTO_INCREMENT,
  `activitystatus` 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 (`activitystatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activitystatus_seq`;
CREATE TABLE `vtiger_activitystatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activitytype`;
CREATE TABLE `vtiger_activitytype` (
  `activitytypeid` int(10) NOT NULL AUTO_INCREMENT,
  `activitytype` 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 NULL,
  PRIMARY KEY (`activitytypeid`),
  UNIQUE KEY `activitytype_activitytype_idx` (`activitytype`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_activitytype_seq`;
CREATE TABLE `vtiger_activitytype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_afp`;
CREATE TABLE `vtiger_afp` (
  `afpid` int(11) NOT NULL AUTO_INCREMENT,
  `afp` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`afpid`)
) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_anio`;
CREATE TABLE `vtiger_anio` (
  `anioid` int(11) NOT NULL AUTO_INCREMENT,
  `anio` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`anioid`)
) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_announcementstatus`;
CREATE TABLE `vtiger_announcementstatus` (
  `announcementstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `announcementstatus` 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 (`announcementstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_anovehiculo`;
CREATE TABLE `vtiger_anovehiculo` (
  `anovehiculoid` int(11) NOT NULL AUTO_INCREMENT,
  `anovehiculo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`anovehiculoid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_antigpropiedad`;
CREATE TABLE `vtiger_antigpropiedad` (
  `antigpropiedadid` int(11) NOT NULL AUTO_INCREMENT,
  `antigpropiedad` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`antigpropiedadid`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_antiguedad`;
CREATE TABLE `vtiger_antiguedad` (
  `antiguedadid` int(11) NOT NULL AUTO_INCREMENT,
  `antiguedad` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`antiguedadid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_apiaddress`;
CREATE TABLE `vtiger_apiaddress` (
  `id` int(10) NOT NULL,
  `name` varchar(255) NOT NULL,
  `val` varchar(255) NOT NULL,
  `type` varchar(255) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_appsuspac`;
CREATE TABLE `vtiger_appsuspac` (
  `appsuspacid` int(11) NOT NULL AUTO_INCREMENT,
  `appsuspac` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`appsuspacid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_asociadoesterno`;
CREATE TABLE `vtiger_asociadoesterno` (
  `asociadoesternoid` int(11) NOT NULL AUTO_INCREMENT,
  `asociadoesterno` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`asociadoesternoid`)
) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_assets_renew`;
CREATE TABLE `vtiger_assets_renew` (
  `assets_renewid` int(10) NOT NULL AUTO_INCREMENT,
  `assets_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 (`assets_renewid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_assetstatus`;
CREATE TABLE `vtiger_assetstatus` (
  `assetstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `assetstatus` 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 (`assetstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_assetstatus_seq`;
CREATE TABLE `vtiger_assetstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_asterisk`;
CREATE TABLE `vtiger_asterisk` (
  `server` varchar(30) DEFAULT NULL,
  `port` varchar(30) DEFAULT NULL,
  `username` varchar(50) DEFAULT NULL,
  `password` varchar(50) DEFAULT NULL,
  `version` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_asteriskextensions`;
CREATE TABLE `vtiger_asteriskextensions` (
  `userid` smallint(5) unsigned NOT NULL,
  `asterisk_extension` varchar(50) DEFAULT NULL,
  `use_asterisk` varchar(3) DEFAULT NULL,
  PRIMARY KEY (`userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_asteriskincomingcalls`;
CREATE TABLE `vtiger_asteriskincomingcalls` (
  `from_number` varchar(50) DEFAULT NULL,
  `from_name` varchar(50) DEFAULT NULL,
  `to_number` varchar(50) DEFAULT NULL,
  `callertype` varchar(30) DEFAULT NULL,
  `flag` int(10) DEFAULT NULL,
  `timer` int(10) DEFAULT NULL,
  `refuid` varchar(255) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_asteriskincomingevents`;
CREATE TABLE `vtiger_asteriskincomingevents` (
  `uid` varchar(255) NOT NULL,
  `channel` varchar(100) DEFAULT NULL,
  `from_number` bigint(10) DEFAULT NULL,
  `from_name` varchar(100) DEFAULT NULL,
  `to_number` bigint(10) DEFAULT NULL,
  `callertype` varchar(100) DEFAULT NULL,
  `timer` int(10) DEFAULT NULL,
  `flag` varchar(3) DEFAULT NULL,
  `pbxrecordid` int(10) DEFAULT NULL,
  `relcrmid` int(10) DEFAULT NULL,
  PRIMARY KEY (`uid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_audcon`;
CREATE TABLE `vtiger_audcon` (
  `audconid` int(11) NOT NULL AUTO_INCREMENT,
  `audcon` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`audconid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_audit_trial`;
CREATE TABLE `vtiger_audit_trial` (
  `auditid` int(10) NOT NULL,
  `userid` int(10) DEFAULT NULL,
  `module` varchar(255) DEFAULT NULL,
  `action` varchar(255) DEFAULT NULL,
  `recordid` varchar(20) DEFAULT NULL,
  `actiondate` datetime DEFAULT NULL,
  PRIMARY KEY (`auditid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_automovil1`;
CREATE TABLE `vtiger_automovil1` (
  `automovil1id` int(11) NOT NULL AUTO_INCREMENT,
  `automovil1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`automovil1id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_automovil2`;
CREATE TABLE `vtiger_automovil2` (
  `automovil2id` int(11) NOT NULL AUTO_INCREMENT,
  `automovil2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`automovil2id`)
) ENGINE=InnoDB AUTO_INCREMENT=57 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bacnodepagocuotados`;
CREATE TABLE `vtiger_bacnodepagocuotados` (
  `bacnodepagocuotadosid` int(11) NOT NULL AUTO_INCREMENT,
  `bacnodepagocuotados` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bacnodepagocuotadosid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_banco`;
CREATE TABLE `vtiger_banco` (
  `bancoid` int(11) NOT NULL AUTO_INCREMENT,
  `banco` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bancoid`)
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bancodepagocuotatres`;
CREATE TABLE `vtiger_bancodepagocuotatres` (
  `bancodepagocuotatresid` int(11) NOT NULL AUTO_INCREMENT,
  `bancodepagocuotatres` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bancodepagocuotatresid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bancoempleado`;
CREATE TABLE `vtiger_bancoempleado` (
  `bancoempleadoid` int(11) NOT NULL AUTO_INCREMENT,
  `bancoempleado` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bancoempleadoid`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bancopago`;
CREATE TABLE `vtiger_bancopago` (
  `bancopagoid` int(11) NOT NULL AUTO_INCREMENT,
  `bancopago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bancopagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bancopagoaddendum1`;
CREATE TABLE `vtiger_bancopagoaddendum1` (
  `bancopagoaddendum1id` int(11) NOT NULL AUTO_INCREMENT,
  `bancopagoaddendum1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bancopagoaddendum1id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bancopagocuotauno`;
CREATE TABLE `vtiger_bancopagocuotauno` (
  `bancopagocuotaunoid` int(11) NOT NULL AUTO_INCREMENT,
  `bancopagocuotauno` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bancopagocuotaunoid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdepago`;
CREATE TABLE `vtiger_bdepago` (
  `bdepagoid` int(11) NOT NULL AUTO_INCREMENT,
  `bdepago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdepagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago`;
CREATE TABLE `vtiger_bdpago` (
  `bdpagoid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpagoid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago1cuota`;
CREATE TABLE `vtiger_bdpago1cuota` (
  `bdpago1cuotaid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago1cuota` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpago1cuotaid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago2cuota`;
CREATE TABLE `vtiger_bdpago2cuota` (
  `bdpago2cuotaid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago2cuota` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpago2cuotaid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago3cuota`;
CREATE TABLE `vtiger_bdpago3cuota` (
  `bdpago3cuotaid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago3cuota` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpago3cuotaid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago4cuota`;
CREATE TABLE `vtiger_bdpago4cuota` (
  `bdpago4cuotaid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago4cuota` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpago4cuotaid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago5cuuota`;
CREATE TABLE `vtiger_bdpago5cuuota` (
  `bdpago5cuuotaid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago5cuuota` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpago5cuuotaid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bdpago6cuota`;
CREATE TABLE `vtiger_bdpago6cuota` (
  `bdpago6cuotaid` int(11) NOT NULL AUTO_INCREMENT,
  `bdpago6cuota` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bdpago6cuotaid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bienesembargados`;
CREATE TABLE `vtiger_bienesembargados` (
  `bienesembargadosid` int(11) NOT NULL AUTO_INCREMENT,
  `bienesembargados` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`bienesembargadosid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bienesembargadosdc`;
CREATE TABLE `vtiger_bienesembargadosdc` (
  `bienesembargadosdcid` int(11) NOT NULL AUTO_INCREMENT,
  `bienesembargadosdc` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bienesembargadosdcid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bieninmueble1`;
CREATE TABLE `vtiger_bieninmueble1` (
  `bieninmueble1id` int(11) NOT NULL AUTO_INCREMENT,
  `bieninmueble1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bieninmueble1id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_bieninmueble2`;
CREATE TABLE `vtiger_bieninmueble2` (
  `bieninmueble2id` int(11) NOT NULL AUTO_INCREMENT,
  `bieninmueble2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`bieninmueble2id`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_blocks_hide`;
CREATE TABLE `vtiger_blocks_hide` (
  `id` int(10) unsigned NOT NULL AUTO_INCREMENT,
  `blockid` int(10) unsigned DEFAULT NULL,
  `conditions` text,
  `enabled` tinyint(1) unsigned DEFAULT NULL,
  `view` varchar(100) DEFAULT NULL,
  PRIMARY KEY (`id`),
  KEY `blockid` (`blockid`,`enabled`),
  KEY `view` (`view`),
  KEY `blockid_2` (`blockid`,`enabled`,`view`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_calendar_config`;
CREATE TABLE `vtiger_calendar_config` (
  `type` varchar(10) DEFAULT NULL,
  `name` varchar(20) DEFAULT NULL,
  `label` varchar(20) DEFAULT NULL,
  `value` varchar(100) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_callduration`;
CREATE TABLE `vtiger_callduration` (
  `calldurationid` int(10) NOT NULL AUTO_INCREMENT,
  `callduration` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`calldurationid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_callduration_seq`;
CREATE TABLE `vtiger_callduration_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_callhistorytype`;
CREATE TABLE `vtiger_callhistorytype` (
  `callhistorytypeid` int(10) NOT NULL AUTO_INCREMENT,
  `callhistorytype` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`callhistorytypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_callhistorytype_seq`;
CREATE TABLE `vtiger_callhistorytype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campaign`;
CREATE TABLE `vtiger_campaign` (
  `campaign_no` varchar(100) NOT NULL,
  `campaignname` varchar(255) DEFAULT NULL,
  `campaigntype` varchar(200) DEFAULT NULL,
  `campaignstatus` varchar(200) DEFAULT NULL,
  `expectedrevenue` decimal(25,8) DEFAULT NULL,
  `budgetcost` decimal(25,8) DEFAULT NULL,
  `actualcost` decimal(25,8) DEFAULT NULL,
  `expectedresponse` varchar(200) DEFAULT NULL,
  `numsent` decimal(11,0) DEFAULT NULL,
  `product_id` int(10) DEFAULT NULL,
  `sponsor` varchar(255) DEFAULT NULL,
  `targetaudience` varchar(255) DEFAULT NULL,
  `targetsize` int(10) DEFAULT NULL,
  `expectedresponsecount` int(10) DEFAULT NULL,
  `expectedsalescount` int(10) DEFAULT NULL,
  `expectedroi` decimal(25,8) DEFAULT NULL,
  `actualresponsecount` int(10) DEFAULT NULL,
  `actualsalescount` int(10) DEFAULT NULL,
  `actualroi` decimal(25,8) DEFAULT NULL,
  `campaignid` int(10) NOT NULL,
  `closingdate` date DEFAULT NULL,
  `sum_time` decimal(10,2) DEFAULT '0.00',
  PRIMARY KEY (`campaignid`),
  KEY `campaign_campaignstatus_idx` (`campaignstatus`),
  KEY `campaign_campaignname_idx` (`campaignname`),
  KEY `campaign_campaignid_idx` (`campaignid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campaignstatus`;
CREATE TABLE `vtiger_campaignstatus` (
  `campaignstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `campaignstatus` 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 (`campaignstatusid`),
  KEY `campaignstatus_campaignstatus_idx` (`campaignstatus`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campaignstatus_seq`;
CREATE TABLE `vtiger_campaignstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campaigntype`;
CREATE TABLE `vtiger_campaigntype` (
  `campaigntypeid` int(10) NOT NULL AUTO_INCREMENT,
  `campaigntype` 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 (`campaigntypeid`),
  UNIQUE KEY `campaigntype_campaigntype_idx` (`campaigntype`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campaigntype_seq`;
CREATE TABLE `vtiger_campaigntype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campana`;
CREATE TABLE `vtiger_campana` (
  `campanaid` int(11) NOT NULL AUTO_INCREMENT,
  `campana` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`campanaid`)
) ENGINE=InnoDB AUTO_INCREMENT=102 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campanafacebook_inventory`;
CREATE TABLE `vtiger_campanafacebook_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `campanafacebook_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campanafacebook_invfield`;
CREATE TABLE `vtiger_campanafacebook_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;;

DROP TABLE IF EXISTS `vtiger_campanafacebook_invmap`;
CREATE TABLE `vtiger_campanafacebook_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;;

DROP TABLE IF EXISTS `vtiger_campanasAsesorx`;
CREATE TABLE `vtiger_campanasAsesorx` (
  `nombre_campana` varchar(100) NOT NULL,
  `comuna` varchar(60) NOT NULL,
  `nombre` varchar(100) NOT NULL,
  `telefono` varchar(40) NOT NULL,
  `correo` varchar(100) NOT NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campanasmktdigital_2`;
CREATE TABLE `vtiger_campanasmktdigital_2` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `camp` varchar(10) NOT NULL,
  `email` varchar(100) NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB AUTO_INCREMENT=546 DEFAULT CHARSET=latin1;;

DROP TABLE IF EXISTS `vtiger_campanasmktdigital_inventory`;
CREATE TABLE `vtiger_campanasmktdigital_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `campanasmktdigital_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_campanasmktdigital_invfield`;
CREATE TABLE `vtiger_campanasmktdigital_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;;

DROP TABLE IF EXISTS `vtiger_campanasmktdigital_invmap`;
CREATE TABLE `vtiger_campanasmktdigital_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;;

DROP TABLE IF EXISTS `vtiger_canal`;
CREATE TABLE `vtiger_canal` (
  `canalid` int(11) NOT NULL AUTO_INCREMENT,
  `canal` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`canalid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_canalcaptacion`;
CREATE TABLE `vtiger_canalcaptacion` (
  `canalcaptacionid` int(11) NOT NULL AUTO_INCREMENT,
  `canalcaptacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`canalcaptacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cantidadnotenc`;
CREATE TABLE `vtiger_cantidadnotenc` (
  `cantidadnotencid` int(11) NOT NULL AUTO_INCREMENT,
  `cantidadnotenc` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`cantidadnotencid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cantllamados`;
CREATE TABLE `vtiger_cantllamados` (
  `cantllamadosid` int(11) NOT NULL AUTO_INCREMENT,
  `cantllamados` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`cantllamadosid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_captador`;
CREATE TABLE `vtiger_captador` (
  `captadorid` int(11) NOT NULL AUTO_INCREMENT,
  `captador` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`captadorid`)
) ENGINE=InnoDB AUTO_INCREMENT=331 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_captadorfree`;
CREATE TABLE `vtiger_captadorfree` (
  `captadorfreeid` int(11) NOT NULL AUTO_INCREMENT,
  `captadorfree` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`captadorfreeid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_categoriacomision`;
CREATE TABLE `vtiger_categoriacomision` (
  `categoriacomisionid` int(11) NOT NULL AUTO_INCREMENT,
  `categoriacomision` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`categoriacomisionid`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_categorizacion`;
CREATE TABLE `vtiger_categorizacion` (
  `categorizacionid` int(11) NOT NULL AUTO_INCREMENT,
  `categorizacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`categorizacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cau_as_le`;
CREATE TABLE `vtiger_cau_as_le` (
  `cau_as_leid` int(11) NOT NULL AUTO_INCREMENT,
  `cau_as_le` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` int(10) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`cau_as_leid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_causalesmixtas`;
CREATE TABLE `vtiger_causalesmixtas` (
  `causalesmixtasid` int(11) NOT NULL AUTO_INCREMENT,
  `causalesmixtas` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`causalesmixtasid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_causalesmixtas2`;
CREATE TABLE `vtiger_causalesmixtas2` (
  `causalesmixtas2id` int(11) NOT NULL AUTO_INCREMENT,
  `causalesmixtas2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`causalesmixtas2id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_ciaseguros`;
CREATE TABLE `vtiger_ciaseguros` (
  `ciasegurosid` int(11) NOT NULL AUTO_INCREMENT,
  `ciaseguros` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`ciasegurosid`)
) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_ciudadcaso`;
CREATE TABLE `vtiger_ciudadcaso` (
  `ciudadcasoid` int(11) NOT NULL AUTO_INCREMENT,
  `ciudadcaso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`ciudadcasoid`)
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_ciudadcliente`;
CREATE TABLE `vtiger_ciudadcliente` (
  `ciudadclienteid` int(11) NOT NULL AUTO_INCREMENT,
  `ciudadcliente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`ciudadclienteid`)
) ENGINE=InnoDB AUTO_INCREMENT=115 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_claseapelacion`;
CREATE TABLE `vtiger_claseapelacion` (
  `claseapelacionid` int(11) NOT NULL AUTO_INCREMENT,
  `claseapelacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`claseapelacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_clasecasacion`;
CREATE TABLE `vtiger_clasecasacion` (
  `clasecasacionid` int(11) NOT NULL AUTO_INCREMENT,
  `clasecasacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`clasecasacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_clasedeapelacion`;
CREATE TABLE `vtiger_clasedeapelacion` (
  `clasedeapelacionid` int(11) NOT NULL AUTO_INCREMENT,
  `clasedeapelacion` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`clasedeapelacionid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cmileage_logbook_status`;
CREATE TABLE `vtiger_cmileage_logbook_status` (
  `cmileage_logbook_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `cmileage_logbook_status` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `picklist_valueid` smallint(5) DEFAULT '0',
  `sortorderid` smallint(5) DEFAULT '0',
  PRIMARY KEY (`cmileage_logbook_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cobertura`;
CREATE TABLE `vtiger_cobertura` (
  `coberturaid` int(11) NOT NULL AUTO_INCREMENT,
  `cobertura` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`coberturaid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cobertura2`;
CREATE TABLE `vtiger_cobertura2` (
  `cobertura2id` int(11) NOT NULL AUTO_INCREMENT,
  `cobertura2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`cobertura2id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cobertura3`;
CREATE TABLE `vtiger_cobertura3` (
  `cobertura3id` int(11) NOT NULL AUTO_INCREMENT,
  `cobertura3` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`cobertura3id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comuna`;
CREATE TABLE `vtiger_comuna` (
  `comunaid` int(11) NOT NULL AUTO_INCREMENT,
  `comuna` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunaid`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunabi1`;
CREATE TABLE `vtiger_comunabi1` (
  `comunabi1id` int(11) NOT NULL AUTO_INCREMENT,
  `comunabi1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunabi1id`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunabi2`;
CREATE TABLE `vtiger_comunabi2` (
  `comunabi2id` int(11) NOT NULL AUTO_INCREMENT,
  `comunabi2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunabi2id`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunacaso`;
CREATE TABLE `vtiger_comunacaso` (
  `comunacasoid` int(11) NOT NULL AUTO_INCREMENT,
  `comunacaso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  `color` varchar(25) DEFAULT NULL,
  PRIMARY KEY (`comunacasoid`)
) ENGINE=InnoDB AUTO_INCREMENT=148 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunacli`;
CREATE TABLE `vtiger_comunacli` (
  `comunacliid` int(11) NOT NULL AUTO_INCREMENT,
  `comunacli` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunacliid`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunacliente`;
CREATE TABLE `vtiger_comunacliente` (
  `comunaclienteid` int(11) NOT NULL AUTO_INCREMENT,
  `comunacliente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunaclienteid`)
) ENGINE=InnoDB AUTO_INCREMENT=409 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunadelcaso`;
CREATE TABLE `vtiger_comunadelcaso` (
  `comunadelcasoid` int(11) NOT NULL AUTO_INCREMENT,
  `comunadelcaso` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunadelcasoid`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunadelcliente`;
CREATE TABLE `vtiger_comunadelcliente` (
  `comunadelclienteid` int(11) NOT NULL AUTO_INCREMENT,
  `comunadelcliente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunadelclienteid`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_comunaempleador`;
CREATE TABLE `vtiger_comunaempleador` (
  `comunaempleadorid` int(11) NOT NULL AUTO_INCREMENT,
  `comunaempleador` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`comunaempleadorid`)
) ENGINE=InnoDB AUTO_INCREMENT=347 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_concepto`;
CREATE TABLE `vtiger_concepto` (
  `conceptoid` int(11) NOT NULL AUTO_INCREMENT,
  `concepto` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`conceptoid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_concepto1`;
CREATE TABLE `vtiger_concepto1` (
  `concepto1id` int(11) NOT NULL AUTO_INCREMENT,
  `concepto1` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`concepto1id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_concepto2`;
CREATE TABLE `vtiger_concepto2` (
  `concepto2id` int(11) NOT NULL AUTO_INCREMENT,
  `concepto2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`concepto2id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_concepto3`;
CREATE TABLE `vtiger_concepto3` (
  `concepto3id` int(11) NOT NULL AUTO_INCREMENT,
  `concepto3` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`concepto3id`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contactstatus`;
CREATE TABLE `vtiger_contactstatus` (
  `contactstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `contactstatus` 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 (`contactstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contactstatus_seq`;
CREATE TABLE `vtiger_contactstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contract_priority`;
CREATE TABLE `vtiger_contract_priority` (
  `contract_priorityid` int(10) NOT NULL AUTO_INCREMENT,
  `contract_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 (`contract_priorityid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contract_priority_seq`;
CREATE TABLE `vtiger_contract_priority_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contract_status`;
CREATE TABLE `vtiger_contract_status` (
  `contract_statusid` int(10) NOT NULL AUTO_INCREMENT,
  `contract_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 (`contract_statusid`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contract_status_seq`;
CREATE TABLE `vtiger_contract_status_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contract_type`;
CREATE TABLE `vtiger_contract_type` (
  `contract_typeid` int(10) NOT NULL AUTO_INCREMENT,
  `contract_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 (`contract_typeid`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_contract_type_seq`;
CREATE TABLE `vtiger_contract_type_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_convertleadmapping`;
CREATE TABLE `vtiger_convertleadmapping` (
  `cfmid` int(10) NOT NULL AUTO_INCREMENT,
  `leadfid` int(10) NOT NULL,
  `accountfid` int(10) DEFAULT NULL,
  `editable` int(10) DEFAULT '1',
  PRIMARY KEY (`cfmid`)
) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_corr_seg`;
CREATE TABLE `vtiger_corr_seg` (
  `corr_segid` int(11) NOT NULL AUTO_INCREMENT,
  `corr_seg` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`corr_segid`)
) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cortecompetente`;
CREATE TABLE `vtiger_cortecompetente` (
  `cortecompetenteid` int(11) NOT NULL AUTO_INCREMENT,
  `cortecompetente` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`cortecompetenteid`)
) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_crmentity`;
CREATE TABLE `vtiger_crmentity` (
  `crmid` int(10) NOT NULL AUTO_INCREMENT,
  `smcreatorid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `smownerid` smallint(5) unsigned NOT NULL DEFAULT '0',
  `shownerid` tinyint(1) DEFAULT NULL,
  `modifiedby` smallint(5) unsigned NOT NULL DEFAULT '0',
  `setype` varchar(30) NOT NULL,
  `description` text,
  `attention` text,
  `createdtime` datetime NOT NULL,
  `modifiedtime` datetime NOT NULL,
  `viewedtime` datetime DEFAULT NULL,
  `closedtime` datetime DEFAULT NULL,
  `status` varchar(50) DEFAULT NULL,
  `version` int(10) unsigned NOT NULL DEFAULT '0',
  `presence` tinyint(1) unsigned NOT NULL DEFAULT '1',
  `deleted` tinyint(1) unsigned NOT NULL DEFAULT '0',
  `was_read` tinyint(1) DEFAULT '0',
  `private` tinyint(1) DEFAULT '0',
  `users` text,
  PRIMARY KEY (`crmid`),
  KEY `crmentity_smcreatorid_idx` (`smcreatorid`),
  KEY `crmentity_modifiedby_idx` (`modifiedby`),
  KEY `crmentity_deleted_idx` (`deleted`),
  KEY `crm_ownerid_del_setype_idx` (`smownerid`,`deleted`,`setype`),
  KEY `crmid` (`crmid`,`deleted`),
  KEY `crmid_2` (`crmid`,`setype`),
  KEY `setypedeleted` (`setype`,`deleted`),
  KEY `setype` (`setype`)
) ENGINE=InnoDB AUTO_INCREMENT=397797 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_crmentityrel`;
CREATE TABLE `vtiger_crmentityrel` (
  `crmid` int(10) NOT NULL,
  `module` varchar(25) NOT NULL,
  `relcrmid` int(10) NOT NULL,
  `relmodule` varchar(25) NOT NULL,
  `rel_created_user` int(10) DEFAULT NULL,
  `rel_created_time` datetime DEFAULT NULL,
  `rel_comment` varchar(255) DEFAULT NULL,
  KEY `crmid` (`crmid`),
  KEY `relcrmid` (`relcrmid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cron_task`;
CREATE TABLE `vtiger_cron_task` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `name` varchar(100) DEFAULT NULL,
  `handler_file` varchar(100) DEFAULT NULL,
  `frequency` int(10) DEFAULT NULL,
  `laststart` int(10) unsigned DEFAULT NULL,
  `lastend` int(10) unsigned DEFAULT NULL,
  `status` int(10) DEFAULT NULL,
  `module` varchar(100) DEFAULT NULL,
  `sequence` int(10) DEFAULT NULL,
  `description` text,
  PRIMARY KEY (`id`),
  UNIQUE KEY `name` (`name`),
  UNIQUE KEY `handler_file` (`handler_file`)
) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currencies`;
CREATE TABLE `vtiger_currencies` (
  `currencyid` int(10) NOT NULL AUTO_INCREMENT,
  `currency_name` varchar(200) DEFAULT NULL,
  `currency_code` varchar(50) DEFAULT NULL,
  `currency_symbol` varchar(11) DEFAULT NULL,
  PRIMARY KEY (`currencyid`)
) ENGINE=InnoDB AUTO_INCREMENT=139 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currencies_seq`;
CREATE TABLE `vtiger_currencies_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency`;
CREATE TABLE `vtiger_currency` (
  `currencyid` int(10) NOT NULL AUTO_INCREMENT,
  `currency` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`currencyid`),
  UNIQUE KEY `currency_currency_idx` (`currency`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_decimal_separator`;
CREATE TABLE `vtiger_currency_decimal_separator` (
  `currency_decimal_separatorid` int(10) NOT NULL AUTO_INCREMENT,
  `currency_decimal_separator` varchar(2) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`currency_decimal_separatorid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_decimal_separator_seq`;
CREATE TABLE `vtiger_currency_decimal_separator_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_grouping_pattern`;
CREATE TABLE `vtiger_currency_grouping_pattern` (
  `currency_grouping_patternid` int(10) NOT NULL AUTO_INCREMENT,
  `currency_grouping_pattern` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`currency_grouping_patternid`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_grouping_pattern_seq`;
CREATE TABLE `vtiger_currency_grouping_pattern_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_grouping_separator`;
CREATE TABLE `vtiger_currency_grouping_separator` (
  `currency_grouping_separatorid` int(10) NOT NULL AUTO_INCREMENT,
  `currency_grouping_separator` varchar(2) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`currency_grouping_separatorid`)
) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_grouping_separator_seq`;
CREATE TABLE `vtiger_currency_grouping_separator_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_info`;
CREATE TABLE `vtiger_currency_info` (
  `id` int(10) NOT NULL AUTO_INCREMENT,
  `currency_name` varchar(100) DEFAULT NULL,
  `currency_code` varchar(100) DEFAULT NULL,
  `currency_symbol` varchar(30) DEFAULT NULL,
  `conversion_rate` decimal(12,5) DEFAULT NULL,
  `currency_status` varchar(25) DEFAULT NULL,
  `defaultid` tinyint(3) NOT NULL DEFAULT '0',
  `deleted` int(1) NOT NULL DEFAULT '0',
  PRIMARY KEY (`id`),
  KEY `deleted` (`deleted`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_symbol_placement`;
CREATE TABLE `vtiger_currency_symbol_placement` (
  `currency_symbol_placementid` int(10) NOT NULL AUTO_INCREMENT,
  `currency_symbol_placement` varchar(30) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`currency_symbol_placementid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_currency_symbol_placement_seq`;
CREATE TABLE `vtiger_currency_symbol_placement_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_cvadvfilter_grouping`;
CREATE TABLE `vtiger_cvadvfilter_grouping` (
  `groupid` int(10) unsigned NOT NULL,
  `cvid` int(10) unsigned NOT NULL,
  `group_condition` varchar(255) DEFAULT NULL,
  `condition_expression` text,
  PRIMARY KEY (`groupid`,`cvid`),
  KEY `cvid` (`cvid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_grp2us`;
CREATE TABLE `vtiger_datashare_grp2us` (
  `shareid` int(10) NOT NULL,
  `share_groupid` int(10) DEFAULT NULL,
  `to_userid` int(10) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `datashare_grp2us_share_groupid_idx` (`share_groupid`),
  KEY `datashare_grp2us_to_userid_idx` (`to_userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_relatedmodule_permission`;
CREATE TABLE `vtiger_datashare_relatedmodule_permission` (
  `shareid` int(10) NOT NULL,
  `datashare_relatedmodule_id` int(10) NOT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`,`datashare_relatedmodule_id`),
  KEY `datashare_relatedmodule_permission_shareid_permissions_idx` (`shareid`,`permission`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_relatedmodules_seq`;
CREATE TABLE `vtiger_datashare_relatedmodules_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_role2us`;
CREATE TABLE `vtiger_datashare_role2us` (
  `shareid` int(10) NOT NULL,
  `share_roleid` varchar(255) DEFAULT NULL,
  `to_userid` int(10) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `datashare_role2us_share_roleid_idx` (`share_roleid`),
  KEY `datashare_role2us_to_userid_idx` (`to_userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_rs2us`;
CREATE TABLE `vtiger_datashare_rs2us` (
  `shareid` int(10) NOT NULL,
  `share_roleandsubid` varchar(255) DEFAULT NULL,
  `to_userid` int(10) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `datashare_rs2us_share_roleandsubid_idx` (`share_roleandsubid`),
  KEY `datashare_rs2us_to_userid_idx` (`to_userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_us2grp`;
CREATE TABLE `vtiger_datashare_us2grp` (
  `shareid` int(10) NOT NULL,
  `share_userid` int(10) DEFAULT NULL,
  `to_groupid` int(10) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `datashare_us2grp_share_userid_idx` (`share_userid`),
  KEY `datashare_us2grp_to_groupid_idx` (`to_groupid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_us2role`;
CREATE TABLE `vtiger_datashare_us2role` (
  `shareid` int(10) NOT NULL,
  `share_userid` int(10) DEFAULT NULL,
  `to_roleid` varchar(255) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `idx_datashare_us2role_share_userid` (`share_userid`),
  KEY `idx_datashare_us2role_to_roleid` (`to_roleid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_us2rs`;
CREATE TABLE `vtiger_datashare_us2rs` (
  `shareid` int(10) NOT NULL,
  `share_userid` int(10) DEFAULT NULL,
  `to_roleandsubid` varchar(255) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `datashare_us2rs_share_userid_idx` (`share_userid`),
  KEY `datashare_us2rs_to_roleandsubid_idx` (`to_roleandsubid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_datashare_us2us`;
CREATE TABLE `vtiger_datashare_us2us` (
  `shareid` int(10) NOT NULL,
  `share_userid` int(10) DEFAULT NULL,
  `to_userid` int(10) DEFAULT NULL,
  `permission` int(10) DEFAULT NULL,
  PRIMARY KEY (`shareid`),
  KEY `datashare_us2us_share_userid_idx` (`share_userid`),
  KEY `datashare_us2us_to_userid_idx` (`to_userid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_date_format`;
CREATE TABLE `vtiger_date_format` (
  `date_formatid` int(10) NOT NULL AUTO_INCREMENT,
  `date_format` varchar(200) NOT NULL,
  `sortorderid` int(10) NOT NULL DEFAULT '0',
  `presence` int(1) NOT NULL DEFAULT '1',
  PRIMARY KEY (`date_formatid`)
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_date_format_seq`;
CREATE TABLE `vtiger_date_format_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_dayoftheweek`;
CREATE TABLE `vtiger_dayoftheweek` (
  `dayoftheweekid` int(10) NOT NULL AUTO_INCREMENT,
  `dayoftheweek` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`dayoftheweekid`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_dayoftheweek_seq`;
CREATE TABLE `vtiger_dayoftheweek_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_ddo`;
CREATE TABLE `vtiger_ddo` (
  `ddoid` int(11) NOT NULL AUTO_INCREMENT,
  `ddo` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`ddoid`)
) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_deducible`;
CREATE TABLE `vtiger_deducible` (
  `deducibleid` int(11) NOT NULL AUTO_INCREMENT,
  `deducible` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`deducibleid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_deducible2`;
CREATE TABLE `vtiger_deducible2` (
  `deducible2id` int(11) NOT NULL AUTO_INCREMENT,
  `deducible2` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`deducible2id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_deducible3`;
CREATE TABLE `vtiger_deducible3` (
  `deducible3id` int(11) NOT NULL AUTO_INCREMENT,
  `deducible3` varchar(255) DEFAULT NULL,
  `presence` tinyint(1) DEFAULT '1',
  `sortorderid` smallint(6) DEFAULT '0',
  PRIMARY KEY (`deducible3id`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_def_org_field`;
CREATE TABLE `vtiger_def_org_field` (
  `tabid` smallint(5) DEFAULT NULL,
  `fieldid` int(10) NOT NULL,
  `visible` int(10) DEFAULT NULL,
  `readonly` int(10) DEFAULT NULL,
  PRIMARY KEY (`fieldid`),
  KEY `def_org_field_tabid_fieldid_idx` (`tabid`,`fieldid`),
  KEY `def_org_field_tabid_idx` (`tabid`),
  KEY `def_org_field_visible_fieldid_idx` (`visible`,`fieldid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_default_record_view`;
CREATE TABLE `vtiger_default_record_view` (
  `default_record_viewid` int(10) NOT NULL AUTO_INCREMENT,
  `default_record_view` varchar(200) NOT NULL,
  `sortorderid` int(10) DEFAULT NULL,
  `presence` int(10) NOT NULL DEFAULT '1',
  PRIMARY KEY (`default_record_viewid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_default_record_view_seq`;
CREATE TABLE `vtiger_default_record_view_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_defaultactivitytype`;
CREATE TABLE `vtiger_defaultactivitytype` (
  `defaultactivitytypeid` int(10) NOT NULL AUTO_INCREMENT,
  `defaultactivitytype` 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 (`defaultactivitytypeid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_defaultactivitytype_seq`;
CREATE TABLE `vtiger_defaultactivitytype_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_defaulteventstatus`;
CREATE TABLE `vtiger_defaulteventstatus` (
  `defaulteventstatusid` int(10) NOT NULL AUTO_INCREMENT,
  `defaulteventstatus` 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 (`defaulteventstatusid`)
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_defaulteventstatus_seq`;
CREATE TABLE `vtiger_defaulteventstatus_seq` (
  `id` int(10) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_demanda`;
CREATE TABLE `vtiger_demanda` (
  `demandaid` int(11) NOT NULL DEFAULT '0',
  `demanda` varchar(255) DEFAULT NULL,
  `number` varchar(32) DEFAULT NULL,
  `cliente` varchar(16) DEFAULT '',
  `siniestro` int(11) unsigned DEFAULT '0',
  `nombrecliente` int(11) unsigned DEFAULT '0',
  `fpresupuesto` date DEFAULT NULL,
  `ciaseguros` varchar(255) DEFAULT '',
  `rutciaseguros` varchar(16) DEFAULT '',
  `direccionciaseguros` varchar(59) DEFAULT '',
  `nropoliza` varchar(16) DEFAULT '',
  `fdenuncio` date DEFAULT NULL,
  `nrosiniestro` varchar(32) DEFAULT '',
  `entliquidadora` varchar(255) DEFAULT '',
  `frecinfliq` date DEFAULT NULL,
  `freccartares` date DEFAULT NULL,
  `estdem` varchar(255) DEFAULT '',
  `solcla` tinyint(1) DEFAULT '0',
  `fechsolcla` date DEFAULT NULL,
  `clauni` varchar(10) DEFAULT '',
  `fechreccla` date DEFAULT NULL,
  `valcla` varchar(255) DEFAULT '',
  `fecvalcla` date DEFAULT NULL,
  `mannot` tinyint(1) DEFAULT '0',
  `fecrecman` date DEFAULT NULL,
  `gestmandof` tinyint(1) DEFAULT '0',
  `fechgesmanof` date DEFAULT NULL,
  `estllam` varchar(255) DEFAULT '',
  `obs` varchar(25) DEFAULT '',
  `razllam` varchar(255) DEFAULT '',
  `fechllam` date DEFAULT NULL,
  `reccla` tinyint(1) DEFAULT '0',
  `demingr` tinyint(1) DEFAULT '0',
  `certdem` tinyint(1) DEFAULT '0',
  `casa` tinyint(1) DEFAULT '0',
  `resaudnoof` tinyint(1) DEFAULT '0',
  `resaudnoas` tinyint(1) DEFAULT '0',
  `etadis` tinyint(1) DEFAULT '0',
  `autpru` tinyint(1) DEFAULT '0',
  `sentac` tinyint(1) DEFAULT '0',
  `sentacpar` tinyint(1) DEFAULT '0',
  `sentrech` tinyint(1) DEFAULT '0',
  `apelcom` tinyint(1) DEFAULT '0',
  `apelamacpa` tinyint(1) DEFAULT '0',
  `apelpracpar` tinyint(1) DEFAULT '0',
  `cascerrac` tinyint(1) DEFAULT '0',
  `movil` text,
  `inf_caso` int(11) unsigned DEFAULT '0',
  `ncaso` text,
  PRIMARY KEY (`demandaid`),
  KEY `vtiger_demanda_siniestro_idx` (`siniestro`),
  KEY `vtiger_demanda_nombrecliente_idx` (`nombrecliente`),
  KEY `vtiger_demanda_inf_caso_idx` (`inf_caso`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_demanda_inventory`;
CREATE TABLE `vtiger_demanda_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `demanda_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_demanda_invfield`;
CREATE TABLE `vtiger_demanda_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;;

DROP TABLE IF EXISTS `vtiger_demanda_invmap`;
CREATE TABLE `vtiger_demanda_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;;

DROP TABLE IF EXISTS `vtiger_demandacf`;
CREATE TABLE `vtiger_demandacf` (
  `demandaid` int(11) NOT NULL DEFAULT '0',
  `cf_3980` int(11) unsigned DEFAULT '0',
  PRIMARY KEY (`demandaid`),
  KEY `vtiger_demandacf_cf_3980_idx` (`cf_3980`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_demandacobranzaclientes_inventory`;
CREATE TABLE `vtiger_demandacobranzaclientes_inventory` (
  `id` int(11) DEFAULT NULL,
  `seq` int(10) DEFAULT NULL,
  KEY `demandacobranzaclientes_inventory_idx` (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;;

DROP TABLE IF EXISTS `vtiger_demandacobranzaclientes_invfield`;
CREATE TABLE `vtiger_demandacobranzaclientes_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;;

DROP TABLE IF EXISTS `vtiger_demandacobranzaclientes_invmap`;
CREATE TABLE `vtiger_demandacobranzaclientes_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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

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

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

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

DROP TABLE IF EXISTS `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;;

