-- http://www.phpmyadmin.net
--




--
-- Database: `opmaxdb`
--

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

--
-- Table structure for table `alerts`
--

CREATE TABLE `alerts` (
  `idalert` int(11) NOT NULL,
  `idqcreg_vb` int(11) NOT NULL,
  `description` varchar(150) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `app_permission`
--

CREATE TABLE `app_permission` (
  `idapp_permission` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `app_permission`
--

INSERT INTO `app_permission` (`idapp_permission`, `name`, `description`) VALUES
(1, 'Time Card', NULL),
(2, 'Partial PayRoll', NULL),
(3, 'Full PayRoll', NULL),
(4, 'Report PEO', NULL);

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

--
-- Table structure for table `auth_assignment`
--

CREATE TABLE `auth_assignment` (
  `item_name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `user_id` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `auth_assignment`
--

INSERT INTO `auth_assignment` (`item_name`, `user_id`, `created_at`) VALUES
('AdminAutorizadores', '6', 1519310015),
('AdminCortes', '1', 1506645474),
('AdminCortes', '6', 1519310014),
('AdminDespachadores', '6', 1519310015),
('AdminDevoluciones', '2', 1506645522),
('AdminDevoluciones', '4', 1507076323),
('AdminDevoluciones', '6', 1519310015),
('AdminEntradas', '2', 1506645522),
('AdminEntradas', '6', 1519310014),
('AdminMateriales', '1', 1506645474),
('AdminMateriales', '6', 1519310015),
('AdminProveedores', '1', 1506645475),
('AdminProveedores', '6', 1519310015),
('AdminResponsables', '6', 1519310015),
('AdminSolicitudes', '2', 1506645522),
('AdminSolicitudes', '4', 1507076323),
('AdminSolicitudes', '6', 1519310015),
('AdminStatusdeMateriales', '6', 1519310015),
('AdminStatusdeSolicitudes', '6', 1519310015),
('AdminStock', '1', 1506645473),
('AdminStock', '6', 1519310014),
('AdminTiposdeSolicitudes', '6', 1519310015),
('AdminTiposEntradasDeMateriales', '6', 1519310015),
('AdminUnidades', '6', 1519310015),
('mat-devoluciones/agregarmateriales', '7', 1520944448),
('mat-devoluciones/cargarmateriales', '7', 1519741941),
('mat-devoluciones/create', '7', 1519310813),
('mat-devoluciones/delete', '7', 1519311000),
('mat-devoluciones/eliminardetalle', '7', 1519741888),
('mat-devoluciones/index', '7', 1519310813),
('mat-devoluciones/motorbusqueda', '7', 1519741941),
('mat-devoluciones/obtenerdem', '7', 1519310813),
('mat-devoluciones/pdfreporte', '7', 1519311000),
('mat-devoluciones/update', '7', 1519311000),
('mat-solicitudes/agregarmateriales', '5', 1507643013),
('mat-solicitudes/agregarmateriales', '7', 1509463093),
('mat-solicitudes/agregarmateriales', '8', 1507642566),
('mat-solicitudes/cargarmateriales', '5', 1507643013),
('mat-solicitudes/cargarmateriales', '7', 1509463093),
('mat-solicitudes/cargarmateriales', '8', 1507642507),
('mat-solicitudes/create', '5', 1507643013),
('mat-solicitudes/create', '7', 1509463092),
('mat-solicitudes/create', '8', 1507642310),
('mat-solicitudes/delete', '5', 1507643058),
('mat-solicitudes/delete', '7', 1509463092),
('mat-solicitudes/delete', '8', 1507643079),
('mat-solicitudes/eliminardetalle', '5', 1507643013),
('mat-solicitudes/eliminardetalle', '7', 1509463093),
('mat-solicitudes/eliminardetalle', '8', 1507642783),
('mat-solicitudes/index', '5', 1507643013),
('mat-solicitudes/index', '7', 1509463092),
('mat-solicitudes/index', '8', 1507642286),
('mat-solicitudes/motorbusqueda', '5', 1509463167),
('mat-solicitudes/motorbusqueda', '7', 1509463093),
('mat-solicitudes/obtenerbusqueda', '5', 1509469519),
('mat-solicitudes/obtenerbusqueda', '7', 1509469548),
('mat-solicitudes/obtenerdem', '5', 1507643013),
('mat-solicitudes/obtenerdem', '7', 1509463092),
('mat-solicitudes/obtenerdem', '8', 1507642606),
('mat-solicitudes/pdfreporte', '5', 1509463167),
('mat-solicitudes/pdfreporte', '7', 1509463093),
('mat-solicitudes/pdfreporte', '8', 1507643511),
('mat-solicitudes/pdfsalida', '5', 1509469825),
('mat-solicitudes/pdfsalida', '7', 1509469849),
('mat-solicitudes/reportebusqueda', '5', 1509469519),
('mat-solicitudes/reportebusqueda', '7', 1509469548),
('mat-solicitudes/update', '5', 1507643013),
('mat-solicitudes/update', '7', 1509463092),
('mat-solicitudes/update', '8', 1507642422),
('mat-stock/index', '5', 1507128228),
('mat-stock/index', '7', 1507130037),
('mat-stock/pdf', '5', 1507128228),
('mat-stock/pdf', '7', 1507130037);

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

--
-- Table structure for table `auth_item`
--

CREATE TABLE `auth_item` (
  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `type` int(11) NOT NULL,
  `description` text COLLATE utf8_unicode_ci,
  `rule_name` varchar(64) COLLATE utf8_unicode_ci DEFAULT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `auth_item`
--

INSERT INTO `auth_item` (`name`, `type`, `description`, `rule_name`, `data`, `created_at`, `updated_at`) VALUES
('AdminAutorizadores', 1, 'Rol de Administracion de Autorizadores', NULL, NULL, 1506287352, 1506645820),
('AdminCortes', 1, 'Rol de Administracion de Cortes', NULL, NULL, 1506287352, 1506647490),
('AdminDespachadores', 1, 'Rol de Administracion de Despachadores', NULL, NULL, 1506287352, 1506645997),
('AdminDevoluciones', 1, 'Rol de Administracion de Devoluciones', NULL, NULL, 1506287352, 1509458768),
('AdminEntradas', 1, 'Rol de Administracion de Entradas', NULL, NULL, 1506287352, 1509458419),
('AdminMateriales', 1, 'Rol de Administracion de Materiales', NULL, NULL, 1506287352, 1506647381),
('AdminProveedores', 1, 'Rol de Administracion de Proveedores', NULL, NULL, 1506287352, 1506647585),
('AdminResponsables', 1, 'Rol de Administracion de Responsables', NULL, NULL, 1506287352, 1506645890),
('AdminSolicitudes', 1, 'Rol de Administracion de Solicitudes', NULL, NULL, 1506287352, 1509469798),
('AdminStatusdeMateriales', 1, 'Rol de Admin. Status de Materiales', NULL, NULL, 1506287352, 1506646439),
('AdminStatusdeSolicitudes', 1, 'Rol de Admin. Status de Solicitudes', NULL, NULL, 1506287352, 1506646506),
('AdminStock', 1, 'Rol de Administracion de Stock', NULL, NULL, 1506287352, 1506647617),
('AdminTiposdeSolicitudes', 1, 'Rol de Admin.Tipos de Solicitudes', NULL, NULL, 1506287352, 1506646557),
('AdminTiposEntradasDeMateriales', 1, 'Rol de Admin. Tipos Entradas', NULL, NULL, 1506287352, 1506647060),
('AdminUnidades', 1, 'Rol de Administracion de Unidades', NULL, NULL, 1506287352, 1506646189),
('mat-autorizadores/index', 2, 'Ver Listado de Autorizadores', NULL, NULL, 1468124141, 1506287723),
('mat-autorizadores/update', 2, 'Actualizar Inf. de Autorizadores', NULL, NULL, 1506287204, 1506287731),
('mat-cortes/botonescortes', 2, 'Generacion de Botones de Cortes', NULL, NULL, 1506467846, 1506467846),
('mat-cortes/cortes', 2, 'Ejecutar un Nuevo Corte o Cierre', NULL, NULL, 1468124141, 1506287723),
('mat-cortes/index', 2, 'Ver Listado de Cortes', NULL, NULL, 1468124141, 1506287723),
('mat-cortes/pdfreportes', 2, 'Reporte de Cortes en formato .pdf', NULL, NULL, 1506467846, 1506467846),
('mat-despachadores/create', 2, 'Crear un Despachador', NULL, NULL, 1468123035, 1506287698),
('mat-despachadores/delete', 2, 'Borrar Despachadores', NULL, NULL, 1506287310, 1506287714),
('mat-despachadores/index', 2, 'Ver Listado de Despachadores', NULL, NULL, 1468124141, 1506287723),
('mat-despachadores/update', 2, 'Actualizar Inf. de Despachadores', NULL, NULL, 1506287204, 1506287731),
('mat-devoluciones/agregarmateriales', 2, 'Agregar Materiales a Devoluciones', NULL, NULL, 1468124141, 1506287723),
('mat-devoluciones/cargarmateriales', 2, 'Cargar Materiales a Devoluciones', NULL, NULL, 1506287310, 1506287714),
('mat-devoluciones/create', 2, 'Crear Devoluciones', NULL, NULL, 1468123035, 1506287698),
('mat-devoluciones/delete', 2, 'Borrar Devoluciones', NULL, NULL, 1506287310, 1506287714),
('mat-devoluciones/eliminardetalle', 2, 'Eliminat detalle de Devoluciones', NULL, NULL, 1506467846, 1506467846),
('mat-devoluciones/index', 2, 'Ver Listado de Devoluciones', NULL, NULL, 1468124141, 1506287723),
('mat-devoluciones/insertarstock', 2, 'Cargar Entrada al Stock de Devoluciones', NULL, NULL, 1506287204, 1506287731),
('mat-devoluciones/motorbusqueda', 2, 'mat-devoluciones/motorbusqueda', NULL, NULL, 1509458665, 1509458665),
('mat-devoluciones/obtenerbusqueda', 2, 'mat-devoluciones/obtenerbusqueda', NULL, NULL, 1509458710, 1509458710),
('mat-devoluciones/obtenerdem', 2, 'Obtener Detalles de Devolucion', NULL, NULL, 1506287310, 1506287714),
('mat-devoluciones/pdfreporte', 2, 'Reporte de Devoluciones en formato .pdf', NULL, NULL, 1506467846, 1506467846),
('mat-devoluciones/reportebusqueda', 2, 'mat-devoluciones/reportebusqueda', NULL, NULL, 1509458752, 1509458752),
('mat-devoluciones/update', 2, 'Actualizar Inf. de Devoluciones', NULL, NULL, 1506287204, 1506287731),
('mat-entradasdemateriales/agregarmateriales', 2, 'Agregar Materiales a Entradas', NULL, NULL, 1468124141, 1506649076),
('mat-entradasdemateriales/cargarmateriales', 2, 'Cargar Materiales a Entradas', NULL, NULL, 1506287310, 1506649179),
('mat-entradasdemateriales/create', 2, 'Crear Entradas', NULL, NULL, 1468123035, 1506649193),
('mat-entradasdemateriales/delete', 2, 'Borrar Entradas', NULL, NULL, 1506287310, 1506649209),
('mat-entradasdemateriales/eliminardetalle', 2, 'Eliminat detalle de Entrada', NULL, NULL, 1506467846, 1506649231),
('mat-entradasdemateriales/index', 2, 'Ver Listado de Entradas', NULL, NULL, 1468124141, 1506649118),
('mat-entradasdemateriales/insertarstock', 2, 'Cargar Entrada al Stock de Materiales', NULL, NULL, 1506287204, 1506649247),
('mat-entradasdemateriales/motorbusqueda', 2, 'mat-entradasdemateriales/motorbusqueda', NULL, NULL, 1509457972, 1509457972),
('mat-entradasdemateriales/obtenerbusqueda', 2, 'mat-entradasdemateriales/obtenerbusqueda', NULL, NULL, 1509458361, 1509458361),
('mat-entradasdemateriales/obtenerdem', 2, 'Obtener Detalles de Entradas', NULL, NULL, 1506287352, 1506649262),
('mat-entradasdemateriales/pdfreporte', 2, 'Reporte de Entrada en formato .pdf', NULL, NULL, 1506467846, 1506649276),
('mat-entradasdemateriales/reportebusqueda', 2, 'mat-entradasdemateriales/reportebusqueda', NULL, NULL, 1509458402, 1509458402),
('mat-entradasdemateriales/update', 2, 'Actualizar Inf. de Entradas', NULL, NULL, 1506287204, 1506649290),
('mat-materiales/create', 2, 'Crear Materiales', NULL, NULL, 1468123035, 1506287698),
('mat-materiales/delete', 2, 'Borrar Materiales', NULL, NULL, 1506287310, 1506287714),
('mat-materiales/index', 2, 'Ver Listado de Materiales', NULL, NULL, 1468124141, 1506287723),
('mat-materiales/pdf', 2, 'Reporte de Materiales en formato .pdf', NULL, NULL, 1506467846, 1506467846),
('mat-materiales/update', 2, 'Actualizar Inf. de Materiales', NULL, NULL, 1506287204, 1506287731),
('mat-proveedores/create', 2, 'Crear Proveedor', NULL, NULL, 1468123035, 1506287698),
('mat-proveedores/delete', 2, 'Borrar Proveedores', NULL, NULL, 1506287310, 1506287714),
('mat-proveedores/index', 2, 'Ver Listado de Proveedores', NULL, NULL, 1468124141, 1506287723),
('mat-proveedores/pdf', 2, 'Reporte de Proveedores en formato .pdf', NULL, NULL, 1506467846, 1506467846),
('mat-proveedores/update', 2, 'Actualizar Inf. de Proveedores', NULL, NULL, 1506287204, 1506287731),
('mat-responsables/create', 2, 'Crear un Responsable', NULL, NULL, 1468123035, 1506287698),
('mat-responsables/delete', 2, 'Borrar Responsables', NULL, NULL, 1506287310, 1506287714),
('mat-responsables/index', 2, 'Ver Listado de Responsables', NULL, NULL, 1468124141, 1506287723),
('mat-responsables/update', 2, 'Actualizar Inf. de Responsables', NULL, NULL, 1506287204, 1506287731),
('mat-solicitudes/agregarmateriales', 2, 'Agregar Materiales a Solicitudes', NULL, NULL, 1468124141, 1506287723),
('mat-solicitudes/cargarmateriales', 2, 'Cargar Materiales a Solicitudes', NULL, NULL, 1506287310, 1506287714),
('mat-solicitudes/create', 2, 'Crear Solicitudes', NULL, NULL, 1468123035, 1506287698),
('mat-solicitudes/delete', 2, 'Borrar Solicitudes', NULL, NULL, 1506287310, 1506287714),
('mat-solicitudes/eliminardetalle', 2, 'Eliminat detalle de Solicitudes', NULL, NULL, 1506467846, 1506467846),
('mat-solicitudes/index', 2, 'Ver Listado de Solicitudes', NULL, NULL, 1468124141, 1506287723),
('mat-solicitudes/insertarstock', 2, 'Cargar Entrada al Stock de Solicitudes', NULL, NULL, 1506287204, 1506287731),
('mat-solicitudes/motorbusqueda', 2, 'mat-solicitudes/motorbusqueda', NULL, NULL, 1509458454, 1509458454),
('mat-solicitudes/obtenerbusqueda', 2, 'mat-solicitudes/obtenerbusqueda', NULL, NULL, 1509458531, 1509458531),
('mat-solicitudes/obtenerdem', 2, 'Obtener Detalles de Solicitudes', NULL, NULL, 1468123035, 1506287698),
('mat-solicitudes/pdfreporte', 2, 'Reporte de Solicitudes en formato .pdf', NULL, NULL, 1506467846, 1506467846),
('mat-solicitudes/pdfsalida', 2, 'mat-solicitudes/pdfsalida', NULL, NULL, 1509469771, 1509469771),
('mat-solicitudes/reportebusqueda', 2, 'mat-solicitudes/reportebusqueda', NULL, NULL, 1509458582, 1509458582),
('mat-solicitudes/update', 2, 'Actualizar Inf. de Solicitudes', NULL, NULL, 1506287204, 1506287731),
('mat-statusdesolicitudes/create', 2, 'Crear un Status de Solicitudes', NULL, NULL, 1468123035, 1506287698),
('mat-statusdesolicitudes/delete', 2, 'Borrar Status de Solicitudes', NULL, NULL, 1506287310, 1506287714),
('mat-statusdesolicitudes/index', 2, 'Ver Listado de Status de Solicitudes', NULL, NULL, 1468124141, 1506287723),
('mat-statusdesolicitudes/update', 2, 'Actualizar Inf. Status de Solicitudes', NULL, NULL, 1506287204, 1506287731),
('mat-statusmateriales/create', 2, 'Crear un Status de Materiales', NULL, NULL, 1468123035, 1506287698),
('mat-statusmateriales/delete', 2, 'Borrar Status de Materiales', NULL, NULL, 1506287310, 1506287714),
('mat-statusmateriales/index', 2, 'Ver Listado de Status de Materiales', NULL, NULL, 1468124141, 1506287723),
('mat-statusmateriales/update', 2, 'Actualizar Inf. de Status de Materiales', NULL, NULL, 1506287204, 1506287731),
('mat-stock/index', 2, 'Ver Listado de Stock', NULL, NULL, 1468124141, 1506287723),
('mat-stock/pdf', 2, 'Reporte de Stock en formato .pdf', NULL, NULL, 1506467846, 1506467846),
('mat-tiposdesolicitudes/create', 2, 'Crear un Tipos de Solicitudes', NULL, NULL, 1468123035, 1506287698),
('mat-tiposdesolicitudes/delete', 2, 'Borrar Tipos de Solicitudes', NULL, NULL, 1506287310, 1506287714),
('mat-tiposdesolicitudes/index', 2, 'Ver Listado de Tipos de Solicitudes', NULL, NULL, 1468124141, 1506287723),
('mat-tiposdesolicitudes/update', 2, 'Actualizar Inf. de Tipos de Solicitudes', NULL, NULL, 1506287204, 1506287731),
('mat-tiposentradasdemateriales/create', 2, 'Crear un Tipos Entradas', NULL, NULL, 1468123035, 1506287698),
('mat-tiposentradasdemateriales/delete', 2, 'Borrar Tipos Entradas', NULL, NULL, 1506287310, 1506287714),
('mat-tiposentradasdemateriales/index', 2, 'Ver Listado de Tipos Entradas', NULL, NULL, 1468124141, 1506287723),
('mat-tiposentradasdemateriales/update', 2, 'Actualizar Inf. de Tipos Entradas', NULL, NULL, 1506287204, 1506287731),
('mat-unidades/create', 2, 'Crear un Unidad', NULL, NULL, 1468123035, 1506287698),
('mat-unidades/delete', 2, 'Borrar Unidades', NULL, NULL, 1506287310, 1506287714),
('mat-unidades/index', 2, 'Ver Listado de Unidades', NULL, NULL, 1468124141, 1506287723),
('mat-unidades/update', 2, 'Actualizar Inf. de Unidades', NULL, NULL, 1506287204, 1506287731);

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

--
-- Table structure for table `auth_item_child`
--

CREATE TABLE `auth_item_child` (
  `parent` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `child` varchar(64) COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `auth_item_child`
--

INSERT INTO `auth_item_child` (`parent`, `child`) VALUES
('AdminAutorizadores', 'mat-autorizadores/index'),
('AdminAutorizadores', 'mat-autorizadores/update'),
('AdminCortes', 'mat-cortes/botonescortes'),
('AdminCortes', 'mat-cortes/cortes'),
('AdminCortes', 'mat-cortes/index'),
('AdminCortes', 'mat-cortes/pdfreportes'),
('AdminDespachadores', 'mat-despachadores/create'),
('AdminDespachadores', 'mat-despachadores/delete'),
('AdminDespachadores', 'mat-despachadores/index'),
('AdminDespachadores', 'mat-despachadores/update'),
('AdminDevoluciones', 'mat-devoluciones/agregarmateriales'),
('AdminDevoluciones', 'mat-devoluciones/cargarmateriales'),
('AdminDevoluciones', 'mat-devoluciones/create'),
('AdminDevoluciones', 'mat-devoluciones/delete'),
('AdminDevoluciones', 'mat-devoluciones/eliminardetalle'),
('AdminDevoluciones', 'mat-devoluciones/index'),
('AdminDevoluciones', 'mat-devoluciones/insertarstock'),
('AdminDevoluciones', 'mat-devoluciones/motorbusqueda'),
('AdminDevoluciones', 'mat-devoluciones/obtenerbusqueda'),
('AdminDevoluciones', 'mat-devoluciones/obtenerdem'),
('AdminDevoluciones', 'mat-devoluciones/pdfreporte'),
('AdminDevoluciones', 'mat-devoluciones/reportebusqueda'),
('AdminDevoluciones', 'mat-devoluciones/update'),
('AdminEntradas', 'mat-entradasdemateriales/agregarmateriales'),
('AdminEntradas', 'mat-entradasdemateriales/cargarmateriales'),
('AdminEntradas', 'mat-entradasdemateriales/create'),
('AdminEntradas', 'mat-entradasdemateriales/delete'),
('AdminEntradas', 'mat-entradasdemateriales/eliminardetalle'),
('AdminEntradas', 'mat-entradasdemateriales/index'),
('AdminEntradas', 'mat-entradasdemateriales/insertarstock'),
('AdminEntradas', 'mat-entradasdemateriales/motorbusqueda'),
('AdminEntradas', 'mat-entradasdemateriales/obtenerbusqueda'),
('AdminEntradas', 'mat-entradasdemateriales/obtenerdem'),
('AdminEntradas', 'mat-entradasdemateriales/pdfreporte'),
('AdminEntradas', 'mat-entradasdemateriales/reportebusqueda'),
('AdminEntradas', 'mat-entradasdemateriales/update'),
('AdminMateriales', 'mat-materiales/create'),
('AdminMateriales', 'mat-materiales/delete'),
('AdminMateriales', 'mat-materiales/index'),
('AdminMateriales', 'mat-materiales/pdf'),
('AdminMateriales', 'mat-materiales/update'),
('AdminProveedores', 'mat-proveedores/create'),
('AdminProveedores', 'mat-proveedores/delete'),
('AdminProveedores', 'mat-proveedores/index'),
('AdminProveedores', 'mat-proveedores/pdf'),
('AdminProveedores', 'mat-proveedores/update'),
('AdminResponsables', 'mat-responsables/create'),
('AdminResponsables', 'mat-responsables/delete'),
('AdminResponsables', 'mat-responsables/index'),
('AdminResponsables', 'mat-responsables/update'),
('AdminSolicitudes', 'mat-solicitudes/agregarmateriales'),
('AdminSolicitudes', 'mat-solicitudes/cargarmateriales'),
('AdminSolicitudes', 'mat-solicitudes/create'),
('AdminSolicitudes', 'mat-solicitudes/delete'),
('AdminSolicitudes', 'mat-solicitudes/eliminardetalle'),
('AdminSolicitudes', 'mat-solicitudes/index'),
('AdminSolicitudes', 'mat-solicitudes/insertarstock'),
('AdminSolicitudes', 'mat-solicitudes/motorbusqueda'),
('AdminSolicitudes', 'mat-solicitudes/obtenerbusqueda'),
('AdminSolicitudes', 'mat-solicitudes/obtenerdem'),
('AdminSolicitudes', 'mat-solicitudes/pdfreporte'),
('AdminSolicitudes', 'mat-solicitudes/pdfsalida'),
('AdminSolicitudes', 'mat-solicitudes/reportebusqueda'),
('AdminSolicitudes', 'mat-solicitudes/update'),
('AdminStatusdeMateriales', 'mat-statusmateriales/create'),
('AdminStatusdeMateriales', 'mat-statusmateriales/delete'),
('AdminStatusdeMateriales', 'mat-statusmateriales/index'),
('AdminStatusdeMateriales', 'mat-statusmateriales/update'),
('AdminStatusdeSolicitudes', 'mat-statusdesolicitudes/create'),
('AdminStatusdeSolicitudes', 'mat-statusdesolicitudes/delete'),
('AdminStatusdeSolicitudes', 'mat-statusdesolicitudes/index'),
('AdminStatusdeSolicitudes', 'mat-statusdesolicitudes/update'),
('AdminStock', 'mat-stock/index'),
('AdminStock', 'mat-stock/pdf'),
('AdminTiposdeSolicitudes', 'mat-tiposdesolicitudes/create'),
('AdminTiposdeSolicitudes', 'mat-tiposdesolicitudes/delete'),
('AdminTiposdeSolicitudes', 'mat-tiposdesolicitudes/index'),
('AdminTiposdeSolicitudes', 'mat-tiposdesolicitudes/update'),
('AdminTiposEntradasDeMateriales', 'mat-tiposentradasdemateriales/create'),
('AdminTiposEntradasDeMateriales', 'mat-tiposentradasdemateriales/delete'),
('AdminTiposEntradasDeMateriales', 'mat-tiposentradasdemateriales/index'),
('AdminTiposEntradasDeMateriales', 'mat-tiposentradasdemateriales/update'),
('AdminUnidades', 'mat-unidades/create'),
('AdminUnidades', 'mat-unidades/delete'),
('AdminUnidades', 'mat-unidades/index'),
('AdminUnidades', 'mat-unidades/update');

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

--
-- Table structure for table `auth_rule`
--

CREATE TABLE `auth_rule` (
  `name` varchar(64) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `created_at` int(11) DEFAULT NULL,
  `updated_at` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `bomb`
--

CREATE TABLE `bomb` (
  `idbomb` int(11) NOT NULL,
  `name` varchar(45) NOT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `company`
--

CREATE TABLE `company` (
  `idcompany` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `company`
--

INSERT INTO `company` (`idcompany`, `name`, `description`) VALUES
(1, 'OpMax', 'OpMax Mantenimiento de vehiculos de alquiler.'),
(2, 'PaintPower', 'Pintura y REmodelacion de Interiord');

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

--
-- Table structure for table `departament`
--

CREATE TABLE `departament` (
  `iddepartament` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL,
  `idlocation` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `departament`
--

INSERT INTO `departament` (`iddepartament`, `name`, `description`, `idlocation`) VALUES
(1, 'VSA', NULL, 1),
(2, 'Carwash', NULL, 1),
(3, 'Production', NULL, 1),
(4, 'Hangar', NULL, 1),
(5, 'Shop', NULL, 1),
(6, 'W1', NULL, 1),
(7, 'VSA', NULL, 2),
(8, 'Carwash', NULL, 2),
(9, 'Production', NULL, 2),
(10, 'Hangar', NULL, 2),
(11, 'Shop', NULL, 2),
(12, 'W1', NULL, 2),
(13, 'VSA', NULL, 3),
(14, 'Carwash', NULL, 3),
(15, 'Production', NULL, 3),
(16, 'Hangar', NULL, 3),
(17, 'Shop', NULL, 3),
(18, 'W1', NULL, 3),
(19, 'VSA', NULL, 4),
(20, 'Carwash', NULL, 4),
(21, 'Production', NULL, 4),
(22, 'Hangar', NULL, 4),
(23, 'Shop', NULL, 4),
(24, 'W1', NULL, 4);

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

--
-- Table structure for table `employee`
--

CREATE TABLE `employee` (
  `idemployee` int(11) NOT NULL,
  `name` varchar(80) DEFAULT NULL,
  `photo` varchar(50) DEFAULT NULL,
  `nickname` varchar(50) DEFAULT NULL,
  `datebirth` varchar(10) DEFAULT NULL,
  `socialsecurity` varchar(40) DEFAULT NULL,
  `address` varchar(80) DEFAULT NULL,
  `city` varchar(45) DEFAULT NULL,
  `zipcode` varchar(5) DEFAULT NULL,
  `phone` varchar(10) DEFAULT NULL,
  `email` varchar(40) DEFAULT NULL,
  `drivelicense` varchar(40) DEFAULT NULL,
  `datedrivelicense` varchar(10) DEFAULT NULL,
  `dateapplication` varchar(10) DEFAULT NULL,
  `observation` varchar(100) DEFAULT NULL,
  `idstate` int(11) NOT NULL,
  `idcompany` int(11) NOT NULL,
  `idstatus_employee` int(11) NOT NULL,
  `idlocation` int(11) NOT NULL,
  `idsublocation` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `employee`
--

INSERT INTO `employee` (`idemployee`, `name`, `photo`, `nickname`, `datebirth`, `socialsecurity`, `address`, `city`, `zipcode`, `phone`, `email`, `drivelicense`, `datedrivelicense`, `dateapplication`, `observation`, `idstate`, `idcompany`, `idstatus_employee`, `idlocation`, `idsublocation`) VALUES
(1, 'Andres Gutierrez', 'sinfoto.png', 'gutierrezagv', '03-06-1969', '10207597', 'Pta. de Piedras', 'Orlando', '10001', '969 3535', 'gutierrezagv@gmail.com', '10207-236', '06-06-2010', '06-08-2010', NULL, 1, 2, 1, 1, 2);

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

--
-- Table structure for table `employee_code`
--

CREATE TABLE `employee_code` (
  `idemployee_code` int(11) NOT NULL,
  `idtype_code` int(11) NOT NULL,
  `idemployee` int(11) NOT NULL,
  `code` varchar(6) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `functions`
--

CREATE TABLE `functions` (
  `idfunction` int(11) NOT NULL,
  `iddepartament` int(11) NOT NULL,
  `name` varchar(50) NOT NULL,
  `description` varchar(80) NOT NULL,
  `salary` decimal(10,2) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `groups`
--

CREATE TABLE `groups` (
  `idgroup` int(11) NOT NULL,
  `name` varchar(10) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `location`
--

CREATE TABLE `location` (
  `idlocation` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `location`
--

INSERT INTO `location` (`idlocation`, `name`, `description`) VALUES
(1, 'Samford', 'Sucursal no. 2 en Orlando de OpMax'),
(2, 'MCO', 'Sucursal Pcpal. en Orlando de OpMax'),
(3, 'PPNY', 'Sucursal no. 3 en Orlando de OpMax'),
(4, 'PPVZ', 'Sucursal no. 4 en Orlando de OpMax');

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

--
-- Table structure for table `login_bomb`
--

CREATE TABLE `login_bomb` (
  `idlogin_bomb` int(11) NOT NULL,
  `idemployee` int(11) NOT NULL,
  `idbomb` int(11) NOT NULL,
  `startdate` varchar(10) DEFAULT NULL,
  `startime` varchar(8) DEFAULT NULL,
  `enddate` varchar(10) DEFAULT NULL,
  `endtime` varchar(8) DEFAULT NULL,
  `status` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `logs`
--

CREATE TABLE `logs` (
  `idlog` int(11) NOT NULL,
  `iduser` int(11) NOT NULL,
  `user` varchar(30) DEFAULT NULL,
  `module` varchar(45) DEFAULT NULL,
  `operation` varchar(45) DEFAULT NULL,
  `datein` varchar(10) DEFAULT NULL,
  `timein` varchar(8) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `migration`
--

CREATE TABLE `migration` (
  `version` varchar(180) NOT NULL,
  `apply_time` int(11) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=latin1;

--
-- Dumping data for table `migration`
--

INSERT INTO `migration` (`version`, `apply_time`) VALUES
('m000000_000000_base', 1468110104),
('m140209_132017_init', 1468110110),
('m140403_174025_create_account_table', 1468110112),
('m140504_113157_update_tables', 1468110117),
('m140504_130429_create_token_table', 1468110119),
('m140506_102106_rbac_init', 1468113665),
('m140830_171933_fix_ip_field', 1468110121),
('m140830_172703_change_account_table_name', 1468110122),
('m141222_110026_update_ip_field', 1468110123),
('m141222_135246_alter_username_length', 1468110124),
('m150614_103145_update_social_account_table', 1468110127),
('m150623_212711_fix_username_notnull', 1468110128);

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

--
-- Table structure for table `pcregister`
--

CREATE TABLE `pcregister` (
  `idpcregister` int(11) NOT NULL,
  `idlogin_bomb` int(11) NOT NULL,
  `startdate` varchar(10) DEFAULT NULL,
  `starttime` varchar(8) DEFAULT NULL,
  `enddate` varchar(10) DEFAULT NULL,
  `endtime` varchar(8) DEFAULT NULL,
  `vin` varchar(16) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `pcreg_vb`
--

CREATE TABLE `pcreg_vb` (
  `idpcreg_vb` int(11) NOT NULL,
  `idpcregister` int(11) NOT NULL,
  `idvalues_bomb` int(11) NOT NULL,
  `value` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `permission`
--

CREATE TABLE `permission` (
  `idpermission` int(11) NOT NULL,
  `iduser` int(11) NOT NULL,
  `idtable` int(11) NOT NULL,
  `idtype_permission` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `permission`
--

INSERT INTO `permission` (`idpermission`, `iduser`, `idtable`, `idtype_permission`) VALUES
(89, 10, 1, 1),
(90, 10, 6, 1),
(107, 21, 1, 1),
(108, 21, 2, 1),
(109, 21, 3, 1),
(110, 21, 1, 2),
(111, 21, 2, 2),
(112, 21, 3, 2),
(116, 21, 1, 3),
(117, 21, 2, 3),
(118, 10, 1, 2),
(119, 10, 4, 2),
(120, 10, 1, 3),
(121, 10, 2, 3);

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

--
-- Table structure for table `profile`
--

CREATE TABLE `profile` (
  `user_id` int(11) NOT NULL,
  `name` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `public_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gravatar_email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `gravatar_id` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `location` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `website` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `bio` text COLLATE utf8_unicode_ci
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

--
-- Dumping data for table `profile`
--

INSERT INTO `profile` (`user_id`, `name`, `public_email`, `gravatar_email`, `gravatar_id`, `location`, `website`, `bio`) VALUES
(3, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(5, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(6, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(7, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(9, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(10, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(18, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(19, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(20, NULL, NULL, NULL, NULL, NULL, NULL, NULL),
(21, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

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

--
-- Table structure for table `qcreg_vb`
--

CREATE TABLE `qcreg_vb` (
  `idqcreg_vb` int(11) NOT NULL,
  `idqc_register` int(11) NOT NULL,
  `idvalues_bomb` int(11) NOT NULL,
  `value` tinyint(1) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `qc_register`
--

CREATE TABLE `qc_register` (
  `idqc_register` int(11) NOT NULL,
  `idpcregister` int(11) NOT NULL,
  `idemployee` int(11) NOT NULL,
  `stardate` varchar(10) DEFAULT NULL,
  `startime` varchar(8) DEFAULT NULL,
  `enddate` varchar(10) DEFAULT NULL,
  `endtime` varchar(8) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `social_account`
--

CREATE TABLE `social_account` (
  `id` int(11) NOT NULL,
  `user_id` int(11) DEFAULT NULL,
  `provider` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `client_id` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
  `data` text COLLATE utf8_unicode_ci,
  `code` varchar(32) COLLATE utf8_unicode_ci DEFAULT NULL,
  `created_at` int(11) DEFAULT NULL,
  `email` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
  `username` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `state`
--

CREATE TABLE `state` (
  `idstate` int(11) NOT NULL,
  `cod` varchar(45) DEFAULT NULL,
  `name` varchar(50) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `state`
--

INSERT INTO `state` (`idstate`, `cod`, `name`) VALUES
(1, 'OR', 'Orlando'),
(2, 'NY', 'New York');

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

--
-- Table structure for table `status_employee`
--

CREATE TABLE `status_employee` (
  `idstatus_employee` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `status_employee`
--

INSERT INTO `status_employee` (`idstatus_employee`, `name`, `description`) VALUES
(1, 'Activo', 'Activo'),
(2, 'Inactivo', 'Inactivo');

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

--
-- Table structure for table `sublocation`
--

CREATE TABLE `sublocation` (
  `idsublocation` int(11) NOT NULL,
  `idlocation` int(11) NOT NULL,
  `name` varchar(50) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `sublocation`
--

INSERT INTO `sublocation` (`idsublocation`, `idlocation`, `name`, `description`) VALUES
(1, 1, 'Garage', NULL),
(2, 1, 'Production', NULL),
(3, 1, 'Ready Line', NULL),
(4, 1, 'Station Bomb', NULL),
(5, 2, 'Garage', NULL),
(6, 2, 'Production', NULL),
(7, 2, 'Ready Line', NULL),
(8, 2, 'Station Bomb', NULL),
(9, 3, 'Garage', NULL),
(10, 3, 'Production', NULL),
(11, 3, 'Ready Line', NULL),
(12, 3, 'Station Bomb', NULL),
(13, 4, 'Garage', NULL),
(14, 4, 'Production', NULL),
(15, 4, 'Ready Line', NULL),
(16, 4, 'Station Bomb', NULL);

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

--
-- Table structure for table `timecard`
--

CREATE TABLE `timecard` (
  `idtimecard` int(11) NOT NULL,
  `clockin_date` varchar(10) DEFAULT NULL,
  `clockin_time` varchar(8) DEFAULT NULL,
  `alt_clockin` int(11) DEFAULT NULL,
  `breakin_date` varchar(10) DEFAULT NULL,
  `breakin_time` varchar(8) DEFAULT NULL,
  `alt_breakin` int(11) DEFAULT NULL,
  `breakout_date` varchar(10) DEFAULT NULL,
  `breakout_time` varchar(8) DEFAULT NULL,
  `alt_breakout` int(11) DEFAULT NULL,
  `clockout_date` varchar(10) DEFAULT NULL,
  `clockout_time` varchar(8) DEFAULT NULL,
  `alt_clockout` int(11) DEFAULT NULL,
  `wh_normal` decimal(5,2) DEFAULT NULL,
  `cost_whnormal` decimal(10,2) DEFAULT NULL,
  `wh_overtime` decimal(5,2) DEFAULT NULL,
  `cost_overtime` decimal(10,2) DEFAULT NULL,
  `wh_total` decimal(5,2) DEFAULT NULL,
  `cost_total` decimal(10,2) DEFAULT NULL,
  `idemployee` int(11) NOT NULL,
  `idlocation` int(11) NOT NULL,
  `idsublocation` int(11) NOT NULL,
  `iddepartament` int(11) NOT NULL,
  `idfunction` int(11) NOT NULL,
  `idcompany` int(11) NOT NULL,
  `idgroup` int(11) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `timecard_permission`
--

CREATE TABLE `timecard_permission` (
  `idtimecard_permission` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `timecard_permission`
--

INSERT INTO `timecard_permission` (`idtimecard_permission`, `name`, `description`) VALUES
(1, 'Create TC', NULL),
(2, 'Update TC', NULL),
(3, 'Partial View', NULL),
(4, 'Full View', NULL);

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

--
-- Table structure for table `token`
--

CREATE TABLE `token` (
  `user_id` int(11) NOT NULL,
  `code` varchar(32) COLLATE utf8_unicode_ci NOT NULL,
  `created_at` int(11) NOT NULL,
  `type` smallint(6) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

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

--
-- Table structure for table `type_code`
--

CREATE TABLE `type_code` (
  `idtype_code` int(11) NOT NULL,
  `tipo` varchar(45) NOT NULL,
  `description` varchar(80) NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

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

--
-- Table structure for table `type_permission`
--

CREATE TABLE `type_permission` (
  `idtype_permission` int(11) NOT NULL,
  `name` varchar(45) DEFAULT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `type_permission`
--

INSERT INTO `type_permission` (`idtype_permission`, `name`, `description`) VALUES
(1, 'App Permissions', NULL),
(2, 'Timecard Permisions', NULL),
(3, 'Department ', NULL);

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

--
-- Table structure for table `values_bomb`
--

CREATE TABLE `values_bomb` (
  `idvalues_bomb` int(11) NOT NULL,
  `name` varchar(45) NOT NULL,
  `description` varchar(80) DEFAULT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Indexes for dumped tables
--

--
-- Indexes for table `alerts`
--
ALTER TABLE `alerts`
  ADD PRIMARY KEY (`idalert`),
  ADD KEY `fk_alerts_qcreg_vb1_idx` (`idqcreg_vb`);

--
-- Indexes for table `app_permission`
--
ALTER TABLE `app_permission`
  ADD PRIMARY KEY (`idapp_permission`);

--
-- Indexes for table `auth_assignment`
--
ALTER TABLE `auth_assignment`
  ADD PRIMARY KEY (`item_name`,`user_id`);

--
-- Indexes for table `auth_item`
--
ALTER TABLE `auth_item`
  ADD PRIMARY KEY (`name`),
  ADD KEY `rule_name` (`rule_name`),
  ADD KEY `idx-auth_item-type` (`type`);

--
-- Indexes for table `auth_item_child`
--
ALTER TABLE `auth_item_child`
  ADD PRIMARY KEY (`parent`,`child`),
  ADD KEY `child` (`child`);

--
-- Indexes for table `auth_rule`
--
ALTER TABLE `auth_rule`
  ADD PRIMARY KEY (`name`);

--
-- Indexes for table `bomb`
--
ALTER TABLE `bomb`
  ADD PRIMARY KEY (`idbomb`);

--
-- Indexes for table `company`
--
ALTER TABLE `company`
  ADD PRIMARY KEY (`idcompany`);

--
-- Indexes for table `departament`
--
ALTER TABLE `departament`
  ADD PRIMARY KEY (`iddepartament`),
  ADD KEY `fk_departament_location1_idx` (`idlocation`);

--
-- Indexes for table `employee`
--
ALTER TABLE `employee`
  ADD PRIMARY KEY (`idemployee`),
  ADD KEY `fk_employee_state1_idx` (`idstate`),
  ADD KEY `fk_employee_company1_idx` (`idcompany`),
  ADD KEY `fk_employee_status_employee1_idx` (`idstatus_employee`),
  ADD KEY `fk_employee_location1_idx` (`idlocation`),
  ADD KEY `fk_employee_sublocation1_idx` (`idsublocation`);

--
-- Indexes for table `employee_code`
--
ALTER TABLE `employee_code`
  ADD PRIMARY KEY (`idemployee_code`),
  ADD KEY `fk_employee_code_type_code1_idx` (`idtype_code`),
  ADD KEY `fk_employee_code_employee1_idx` (`idemployee`);

--
-- Indexes for table `functions`
--
ALTER TABLE `functions`
  ADD PRIMARY KEY (`idfunction`),
  ADD KEY `fk_functions_departament1_idx` (`iddepartament`);

--
-- Indexes for table `groups`
--
ALTER TABLE `groups`
  ADD PRIMARY KEY (`idgroup`);

--
-- Indexes for table `location`
--
ALTER TABLE `location`
  ADD PRIMARY KEY (`idlocation`);

--
-- Indexes for table `login_bomb`
--
ALTER TABLE `login_bomb`
  ADD PRIMARY KEY (`idlogin_bomb`),
  ADD KEY `fk_login_bomb_employee1_idx` (`idemployee`),
  ADD KEY `fk_login_bomb_bomb1_idx` (`idbomb`);

--
-- Indexes for table `logs`
--
ALTER TABLE `logs`
  ADD PRIMARY KEY (`idlog`);

--
-- Indexes for table `migration`
--
ALTER TABLE `migration`
  ADD PRIMARY KEY (`version`);

--
-- Indexes for table `pcregister`
--
ALTER TABLE `pcregister`
  ADD PRIMARY KEY (`idpcregister`),
  ADD KEY `fk_pcregister_login_bomb1_idx` (`idlogin_bomb`);

--
-- Indexes for table `pcreg_vb`
--
ALTER TABLE `pcreg_vb`
  ADD PRIMARY KEY (`idpcreg_vb`),
  ADD KEY `fk_pcreg_vb_pcregister1_idx` (`idpcregister`),
  ADD KEY `fk_pcreg_vb_values_bomb1_idx` (`idvalues_bomb`);

--
-- Indexes for table `permission`
--
ALTER TABLE `permission`
  ADD PRIMARY KEY (`idpermission`);

--
-- Indexes for table `profile`
--
ALTER TABLE `profile`
  ADD PRIMARY KEY (`user_id`);

--
-- Indexes for table `qcreg_vb`
--
ALTER TABLE `qcreg_vb`
  ADD PRIMARY KEY (`idqcreg_vb`),
  ADD KEY `fk_qcreg_vb_qc_register1_idx` (`idqc_register`),
  ADD KEY `fk_qcreg_vb_values_bomb1_idx` (`idvalues_bomb`);

--
-- Indexes for table `qc_register`
--
ALTER TABLE `qc_register`
  ADD PRIMARY KEY (`idqc_register`),
  ADD KEY `fk_qc_register_pcregister1_idx` (`idpcregister`),
  ADD KEY `fk_qc_register_employee1_idx` (`idemployee`);

--
-- Indexes for table `social_account`
--
ALTER TABLE `social_account`
  ADD PRIMARY KEY (`id`),
  ADD UNIQUE KEY `account_unique` (`provider`,`client_id`),
  ADD UNIQUE KEY `account_unique_code` (`code`),
  ADD KEY `fk_user_account` (`user_id`);

--
-- Indexes for table `state`
--
ALTER TABLE `state`
  ADD PRIMARY KEY (`idstate`);

--
-- Indexes for table `status_employee`
--
ALTER TABLE `status_employee`
  ADD PRIMARY KEY (`idstatus_employee`);

--
-- Indexes for table `sublocation`
--
ALTER TABLE `sublocation`
  ADD PRIMARY KEY (`idsublocation`),
  ADD KEY `fk_sublocation_location1_idx` (`idlocation`);

--
-- Indexes for table `timecard`
--
ALTER TABLE `timecard`
  ADD PRIMARY KEY (`idtimecard`),
  ADD KEY `fk_timecard_employee1_idx` (`idemployee`),
  ADD KEY `fk_timecard_location1_idx` (`idlocation`),
  ADD KEY `fk_timecard_sublocation1_idx` (`idsublocation`),
  ADD KEY `fk_timecard_departament1_idx` (`iddepartament`),
  ADD KEY `fk_timecard_functions1_idx` (`idfunction`),
  ADD KEY `fk_timecard_company1_idx` (`idcompany`),
  ADD KEY `fk_timecard_groups1_idx` (`idgroup`);

--
-- Indexes for table `timecard_permission`
--
ALTER TABLE `timecard_permission`
  ADD PRIMARY KEY (`idtimecard_permission`);

--
-- Indexes for table `token`
--
ALTER TABLE `token`
  ADD UNIQUE KEY `token_unique` (`user_id`,`code`,`type`);

--
-- Indexes for table `type_code`
--
ALTER TABLE `type_code`
  ADD PRIMARY KEY (`idtype_code`);

--
-- Indexes for table `type_permission`
--
ALTER TABLE `type_permission`
  ADD PRIMARY KEY (`idtype_permission`);

--
-- Indexes for table `values_bomb`
--
ALTER TABLE `values_bomb`
  ADD PRIMARY KEY (`idvalues_bomb`);

--
-- AUTO_INCREMENT for dumped tables
--

--
-- AUTO_INCREMENT for table `app_permission`
--
ALTER TABLE `app_permission`
  MODIFY `idapp_permission` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `bomb`
--
ALTER TABLE `bomb`
  MODIFY `idbomb` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `company`
--
ALTER TABLE `company`
  MODIFY `idcompany` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `departament`
--
ALTER TABLE `departament`
  MODIFY `iddepartament` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=25;
--
-- AUTO_INCREMENT for table `employee`
--
ALTER TABLE `employee`
  MODIFY `idemployee` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
--
-- AUTO_INCREMENT for table `employee_code`
--
ALTER TABLE `employee_code`
  MODIFY `idemployee_code` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `functions`
--
ALTER TABLE `functions`
  MODIFY `idfunction` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `groups`
--
ALTER TABLE `groups`
  MODIFY `idgroup` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `location`
--
ALTER TABLE `location`
  MODIFY `idlocation` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `login_bomb`
--
ALTER TABLE `login_bomb`
  MODIFY `idlogin_bomb` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `logs`
--
ALTER TABLE `logs`
  MODIFY `idlog` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `pcregister`
--
ALTER TABLE `pcregister`
  MODIFY `idpcregister` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `pcreg_vb`
--
ALTER TABLE `pcreg_vb`
  MODIFY `idpcreg_vb` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `permission`
--
ALTER TABLE `permission`
  MODIFY `idpermission` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=122;
--
-- AUTO_INCREMENT for table `qcreg_vb`
--
ALTER TABLE `qcreg_vb`
  MODIFY `idqcreg_vb` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `qc_register`
--
ALTER TABLE `qc_register`
  MODIFY `idqc_register` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `social_account`
--
ALTER TABLE `social_account`
  MODIFY `id` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `state`
--
ALTER TABLE `state`
  MODIFY `idstate` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `status_employee`
--
ALTER TABLE `status_employee`
  MODIFY `idstatus_employee` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
--
-- AUTO_INCREMENT for table `sublocation`
--
ALTER TABLE `sublocation`
  MODIFY `idsublocation` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=17;
--
-- AUTO_INCREMENT for table `timecard`
--
ALTER TABLE `timecard`
  MODIFY `idtimecard` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `timecard_permission`
--
ALTER TABLE `timecard_permission`
  MODIFY `idtimecard_permission` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=5;
--
-- AUTO_INCREMENT for table `type_code`
--
ALTER TABLE `type_code`
  MODIFY `idtype_code` int(11) NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `type_permission`
--
ALTER TABLE `type_permission`
  MODIFY `idtype_permission` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- Constraints for dumped tables
--

--
-- Constraints for table `alerts`
--
ALTER TABLE `alerts`
  ADD CONSTRAINT `fk_alerts_qcreg_vb1` FOREIGN KEY (`idqcreg_vb`) REFERENCES `qcreg_vb` (`idqcreg_vb`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `auth_assignment`
--
ALTER TABLE `auth_assignment`
  ADD CONSTRAINT `auth_assignment_ibfk_1` FOREIGN KEY (`item_name`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `auth_item`
--
ALTER TABLE `auth_item`
  ADD CONSTRAINT `auth_item_ibfk_1` FOREIGN KEY (`rule_name`) REFERENCES `auth_rule` (`name`) ON DELETE SET NULL ON UPDATE CASCADE;

--
-- Constraints for table `auth_item_child`
--
ALTER TABLE `auth_item_child`
  ADD CONSTRAINT `auth_item_child_ibfk_1` FOREIGN KEY (`parent`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
  ADD CONSTRAINT `auth_item_child_ibfk_2` FOREIGN KEY (`child`) REFERENCES `auth_item` (`name`) ON DELETE CASCADE ON UPDATE CASCADE;

--
-- Constraints for table `departament`
--
ALTER TABLE `departament`
  ADD CONSTRAINT `fk_departament_location1` FOREIGN KEY (`idlocation`) REFERENCES `location` (`idlocation`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `employee`
--
ALTER TABLE `employee`
  ADD CONSTRAINT `fk_employee_company1` FOREIGN KEY (`idcompany`) REFERENCES `company` (`idcompany`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employee_location1` FOREIGN KEY (`idlocation`) REFERENCES `location` (`idlocation`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employee_state1` FOREIGN KEY (`idstate`) REFERENCES `state` (`idstate`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employee_status_employee1` FOREIGN KEY (`idstatus_employee`) REFERENCES `status_employee` (`idstatus_employee`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employee_sublocation1` FOREIGN KEY (`idsublocation`) REFERENCES `sublocation` (`idsublocation`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `employee_code`
--
ALTER TABLE `employee_code`
  ADD CONSTRAINT `fk_employee_code_employee1` FOREIGN KEY (`idemployee`) REFERENCES `employee` (`idemployee`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_employee_code_type_code1` FOREIGN KEY (`idtype_code`) REFERENCES `type_code` (`idtype_code`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `functions`
--
ALTER TABLE `functions`
  ADD CONSTRAINT `fk_functions_departament1` FOREIGN KEY (`iddepartament`) REFERENCES `departament` (`iddepartament`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `login_bomb`
--
ALTER TABLE `login_bomb`
  ADD CONSTRAINT `fk_login_bomb_bomb1` FOREIGN KEY (`idbomb`) REFERENCES `bomb` (`idbomb`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_login_bomb_employee1` FOREIGN KEY (`idemployee`) REFERENCES `employee` (`idemployee`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `pcregister`
--
ALTER TABLE `pcregister`
  ADD CONSTRAINT `fk_pcregister_login_bomb1` FOREIGN KEY (`idlogin_bomb`) REFERENCES `login_bomb` (`idlogin_bomb`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `pcreg_vb`
--
ALTER TABLE `pcreg_vb`
  ADD CONSTRAINT `fk_pcreg_vb_pcregister1` FOREIGN KEY (`idpcregister`) REFERENCES `pcregister` (`idpcregister`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_pcreg_vb_values_bomb1` FOREIGN KEY (`idvalues_bomb`) REFERENCES `values_bomb` (`idvalues_bomb`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `profile`
--
ALTER TABLE `profile`
  ADD CONSTRAINT `fk_user_profile` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `qcreg_vb`
--
ALTER TABLE `qcreg_vb`
  ADD CONSTRAINT `fk_qcreg_vb_qc_register1` FOREIGN KEY (`idqc_register`) REFERENCES `qc_register` (`idqc_register`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_qcreg_vb_values_bomb1` FOREIGN KEY (`idvalues_bomb`) REFERENCES `values_bomb` (`idvalues_bomb`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `qc_register`
--
ALTER TABLE `qc_register`
  ADD CONSTRAINT `fk_qc_register_employee1` FOREIGN KEY (`idemployee`) REFERENCES `employee` (`idemployee`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_qc_register_pcregister1` FOREIGN KEY (`idpcregister`) REFERENCES `pcregister` (`idpcregister`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `social_account`
--
ALTER TABLE `social_account`
  ADD CONSTRAINT `fk_user_account` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

--
-- Constraints for table `sublocation`
--
ALTER TABLE `sublocation`
  ADD CONSTRAINT `fk_sublocation_location1` FOREIGN KEY (`idlocation`) REFERENCES `location` (`idlocation`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `timecard`
--
ALTER TABLE `timecard`
  ADD CONSTRAINT `fk_timecard_company1` FOREIGN KEY (`idcompany`) REFERENCES `company` (`idcompany`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timecard_departament1` FOREIGN KEY (`iddepartament`) REFERENCES `departament` (`iddepartament`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timecard_employee1` FOREIGN KEY (`idemployee`) REFERENCES `employee` (`idemployee`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timecard_functions1` FOREIGN KEY (`idfunction`) REFERENCES `functions` (`idfunction`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timecard_groups1` FOREIGN KEY (`idgroup`) REFERENCES `groups` (`idgroup`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timecard_location1` FOREIGN KEY (`idlocation`) REFERENCES `location` (`idlocation`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  ADD CONSTRAINT `fk_timecard_sublocation1` FOREIGN KEY (`idsublocation`) REFERENCES `sublocation` (`idsublocation`) ON DELETE NO ACTION ON UPDATE NO ACTION;

--
-- Constraints for table `token`
--
ALTER TABLE `token`
  ADD CONSTRAINT `fk_user_token` FOREIGN KEY (`user_id`) REFERENCES `user` (`id`) ON DELETE CASCADE;

