-- phpMyAdmin SQL Dump
-- version 4.7.0
-- https://www.phpmyadmin.net/
--
-- Servidor: localhost
-- Tiempo de generación: 11-05-2017 a las 06:20:18
-- Versión del servidor: 10.1.23-MariaDB
-- Versión de PHP: 7.1.5

SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
SET AUTOCOMMIT = 0;
START TRANSACTION;
SET time_zone = "+00:00";


/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!40101 SET NAMES utf8mb4 */;

--
-- Base de datos: `saltos`
--

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tbl_clientes`
--

CREATE TABLE `tbl_clientes` (
  `id` int(11) NOT NULL,
  `id_campanya` int(11) NOT NULL DEFAULT '0',
  `id_tipo` int(11) NOT NULL DEFAULT '0',
  `nombre` varchar(255) NOT NULL DEFAULT '',
  `nombre1` varchar(255) NOT NULL DEFAULT '',
  `nombre2` varchar(255) NOT NULL DEFAULT '',
  `cif` varchar(255) NOT NULL DEFAULT '',
  `comentarios` text NOT NULL,
  `corriente` varchar(255) NOT NULL DEFAULT '',
  `contable` varchar(255) NOT NULL DEFAULT '',
  `diapago` int(11) NOT NULL DEFAULT '0',
  `direccion` varchar(255) NOT NULL DEFAULT '',
  `id_pais` int(11) NOT NULL DEFAULT '0',
  `id_provincia` int(11) NOT NULL DEFAULT '0',
  `id_poblacion` int(11) NOT NULL DEFAULT '0',
  `id_codpostal` int(11) NOT NULL DEFAULT '0',
  `nombre_pais` varchar(255) NOT NULL DEFAULT '',
  `nombre_provincia` varchar(255) NOT NULL DEFAULT '',
  `nombre_poblacion` varchar(255) NOT NULL DEFAULT '',
  `nombre_codpostal` varchar(255) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL DEFAULT '',
  `web` varchar(255) NOT NULL DEFAULT '',
  `tel_fijo` varchar(255) NOT NULL DEFAULT '',
  `tel_movil` varchar(255) NOT NULL DEFAULT '',
  `fax` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tbl_empleados`
--

