-- MySQL Administrator dump 1.4
--
-- ------------------------------------------------------
-- Server version	5.7.18


/*!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 utf8 */;

/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;


--
-- Create schema compra
--

-- CREATE DATABASE IF NOT EXISTS compra;
-- USE compra;

--
-- Definition of table `compra_settings`
--

DROP TABLE IF EXISTS `compra_settings`;
CREATE TABLE `compra_settings` (
  `ID` int(11) NOT NULL AUTO_INCREMENT,
  `TYPE` int(11) DEFAULT '1',
  `NAME` mediumtext,
  `USERNAME` mediumtext,
  `COOKIE` varchar(500) DEFAULT NULL,
  `SEARCH` mediumtext,
  `TABLENAME` varchar(300) DEFAULT NULL,
  PRIMARY KEY (`ID`)
) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;

--
-- Dumping data for table `compra_settings`
--

/*!40000 ALTER TABLE `compra_settings` DISABLE KEYS */;
INSERT INTO `compra_settings` (`ID`,`TYPE`,`NAME`,`USERNAME`,`COOKIE`,`SEARCH`,`TABLENAME`) VALUES 
 (1,3,'0','admin',NULL,'[\".dummyField\"]','u_lista_compra'),
 (5,3,'2','humanes',NULL,'[\".dummyField\"]','u_lista_compra'),
 (6,3,'2','admin',NULL,'[\".dummyField\",\"foto\"]','u_lista_compra');
/*!40000 ALTER TABLE `compra_settings` ENABLE KEYS */;


--
-- Definition of table `compra_uggroups`
--