CREATE TABLE `tbl_empleados` (
  `id` int(11) NOT NULL,
  `nombre` varchar(255) NOT NULL DEFAULT '',
  `nombre1` varchar(255) NOT NULL DEFAULT '',
  `nombre2` varchar(255) NOT NULL DEFAULT '',
  `cargo` varchar(255) NOT NULL DEFAULT '',
  `comentarios` text NOT NULL,
  `direccion` varchar(255) NOT NULL DEFAULT '',
  `id_pais` int(11) NOT NULL DEFAULT '0',
  `id_provincia` int(11) NOT NULL DEFAULT '0',
  `id_poblacion` int(11) NOT NULL DEFAULT '0',
  `id_codpostal` int(11) NOT NULL DEFAULT '0',
  `nombre_pais` varchar(255) NOT NULL DEFAULT '',
  `nombre_provincia` varchar(255) NOT NULL DEFAULT '',
  `nombre_poblacion` varchar(255) NOT NULL DEFAULT '',
  `nombre_codpostal` varchar(255) NOT NULL DEFAULT '',
  `email` varchar(255) NOT NULL DEFAULT '',
  `web` varchar(255) NOT NULL DEFAULT '',
  `tel_fijo` varchar(255) NOT NULL DEFAULT '',
  `tel_movil` varchar(255) NOT NULL DEFAULT '',
  `fax` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `tbl_empleados`
--

INSERT INTO `tbl_empleados` (`id`, `nombre`, `nombre1`, `nombre2`, `cargo`, `comentarios`, `direccion`, `id_pais`, `id_provincia`, `id_poblacion`, `id_codpostal`, `nombre_pais`, `nombre_provincia`, `nombre_poblacion`, `nombre_codpostal`, `email`, `web`, `tel_fijo`, `tel_movil`, `fax`) VALUES
(1, 'Josep Sanz', '', '', '', '', '', 0, 0, 0, 0, '', '', '', '', '', '', '', '', '');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tbl_ficheros`
--

CREATE TABLE `tbl_ficheros` (
  `id` int(11) NOT NULL,
  `id_aplicacion` int(11) NOT NULL DEFAULT '0',
  `id_registro` int(11) NOT NULL DEFAULT '0',
  `id_usuario` int(11) NOT NULL DEFAULT '0',
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00',
  `fichero` varchar(255) NOT NULL DEFAULT '',
  `fichero_file` varchar(255) NOT NULL DEFAULT '',
  `fichero_size` int(11) NOT NULL DEFAULT '0',
  `fichero_type` varchar(255) NOT NULL DEFAULT '',
  `search` mediumtext NOT NULL,
  `indexed` int(11) NOT NULL DEFAULT '0',
  `retries` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `tbl_ficheros`
--

INSERT INTO `tbl_ficheros` (`id`, `id_aplicacion`, `id_registro`, `id_usuario`, `datetime`, `fichero`, `fichero_file`, `fichero_size`, `fichero_type`, `search`, `indexed`, `retries`) VALUES
(1, 10, 1, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(2, 10, 2, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(3, 10, 3, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(4, 10, 4, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(5, 10, 5, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(6, 10, 6, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(7, 10, 7, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(8, 10, 8, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(9, 10, 9, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0),
(10, 10, 10, 0, '0000-00-00 00:00:00', '', '', 0, '', '', 0, 0);

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tbl_registros_i`
--

CREATE TABLE `tbl_registros_i` (
  `id` int(11) NOT NULL,
  `id_aplicacion` int(11) NOT NULL DEFAULT '0',
  `id_registro` int(11) NOT NULL DEFAULT '0',
  `id_usuario` int(11) NOT NULL DEFAULT '0',
  `datetime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `tbl_registros_i`
--

INSERT INTO `tbl_registros_i` (`id`, `id_aplicacion`, `id_registro`, `id_usuario`, `datetime`) VALUES
(1, 10, 1, 38, '0000-00-00 00:00:00'),
(2, 10, 2, 38, '0000-00-00 00:00:00'),
(3, 10, 3, 38, '0000-00-00 00:00:00'),
(4, 10, 4, 38, '0000-00-00 00:00:00'),
(5, 10, 5, 38, '0000-00-00 00:00:00'),
(6, 10, 6, 38, '0000-00-00 00:00:00'),
(7, 10, 7, 38, '0000-00-00 00:00:00'),
(8, 10, 8, 38, '0000-00-00 00:00:00'),
(9, 10, 9, 38, '0000-00-00 00:00:00'),
(10, 10, 10, 38, '0000-00-00 00:00:00');

-- --------------------------------------------------------

--
-- Estructura de tabla para la tabla `tbl_usuarios`
--

CREATE TABLE `tbl_usuarios` (
  `id` int(11) NOT NULL,
  `id_grupo` int(11) NOT NULL DEFAULT '0',
  `id_aplicacion` int(11) NOT NULL DEFAULT '0',
  `id_registro` int(11) NOT NULL DEFAULT '0',
  `activo` int(11) NOT NULL DEFAULT '0',
  `login` varchar(255) NOT NULL DEFAULT '',
  `password` varchar(255) NOT NULL DEFAULT '',
  `hora_ini` time NOT NULL DEFAULT '00:00:00',
  `hora_fin` time NOT NULL DEFAULT '00:00:00',
  `dias_sem` varchar(255) NOT NULL DEFAULT ''
) ENGINE=MyISAM DEFAULT CHARSET=utf8;

--
-- Volcado de datos para la tabla `tbl_usuarios`
--

INSERT INTO `tbl_usuarios` (`id`, `id_grupo`, `id_aplicacion`, `id_registro`, `activo`, `login`, `password`, `hora_ini`, `hora_fin`, `dias_sem`) VALUES
(38, 0, 31, 1, 0, 'sanz', '', '00:00:00', '00:00:00', '');

--
-- Índices para tablas volcadas
--

--
-- Indices de la tabla `tbl_clientes`
--
ALTER TABLE `tbl_clientes`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_campanya` (`id_campanya`),
  ADD KEY `id_pais` (`id_pais`),
  ADD KEY `id_provincia` (`id_provincia`),
  ADD KEY `id_poblacion` (`id_poblacion`),
  ADD KEY `id_codpostal` (`id_codpostal`);

--
-- Indices de la tabla `tbl_empleados`
--
ALTER TABLE `tbl_empleados`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_pais` (`id_pais`),
  ADD KEY `id_provincia` (`id_provincia`),
  ADD KEY `id_poblacion` (`id_poblacion`),
  ADD KEY `id_codpostal` (`id_codpostal`);

--
-- Indices de la tabla `tbl_ficheros`
--
ALTER TABLE `tbl_ficheros`
  ADD PRIMARY KEY (`id`),
  ADD KEY `ficheros` (`id_aplicacion`,`id_registro`),
  ADD KEY `ficheros2` (`indexed`,`retries`);

--
-- Indices de la tabla `tbl_registros_i`
--
ALTER TABLE `tbl_registros_i`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_usuario` (`id_usuario`),
  ADD KEY `registros` (`id_aplicacion`,`id_registro`),
  ADD KEY `registros3` (`id_aplicacion`,`id_registro`,`id_usuario`);

--
-- Indices de la tabla `tbl_usuarios`
--
ALTER TABLE `tbl_usuarios`
  ADD PRIMARY KEY (`id`),
  ADD KEY `id_grupo` (`id_grupo`),
  ADD KEY `usuarios` (`id_aplicacion`,`id_registro`);

--
-- AUTO_INCREMENT de las tablas volcadas
--

--
-- AUTO_INCREMENT de la tabla `tbl_clientes`
--
ALTER TABLE `tbl_clientes`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT de la tabla `tbl_empleados`
--
ALTER TABLE `tbl_empleados`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT de la tabla `tbl_ficheros`
--
ALTER TABLE `tbl_ficheros`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT de la tabla `tbl_registros_i`
--
ALTER TABLE `tbl_registros_i`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=11;
--
-- AUTO_INCREMENT de la tabla `tbl_usuarios`
--
ALTER TABLE `tbl_usuarios`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=139;COMMIT;

/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