DROP TABLE IF EXISTS `compra_uggroups`;
CREATE TABLE `compra_uggroups` (
  `GroupID` int(11) NOT NULL AUTO_INCREMENT,
  `Label` varchar(300) DEFAULT NULL,
  `Provider` varchar(10) NOT NULL DEFAULT '',
  `Comment` mediumtext,
  PRIMARY KEY (`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `compra_uggroups`
--

/*!40000 ALTER TABLE `compra_uggroups` DISABLE KEYS */;
/*!40000 ALTER TABLE `compra_uggroups` ENABLE KEYS */;


--
-- Definition of table `compra_ugmembers`
--

DROP TABLE IF EXISTS `compra_ugmembers`;
CREATE TABLE `compra_ugmembers` (
  `UserName` varchar(255) NOT NULL,
  `GroupID` int(11) NOT NULL,
  `Provider` varchar(10) NOT NULL DEFAULT '',
  PRIMARY KEY (`UserName`,`GroupID`,`Provider`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `compra_ugmembers`
--

/*!40000 ALTER TABLE `compra_ugmembers` DISABLE KEYS */;
INSERT INTO `compra_ugmembers` (`UserName`,`GroupID`,`Provider`) VALUES 
 ('admin',-1,''),
 ('humanes',-1,'');
/*!40000 ALTER TABLE `compra_ugmembers` ENABLE KEYS */;


--
-- Definition of table `compra_ugrights`
--

DROP TABLE IF EXISTS `compra_ugrights`;
CREATE TABLE `compra_ugrights` (
  `TableName` varchar(300) NOT NULL,
  `GroupID` int(11) NOT NULL,
  `AccessMask` varchar(10) DEFAULT NULL,
  `Page` mediumtext,
  PRIMARY KEY (`TableName`(50),`GroupID`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

--
-- Dumping data for table `compra_ugrights`
--

/*!40000 ALTER TABLE `compra_ugrights` DISABLE KEYS */;
INSERT INTO `compra_ugrights` (`TableName`,`GroupID`,`AccessMask`,`Page`) VALUES 
 ('ct_grupo',-1,'ADESPIM',NULL),
 ('ct_producto',-1,'ADESPIM',NULL),
 ('ct_unidad',-1,'ADESPIM',NULL),
 ('ct_usuario',-1,'ADESPIM',NULL),
 ('ct_usuario_grupo',-1,'ADESPIM',NULL),
 ('ct_usuario_grupo_search',-1,'AEDSPI',NULL),
 ('lista_compra',-1,'ADESPIM',NULL),
 ('seleccion_grupo',-2,'E',NULL),
 ('seleccion_grupo',-1,'ES',NULL),
 ('u_ct_grupo',-2,'AEDS',NULL),
 ('u_ct_grupo',-1,'AEDS',NULL),
 ('u_ct_producto',-2,'AEDS',NULL),
 ('u_ct_producto',-1,'AEDS',NULL),
 ('u_ct_usuario_grupo',-2,'AEDSPI',NULL),
 ('u_ct_usuario_grupo',-1,'AEDSPI',NULL),
 ('u_lista_compra',-2,'AEDS',NULL),
 ('u_lista_compra',-1,'AEDS',NULL),
 ('u_lista_compra2',-1,'AEDS',NULL);
/*!40000 ALTER TABLE `compra_ugrights` ENABLE KEYS */;


--
-- Definition of table `ct_grupo`
--

DROP TABLE IF EXISTS `ct_grupo`;
CREATE TABLE `ct_grupo` (
  `idct_grupo` int(11) NOT NULL AUTO_INCREMENT,
  `Nombre` varchar(50) COLLATE utf8_spanish_ci NOT NULL,
  `Descripcion` varchar(200) COLLATE utf8_spanish_ci DEFAULT NULL,
  `FechaAlta` datetime NOT NULL,
  `Administrador` int(11) NOT NULL,
  PRIMARY KEY (`idct_grupo`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `ct_grupo`
--

/*!40000 ALTER TABLE `ct_grupo` DISABLE KEYS */;
INSERT INTO `ct_grupo` (`idct_grupo`,`Nombre`,`Descripcion`,`FechaAlta`,`Administrador`) VALUES 
 (1,'Plaza de España, 3','Mi casa','2018-05-03 00:00:00',1),
 (2,'Familia Humanes','C/ Fuente del Sol','2018-05-09 20:11:21',3),
 (5,'Fiesta de primavera','preparar barbacoa','2018-05-10 21:41:58',2),
 (6,'Compra casa','Compra normal de casa','2018-05-15 09:02:30',5),
 (7,'Compra','Compra semanal ordinaria','2018-05-17 19:31:57',7),
 (8,'Casa','Compras de casa','2018-05-17 19:32:18',6),
 (9,'Las Viandas','Comer vida genera vida','2018-05-18 16:47:03',8),
 (10,'Micompra','Micompra','2018-05-23 15:28:56',10),
 (11,'Casa mhc','Casa mhc','2018-05-23 15:31:10',9),
 (12,'plaza-romero','','2018-06-12 17:51:19',12),
 (13,'Lista basica','Lista de prueba','2018-07-14 10:09:08',13);
/*!40000 ALTER TABLE `ct_grupo` ENABLE KEYS */;


--
-- Definition of table `ct_producto`
--

DROP TABLE IF EXISTS `ct_producto`;
CREATE TABLE `ct_producto` (
  `idct_producto` int(11) NOT NULL AUTO_INCREMENT,
  `ct_grupo_idct_grupo` int(11) NOT NULL,
  `Nombre` varchar(60) COLLATE utf8_spanish_ci NOT NULL,
  `Cantidad` float DEFAULT NULL,
  `ct_unidad_idct_unidad` int(11) DEFAULT NULL,
  `Foto` varchar(1000) COLLATE utf8_spanish_ci DEFAULT NULL,
  `FechaUltCambio` datetime DEFAULT NULL,
  `UsuarioUltCambio` int(11) DEFAULT NULL,
  PRIMARY KEY (`idct_producto`),
  KEY `fk_ct_producto_ct_grupo1_idx` (`ct_grupo_idct_grupo`),
  KEY `fk_ct_producto_ct_unidad1_idx` (`ct_unidad_idct_unidad`),
  CONSTRAINT `fk_ct_producto_ct_grupo1` FOREIGN KEY (`ct_grupo_idct_grupo`) REFERENCES `ct_grupo` (`idct_grupo`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_ct_producto_ct_unidad1` FOREIGN KEY (`ct_unidad_idct_unidad`) REFERENCES `ct_unidad` (`idct_unidad`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=24 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `ct_producto`
--

/*!40000 ALTER TABLE `ct_producto` DISABLE KEYS */;
INSERT INTO `ct_producto` (`idct_producto`,`ct_grupo_idct_grupo`,`Nombre`,`Cantidad`,`ct_unidad_idct_unidad`,`Foto`,`FechaUltCambio`,`UsuarioUltCambio`) VALUES 
 (2,1,'Uvas',750,3,'[{\"name\":\"..\\/Documentos\\/Compra\\/c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_a6g7oir6.jpg\",\"usrName\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71 (1).jpg\",\"size\":8786,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thc13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_6z5wbw6e.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1510,\"searchStr\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71 (1).jpg,!:sStrEnd\"}]',NULL,NULL),
 (3,1,'Leche',12,1,'[{\"name\":\"..\\/Documentos\\/Compra\\/5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb_rn6wi2hc.jpg\",\"usrName\":\"5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb.jpg\",\"size\":10505,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/th5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb_6he5ktpy.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1584,\"searchStr\":\"5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb.jpg,!:sStrEnd\"}]',NULL,NULL),
 (4,1,'Galletas',1,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa_11c04h1i.jpg\",\"usrName\":\"5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa.jpg\",\"size\":10696,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/th5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa_dbcvyyrg.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1445,\"searchStr\":\"5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa.jpg,!:sStrEnd\"}]',NULL,NULL),
 (5,2,'Uvas',1,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_wh4wl2w3.jpg\",\"usrName\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71.jpg\",\"size\":8786,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thc13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_u01aswp4.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1510,\"searchStr\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71.jpg,!:sStrEnd\"}]',NULL,NULL),
 (6,5,'Café ',100,3,'[{\"name\":\"..\\/Documentos\\/Compra\\/caf___wjcdbw09_uqgyv95s.jpg\",\"usrName\":\"café_wjcdbw09.jpg\",\"size\":34123,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thcaf___wjcdbw09_0z0zn24n.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":2172,\"searchStr\":\"café_wjcdbw09.jpg,!:sStrEnd\"}]',NULL,NULL),
 (7,5,'Portátil ',1,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/20180426_210404_plaglig4.jpg\",\"usrName\":\"20180426_210404.jpg\",\"size\":8937,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/th20180426_210404_wg1socpq.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1480,\"searchStr\":\"20180426_210404.jpg,!:sStrEnd\"}]',NULL,NULL),
 (8,1,'Plátanos',1,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/image_oemljozt.jpg\",\"usrName\":\"image.jpg\",\"size\":7988,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thimage_p8611j47.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1299,\"searchStr\":\"image.jpg,!:sStrEnd\"}]',NULL,NULL),
 (9,2,'tarta de manzana',1,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/tarta de manzana_z36wttrm.png\",\"usrName\":\"tarta de manzana.png\",\"size\":60009,\"type\":\"image\\/png\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thtarta de manzana_xrbb9cgk.png\",\"thumbnail_type\":\"image\\/png\",\"thumbnail_size\":7962,\"searchStr\":\"tarta de manzana.png,!:sStrEnd\"}]',NULL,NULL),
 (10,6,'Pan de molde',NULL,NULL,'',NULL,NULL),
 (11,6,'Vino de mesa',NULL,NULL,'',NULL,NULL),
 (12,6,'Queso manchego',NULL,NULL,'',NULL,NULL),
 (13,6,'Queso Burgo de Arias',NULL,NULL,'',NULL,NULL),
 (14,6,'Huevos',NULL,NULL,'',NULL,NULL),
 (15,6,'Bolsas de basura grandes',1,4,'',NULL,NULL),
 (16,6,'Bolsas de basura pequeñas',NULL,NULL,'',NULL,NULL),
 (17,9,'Leche',6,1,'[{\"name\":\"..\\/Documentos\\/Compra\\/Screenshot_20180517-173747_uyoh9eoj.png\",\"usrName\":\"Screenshot_20180517-173747.png\",\"size\":85768,\"type\":\"image\\/png\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thScreenshot_20180517-173747_h6543hd2.png\",\"thumbnail_type\":\"image\\/png\",\"thumbnail_size\":6433,\"searchStr\":\"Screenshot_20180517-173747.png,!:sStrEnd\"}]',NULL,NULL),
 (18,9,'Huevos',6,4,'',NULL,NULL),
 (19,12,'ali-oli',NULL,NULL,'',NULL,NULL),
 (20,13,'Altavoz',NULL,NULL,'[{\"name\":\"..\\/Documentos\\/Compra\\/image_7xxjz4sf.jpg\",\"usrName\":\"image.jpg\",\"size\":9173,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thimage_fth42mhn.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1650,\"searchStr\":\"image.jpg,!:sStrEnd\"}]',NULL,NULL),
 (21,1,'Jamón',250,3,'[{\"name\":\"..\\/Documentos\\/Compra\\/jamon_zrj0fhap.png\",\"usrName\":\"jamon.png\",\"size\":5443,\"type\":\"image\\/png\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thjamon_0s3r0767.png\",\"thumbnail_type\":\"image\\/png\",\"thumbnail_size\":5487,\"searchStr\":\"jamon.png,!:sStrEnd\"}]','2018-11-17 14:42:43',1),
 (22,1,'Huevos',12,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/huevos_l4exc9gb.jpg\",\"usrName\":\"huevos.jpg\",\"size\":3460,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thhuevos_0qay49tk.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1142,\"searchStr\":\"huevos.jpg,!:sStrEnd\"}]','2018-11-17 14:44:33',1),
 (23,5,'prueba',1,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/favicon-4x_nsh5eubf.png\",\"usrName\":\"favicon-4x.png\",\"size\":218787,\"type\":\"image\\/png\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thfavicon-4x_v9njhlqn.png\",\"thumbnail_type\":\"image\\/png\",\"thumbnail_size\":8295,\"searchStr\":\"favicon-4x.png,!:sStrEnd\"}]','2019-06-17 17:41:07',1);
/*!40000 ALTER TABLE `ct_producto` ENABLE KEYS */;


--
-- Definition of table `ct_unidad`
--

DROP TABLE IF EXISTS `ct_unidad`;
CREATE TABLE `ct_unidad` (
  `idct_unidad` int(11) NOT NULL AUTO_INCREMENT,
  `Titulo` varchar(50) COLLATE utf8_spanish_ci NOT NULL,
  PRIMARY KEY (`idct_unidad`)
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `ct_unidad`
--

/*!40000 ALTER TABLE `ct_unidad` DISABLE KEYS */;
INSERT INTO `ct_unidad` (`idct_unidad`,`Titulo`) VALUES 
 (1,'Litros'),
 (2,'Kilos'),
 (3,'Gramos'),
 (4,'Unidades');
/*!40000 ALTER TABLE `ct_unidad` ENABLE KEYS */;


--
-- Definition of table `ct_usuario`
--

DROP TABLE IF EXISTS `ct_usuario`;
CREATE TABLE `ct_usuario` (
  `idct_usuario` int(11) NOT NULL AUTO_INCREMENT,
  `Login` varchar(60) COLLATE utf8_spanish_ci NOT NULL,
  `NombreyApellidos` varchar(100) COLLATE utf8_spanish_ci NOT NULL,
  `Password` varchar(150) COLLATE utf8_spanish_ci NOT NULL,
  `email` varchar(100) COLLATE utf8_spanish_ci DEFAULT NULL,
  `ct_grupo_idct_grupo` int(11) DEFAULT NULL,
  `UsuarioUltCambio` int(11) DEFAULT NULL,
  `FechaUltCambio` datetime DEFAULT NULL,
  `reset_token` varchar(50) COLLATE utf8_spanish_ci DEFAULT NULL,
  `reset_date` datetime DEFAULT NULL,
  PRIMARY KEY (`idct_usuario`),
  KEY `fk_ct_usuario_ct_grupo1_idx` (`ct_grupo_idct_grupo`)
) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `ct_usuario`
--

/*!40000 ALTER TABLE `ct_usuario` DISABLE KEYS */;
INSERT INTO `ct_usuario` (`idct_usuario`,`Login`,`NombreyApellidos`,`Password`,`email`,`ct_grupo_idct_grupo`,`UsuarioUltCambio`,`FechaUltCambio`,`reset_token`,`reset_date`) VALUES 
 (1,'admin','Fernando Humanes','21232f297a57a5a743894a0e4a801fc3','info@fhumanes.com',2,1,'2019-06-17 18:36:55',NULL,NULL),
 (2,'humanes','Fernando Humanes Pereira','1e63dafa7e63f073ed2f362a49f8cf24','fernandohumanes@gmail.com',2,1,'2018-05-05 00:00:00','',NULL),
 (3,'humanes2','Fernando Humanes Per','1e63dafa7e63f073ed2f362a49f8cf24','humanes@madrid.org',2,2,'2018-05-13 21:26:12',NULL,NULL),
 (5,'Huertas','Pablo Huertas','c7d3b30c3eee94c57d6e567319d3516c','Phbachiller@gmail.com',6,NULL,NULL,NULL,NULL),
 (6,'Solhead','Jose','e807f1fcf82d132f9bb018ca6738a19f','solhead@gmail.com',NULL,NULL,NULL,NULL,NULL),
 (7,'Lorena','Lorena Humanes ','d654245def31913bff58dd37e92a89b7','Lorenahumanes@gmail.com',NULL,NULL,NULL,NULL,NULL),
 (8,'HMNS','Pablo Humanes López','245d2c467ff08fe3b1ea4eab36776dd8','pablohumanes@hotmail.com',NULL,NULL,NULL,NULL,NULL),
 (9,'xamax','Miguel Ángel Heredia ','85b282816016a36d38d0660fb162ec01','m.a.heredia@hotmail.com',NULL,NULL,NULL,NULL,NULL),
 (10,'juanmarin','Juan Marin','7e5da5ece8edaa937e431c8600377c91','juanantonio.marin@hotmail.es',10,NULL,NULL,NULL,NULL),
 (11,'Alcorcón ','Dory Barrueco','dfcce81a86ceab5b5e58c67e06f3a0d4','dory.barrueco@gmail.com',NULL,NULL,NULL,NULL,NULL),
 (12,'rpa3','Raúl Plaza','b9cf684604225abecd49f786f0cf00d8','rpa3@madrid.org',12,NULL,NULL,NULL,NULL),
 (13,'Fdiazp','Fredy Disx','827ccb0eea8a706c4c34a16891f84e7b','fdiazpernett@gmail.com',NULL,NULL,NULL,NULL,NULL);
/*!40000 ALTER TABLE `ct_usuario` ENABLE KEYS */;


--
-- Definition of table `ct_usuario_grupo`
--

DROP TABLE IF EXISTS `ct_usuario_grupo`;
CREATE TABLE `ct_usuario_grupo` (
  `idct_usuario_grupo` int(11) NOT NULL AUTO_INCREMENT,
  `ct_grupo_idct_grupo` int(11) NOT NULL,
  `ct_usuario_idct_usuario` int(11) NOT NULL,
  PRIMARY KEY (`idct_usuario_grupo`),
  KEY `fk_ct_usuario_grupo_ct_grupo_idx` (`ct_grupo_idct_grupo`),
  KEY `fk_ct_usuario_grupo_ct_usuario1_idx` (`ct_usuario_idct_usuario`),
  CONSTRAINT `fk_ct_usuario_grupo_ct_grupo` FOREIGN KEY (`ct_grupo_idct_grupo`) REFERENCES `ct_grupo` (`idct_grupo`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_ct_usuario_grupo_ct_usuario1` FOREIGN KEY (`ct_usuario_idct_usuario`) REFERENCES `ct_usuario` (`idct_usuario`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `ct_usuario_grupo`
--

/*!40000 ALTER TABLE `ct_usuario_grupo` DISABLE KEYS */;
INSERT INTO `ct_usuario_grupo` (`idct_usuario_grupo`,`ct_grupo_idct_grupo`,`ct_usuario_idct_usuario`) VALUES 
 (1,1,1),
 (2,2,3),
 (4,1,3),
 (5,2,1),
 (10,5,3),
 (11,5,2),
 (12,5,1),
 (13,6,5),
 (14,7,7),
 (15,8,6),
 (16,9,8),
 (17,10,10),
 (18,11,9),
 (19,12,12),
 (20,13,13);
/*!40000 ALTER TABLE `ct_usuario_grupo` ENABLE KEYS */;


--
-- Definition of table `lista_compra`
--

DROP TABLE IF EXISTS `lista_compra`;
CREATE TABLE `lista_compra` (
  `idlista_compra` int(11) NOT NULL AUTO_INCREMENT,
  `ct_grupo_idct_grupo` int(11) NOT NULL,
  `ct_producto_idct_producto` int(11) DEFAULT NULL,
  `Nombre` varchar(60) COLLATE utf8_spanish_ci DEFAULT NULL,
  `Cantidad` float NOT NULL,
  `ct_unidad_idct_unidad` int(11) NOT NULL,
  `foto` varchar(1000) COLLATE utf8_spanish_ci DEFAULT NULL,
  `FechaUltCambio` datetime DEFAULT NULL,
  `UsuarioUltCambio` int(11) DEFAULT NULL,
  `Comprado` varchar(1) COLLATE utf8_spanish_ci DEFAULT '0',
  `FechaComprado` datetime DEFAULT NULL,
  `UsuarioComprado` int(11) DEFAULT NULL,
  PRIMARY KEY (`idlista_compra`),
  KEY `fk_lista_compra_ct_grupo1_idx` (`ct_grupo_idct_grupo`),
  KEY `fk_lista_compra_ct_producto1_idx` (`ct_producto_idct_producto`),
  KEY `fk_lista_compra_ct_unidad1_idx` (`ct_unidad_idct_unidad`),
  CONSTRAINT `fk_lista_compra_ct_grupo1` FOREIGN KEY (`ct_grupo_idct_grupo`) REFERENCES `ct_grupo` (`idct_grupo`) ON DELETE CASCADE ON UPDATE CASCADE,
  CONSTRAINT `fk_lista_compra_ct_producto1` FOREIGN KEY (`ct_producto_idct_producto`) REFERENCES `ct_producto` (`idct_producto`) ON DELETE NO ACTION ON UPDATE NO ACTION,
  CONSTRAINT `fk_lista_compra_ct_unidad1` FOREIGN KEY (`ct_unidad_idct_unidad`) REFERENCES `ct_unidad` (`idct_unidad`) ON DELETE NO ACTION ON UPDATE NO ACTION
) ENGINE=InnoDB AUTO_INCREMENT=63 DEFAULT CHARSET=utf8 COLLATE=utf8_spanish_ci;

--
-- Dumping data for table `lista_compra`
--

/*!40000 ALTER TABLE `lista_compra` DISABLE KEYS */;
INSERT INTO `lista_compra` (`idlista_compra`,`ct_grupo_idct_grupo`,`ct_producto_idct_producto`,`Nombre`,`Cantidad`,`ct_unidad_idct_unidad`,`foto`,`FechaUltCambio`,`UsuarioUltCambio`,`Comprado`,`FechaComprado`,`UsuarioComprado`) VALUES 
 (22,1,4,'Galletas',2,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa_11c04h1i.jpg\",\"usrName\":\"5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa.jpg\",\"size\":10696,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/th5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa_dbcvyyrg.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1445,\"searchStr\":\"5204252cb40993c22027bc9d69ab65f7047db7e1c8ff777142da6ebef9f6ddaa.jpg,!:sStrEnd\"}]','2018-05-08 14:46:28',1,'1','2018-12-22 19:19:55',1),
 (24,1,2,'Uvas',0.75,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_a6g7oir6.jpg\",\"usrName\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71 (1).jpg\",\"size\":8786,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thc13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_6z5wbw6e.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1510,\"searchStr\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71 (1).jpg,!:sStrEnd\"}]','2018-05-08 21:02:22',1,'1','2018-11-11 20:37:28',1),
 (25,2,5,'Uvas',1,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_wh4wl2w3.jpg\",\"usrName\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71.jpg\",\"size\":8786,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thc13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_u01aswp4.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1510,\"searchStr\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71.jpg,!:sStrEnd\"}]','2018-05-10 21:32:55',2,'1','2019-06-15 13:31:36',1),
 (26,5,6,'Café ',100,3,'[{\"name\":\"..\\/Documentos\\/Compra\\/DSC04465_qb5ob05m.JPG\",\"usrName\":\"DSC04465.JPG\",\"size\":18257,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thDSC04465_pxa3go3k.JPG\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":2142,\"searchStr\":\"DSC04465.JPG,!:sStrEnd\"}]','2018-05-11 16:48:18',3,'1','2022-08-21 20:08:37',1),
 (27,5,7,'Portátil ',1,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/20180426_210404_plaglig4.jpg\",\"usrName\":\"20180426_210404.jpg\",\"size\":8937,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/th20180426_210404_wg1socpq.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1480,\"searchStr\":\"20180426_210404.jpg,!:sStrEnd\"}]','2018-05-11 16:49:44',3,'1','2022-08-21 20:08:35',1),
 (31,6,15,'Bolsas de basura grandes',1,4,'','2018-05-15 09:08:43',5,'0',NULL,NULL),
 (32,9,18,'Huevos',6,4,'','2018-05-18 16:48:51',8,'0',NULL,NULL),
 (33,9,17,'Leche',6,1,'[{\"name\":\"..\\/Documentos\\/Compra\\/Screenshot_20180517-173747_uyoh9eoj.png\",\"usrName\":\"Screenshot_20180517-173747.png\",\"size\":85768,\"type\":\"image\\/png\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thScreenshot_20180517-173747_h6543hd2.png\",\"thumbnail_type\":\"image\\/png\",\"thumbnail_size\":6433,\"searchStr\":\"Screenshot_20180517-173747.png,!:sStrEnd\"}]','2018-05-18 16:49:17',8,'1','2018-05-18 16:50:10',8),
 (35,1,8,'Plátanos',1,2,'[{\"name\":\"..\\/Documentos\\/Compra\\/image_oemljozt.jpg\",\"usrName\":\"image.jpg\",\"size\":7988,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thimage_p8611j47.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1299,\"searchStr\":\"image.jpg,!:sStrEnd\"}]','2018-05-21 12:21:03',1,'1','2019-06-12 19:10:21',1),
 (58,1,3,'Leche',12,1,'[{\"name\":\"..\\/Documentos\\/Compra\\/5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb_rn6wi2hc.jpg\",\"usrName\":\"5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb.jpg\",\"size\":10505,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/th5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb_6he5ktpy.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1584,\"searchStr\":\"5ee58621bd72849eb3b3c7f0abe6fbe983d3a351da1471659da4898a865acddb.jpg,!:sStrEnd\"}]','2018-11-17 14:15:50',1,'1','2019-06-12 19:10:25',1),
 (59,1,2,'Uvas',750,3,'[{\"name\":\"..\\/Documentos\\/Compra\\/c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_a6g7oir6.jpg\",\"usrName\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71 (1).jpg\",\"size\":8786,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thc13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71_6z5wbw6e.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1510,\"searchStr\":\"c13adae72b76986b6bacb5931ffb4f27032f46f0827f4f4346a56bf0919c1d71 (1).jpg,!:sStrEnd\"}]','2018-11-17 14:20:26',1,'0',NULL,NULL),
 (61,1,22,'Huevos',12,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/huevos_l4exc9gb.jpg\",\"usrName\":\"huevos.jpg\",\"size\":3460,\"type\":\"image\\/jpeg\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thhuevos_0qay49tk.jpg\",\"thumbnail_type\":\"image\\/jpeg\",\"thumbnail_size\":1142,\"searchStr\":\"huevos.jpg,!:sStrEnd\"}]','2018-12-22 19:25:58',1,'0',NULL,NULL),
 (62,2,9,'tarta de manzana',1,4,'[{\"name\":\"..\\/Documentos\\/Compra\\/tarta de manzana_z36wttrm.png\",\"usrName\":\"tarta de manzana.png\",\"size\":60009,\"type\":\"image\\/png\",\"thumbnail\":\"..\\/Documentos\\/Compra\\/thtarta de manzana_xrbb9cgk.png\",\"thumbnail_type\":\"image\\/png\",\"thumbnail_size\":7962,\"searchStr\":\"tarta de manzana.png,!:sStrEnd\"}]','2022-08-21 20:31:42',1,'0',NULL,NULL);
/*!40000 ALTER TABLE `lista_compra` ENABLE KEYS */;




/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!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 */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
