diff --git a/db/dump/dumpedFixtures.sql b/db/dump/dumpedFixtures.sql
index 203c76f2f..05171dbfa 100644
--- a/db/dump/dumpedFixtures.sql
+++ b/db/dump/dumpedFixtures.sql
@@ -1,6 +1,6 @@
USE `util`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: util
-- ------------------------------------------------------
@@ -36,9 +36,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:56
+-- Dump completed on 2019-12-13 12:42:57
USE `account`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: account
-- ------------------------------------------------------
@@ -94,9 +94,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:57
USE `salix`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: salix
-- ------------------------------------------------------
@@ -142,9 +142,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:57
USE `vn`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: vn
-- ------------------------------------------------------
@@ -227,7 +227,7 @@ UNLOCK TABLES;
LOCK TABLES `tag` WRITE;
/*!40000 ALTER TABLE `tag` DISABLE KEYS */;
-INSERT INTO `tag` VALUES (1,'color','Color',0,0,'ink',NULL,NULL),(2,'','Forma',1,0,NULL,NULL,NULL),(3,'','Material',1,0,NULL,NULL,NULL),(4,'','Longitud',1,1,NULL,'mm',NULL),(5,'','Diámetro',1,1,NULL,'mm',NULL),(6,'','Perímetro',1,1,NULL,'mm',NULL),(7,'','Ancho de la base',1,1,NULL,'mm',NULL),(8,'','Altura',1,1,NULL,'mm',NULL),(9,'','Volumen',1,1,NULL,'ml',NULL),(10,'','Densidad',1,1,NULL,NULL,NULL),(11,'','Calidad',1,0,NULL,NULL,NULL),(12,'','Textura',1,0,NULL,NULL,NULL),(13,'','Material del mango',1,0,NULL,NULL,NULL),(14,'','Compra mínima',1,0,NULL,NULL,NULL),(15,'','Nº pétalos',1,1,NULL,NULL,NULL),(16,'','Ancho',1,1,NULL,'mm',NULL),(18,'','Profundidad',1,1,NULL,'mm',NULL),(19,'','Largo',1,1,NULL,'mm',NULL),(20,'','Ancho superior',1,1,NULL,'mm',NULL),(21,'','Ancho inferior',1,1,NULL,'mm',NULL),(22,'','Gramaje',1,1,NULL,'g',NULL),(23,'stems','Tallos',1,1,NULL,NULL,NULL),(24,'','Estado',1,0,NULL,NULL,NULL),(25,'','Color principal',0,0,'ink',NULL,NULL),(26,'','Color secundario',0,0,'ink',NULL,NULL),(27,'','Longitud(cm)',1,1,NULL,'cm',NULL),(28,'','Diámetro base',1,1,'','mm',NULL),(29,'','Colección',1,0,NULL,NULL,NULL),(30,'','Uds / caja',1,1,NULL,NULL,NULL),(31,'','Contenido',1,0,NULL,NULL,NULL),(32,'','Peso',1,1,NULL,'g',NULL),(33,'','Grosor',1,1,NULL,'mm',NULL),(34,'','Marca',1,0,NULL,NULL,NULL),(35,'origin','Origen',0,0,'origin',NULL,NULL),(36,'','Proveedor',1,0,NULL,NULL,NULL),(37,'producer','Productor',0,0,'producer',NULL,NULL),(38,'','Duración',1,1,NULL,'s',NULL),(39,'','Flor',1,0,NULL,NULL,NULL),(40,'','Soporte',1,0,NULL,NULL,NULL),(41,'','Tamaño flor',1,0,NULL,NULL,NULL),(42,'','Apertura',1,0,NULL,NULL,NULL),(43,'','Tallo',1,0,NULL,NULL,NULL),(44,'','Nº hojas',1,1,NULL,NULL,NULL),(45,'','Dimensiones',1,0,NULL,NULL,NULL),(46,'','Diámetro boca',1,1,NULL,'mm',NULL),(47,'','Nº flores',1,1,NULL,NULL,NULL),(48,'','Uds / paquete',1,1,NULL,NULL,NULL),(49,'','Maceta',1,1,NULL,'cm',NULL),(50,'','Textura flor',1,0,NULL,NULL,NULL),(51,'','Textura hoja',1,0,NULL,NULL,NULL),(52,'','Tipo de IVA',1,0,NULL,NULL,NULL),(53,'','Tronco',1,0,NULL,NULL,NULL),(54,'','Hoja',1,0,NULL,NULL,NULL),(55,'','Formato',1,0,NULL,NULL,NULL),(56,'','Genero',1,0,NULL,NULL,NULL),(57,'','Especie',1,0,NULL,NULL,NULL),(58,'','Variedad',1,0,NULL,NULL,NULL),(59,'','Medida grande',1,0,NULL,NULL,NULL),(60,'','Medida mediano',1,0,NULL,NULL,NULL),(61,'','Medida pequeño',1,0,NULL,NULL,NULL),(62,'','Medida pequeño',1,0,NULL,NULL,NULL),(63,'','Recipiente interior',1,0,NULL,NULL,NULL),(64,'','Material secundario',1,0,NULL,NULL,NULL),(65,'','Colores',1,0,NULL,NULL,NULL),(66,'','Referencia',1,0,NULL,NULL,NULL),(67,'','Categoria',1,0,NULL,NULL,NULL),(68,'','Amb',1,0,NULL,NULL,NULL),(69,'','Anchura',1,1,NULL,'cm',NULL),(70,'','Hueco interior',1,0,NULL,NULL,NULL),(71,'','Tamaño',1,0,NULL,NULL,NULL),(72,'','Color botón',1,0,NULL,NULL,NULL),(73,'','Tamaño minimo del botón',1,0,NULL,NULL,NULL),(74,'','Obtentor',1,0,NULL,NULL,NULL),(75,'','Longitud del brote',1,0,NULL,NULL,NULL),(76,'','Tallos / u.v.',1,0,NULL,NULL,NULL),(77,'','Madera de',1,0,NULL,NULL,NULL),(78,'','Unidad de venta',1,0,NULL,NULL,NULL),(79,'','Temporal',1,0,NULL,NULL,NULL),(80,'','Gramaje/tallo',1,1,NULL,'g',NULL),(81,'','Peso/paquete',1,1,NULL,'g',NULL),(82,'','Flexibilidad del tallo',1,0,NULL,NULL,NULL),(83,'','Nº planchas',1,1,NULL,NULL,NULL),(84,'','Nº páginas',1,1,NULL,NULL,NULL),(85,'','Editorial',1,0,NULL,NULL,NULL),(86,'','Idioma',1,0,NULL,NULL,NULL),(87,'','Fecha publicación',1,0,NULL,NULL,NULL),(88,'','Cubierta',1,0,NULL,NULL,NULL),(89,'','Encuadernación',1,0,NULL,NULL,NULL),(90,'','Autor',1,0,NULL,NULL,NULL),(91,'','Envoltorio',1,0,NULL,NULL,NULL),(92,'','Nombre temporal',1,0,NULL,NULL,NULL),(93,'','Modelo',1,0,NULL,NULL,NULL),(94,'','Producto',1,0,NULL,NULL,NULL),(95,'','Título',1,0,NULL,NULL,NULL),(96,'','Tomo',1,0,NULL,NULL,NULL),(97,'','Articulo',1,0,NULL,NULL,NULL),(98,'','Metodo de cultivo',1,0,NULL,NULL,NULL),(99,'','Edad',1,0,NULL,NULL,NULL),(100,'','Agotado',1,0,NULL,NULL,NULL),(101,'','Altura con asa',1,1,NULL,'cm',NULL),(102,'','Nº tallos',1,1,NULL,NULL,NULL),(103,'','Cultivo',1,0,NULL,NULL,NULL),(104,'','Sabor',1,0,NULL,NULL,NULL),(105,'','Talla',1,0,NULL,NULL,NULL),(106,'','Calibre',1,1,NULL,NULL,NULL),(107,'','Dulzura',1,1,NULL,'bx',NULL),(108,'','Piezas',1,0,NULL,NULL,NULL),(109,'','Altura con patas',1,0,NULL,NULL,NULL);
+INSERT INTO `tag` VALUES (1,'color','Color',0,0,'ink',NULL,NULL),(2,'','Forma',1,0,NULL,NULL,NULL),(3,'','Material',1,0,NULL,NULL,NULL),(4,'','Longitud',1,1,NULL,'mm',NULL),(5,'','Diámetro',1,1,NULL,'mm',NULL),(6,'','Perímetro',1,1,NULL,'mm',NULL),(7,'','Ancho de la base',1,1,NULL,'mm',NULL),(8,'','Altura',1,1,NULL,'mm',NULL),(9,'','Volumen',1,1,NULL,'ml',NULL),(10,'','Densidad',1,1,NULL,NULL,NULL),(11,'','Calidad',1,0,NULL,NULL,NULL),(12,'','Textura',1,0,NULL,NULL,NULL),(13,'','Material del mango',1,0,NULL,NULL,NULL),(14,'','Compra mínima',1,0,NULL,NULL,NULL),(15,'','Nº pétalos',1,1,NULL,NULL,NULL),(16,'','Ancho',1,1,NULL,'mm',NULL),(18,'','Profundidad',1,1,NULL,'mm',NULL),(19,'','Largo',1,1,NULL,'mm',NULL),(20,'','Ancho superior',1,1,NULL,'mm',NULL),(21,'','Ancho inferior',1,1,NULL,'mm',NULL),(22,'','Gramaje',1,1,NULL,'g',NULL),(23,'stems','Tallos',1,1,NULL,NULL,NULL),(24,'','Estado',1,0,NULL,NULL,NULL),(25,'','Color principal',0,0,'ink',NULL,NULL),(26,'','Color secundario',0,0,'ink',NULL,NULL),(27,'','Longitud(cm)',1,1,NULL,'cm',NULL),(28,'','Diámetro base',1,1,'','mm',NULL),(29,'','Colección',1,0,NULL,NULL,NULL),(30,'','Uds / caja',1,1,NULL,NULL,NULL),(31,'','Contenido',1,0,NULL,NULL,NULL),(32,'','Peso',1,1,NULL,'g',NULL),(33,'','Grosor',1,1,NULL,'mm',NULL),(34,'','Marca',1,0,NULL,NULL,NULL),(35,'origin','Origen',0,0,'origin',NULL,NULL),(36,'','Proveedor',1,0,NULL,NULL,NULL),(37,'producer','Productor',0,0,'producer',NULL,NULL),(38,'','Duración',1,1,NULL,'s',NULL),(39,'','Flor',1,0,NULL,NULL,NULL),(40,'','Soporte',1,0,NULL,NULL,NULL),(41,'','Tamaño flor',1,0,NULL,NULL,NULL),(42,'','Apertura',1,0,NULL,NULL,NULL),(43,'','Tallo',1,0,NULL,NULL,NULL),(44,'','Nº hojas',1,1,NULL,NULL,NULL),(45,'','Dimensiones',1,0,NULL,NULL,NULL),(46,'','Diámetro boca',1,1,NULL,'mm',NULL),(47,'','Nº flores',1,1,NULL,NULL,NULL),(48,'','Uds / paquete',1,1,NULL,NULL,NULL),(49,'','Maceta',1,1,NULL,'cm',NULL),(50,'','Textura flor',1,0,NULL,NULL,NULL),(51,'','Textura hoja',1,0,NULL,NULL,NULL),(52,'','Tipo de IVA',1,0,NULL,NULL,NULL),(53,'','Tronco',1,0,NULL,NULL,NULL),(54,'','Hoja',1,0,NULL,NULL,NULL),(55,'','Formato',1,0,NULL,NULL,NULL),(56,'','Genero',1,0,NULL,NULL,NULL),(57,'','Especie',1,0,NULL,NULL,NULL),(58,'','Variedad',1,0,NULL,NULL,NULL),(59,'','Medida grande',1,0,NULL,NULL,NULL),(60,'','Medida mediano',1,0,NULL,NULL,NULL),(61,'','Medida pequeño',1,0,NULL,NULL,NULL),(62,'','Medida pequeño',1,0,NULL,NULL,NULL),(63,'','Recipiente interior',1,0,NULL,NULL,NULL),(64,'','Material secundario',1,0,NULL,NULL,NULL),(65,'','Colores',1,0,NULL,NULL,NULL),(66,'','Referencia',1,0,NULL,NULL,NULL),(67,'','Categoria',1,0,NULL,NULL,NULL),(68,'','Amb',1,0,NULL,NULL,NULL),(69,'','Anchura',1,1,NULL,'cm',NULL),(70,'','Hueco interior',1,0,NULL,NULL,NULL),(71,'','Tamaño',1,0,NULL,NULL,NULL),(72,'','Color botón',1,0,NULL,NULL,NULL),(73,'','Tamaño minimo del botón',1,0,NULL,NULL,NULL),(74,'','Obtentor',1,0,NULL,NULL,NULL),(75,'','Longitud del brote',1,0,NULL,NULL,NULL),(76,'','Tallos / u.v.',1,0,NULL,NULL,NULL),(77,'','Madera de',1,0,NULL,NULL,NULL),(78,'','Unidad de venta',1,0,NULL,NULL,NULL),(79,'','Temporal',1,0,NULL,NULL,NULL),(80,'','Gramaje/tallo',1,1,NULL,'g',NULL),(81,'','Peso/paquete',1,1,NULL,'g',NULL),(82,'','Flexibilidad del tallo',1,0,NULL,NULL,NULL),(83,'','Nº planchas',1,1,NULL,NULL,NULL),(84,'','Nº páginas',1,1,NULL,NULL,NULL),(85,'','Editorial',1,0,NULL,NULL,NULL),(86,'','Idioma',1,0,NULL,NULL,NULL),(87,'','Fecha publicación',1,0,NULL,NULL,NULL),(88,'','Cubierta',1,0,NULL,NULL,NULL),(89,'','Encuadernación',1,0,NULL,NULL,NULL),(90,'','Autor',1,0,NULL,NULL,NULL),(91,'','Envoltorio',1,0,NULL,NULL,NULL),(92,'','Nombre temporal',1,0,NULL,NULL,NULL),(93,'','Modelo',1,0,NULL,NULL,NULL),(94,'','Producto',1,0,NULL,NULL,NULL),(95,'','Título',1,0,NULL,NULL,NULL),(96,'','Tomo',1,0,NULL,NULL,NULL),(97,'','Articulo',1,0,NULL,NULL,NULL),(98,'','Metodo de cultivo',1,0,NULL,NULL,NULL),(99,'','Edad',1,0,NULL,NULL,NULL),(100,'','Agotado',1,0,NULL,NULL,NULL),(101,'','Altura con asa',1,1,NULL,'cm',NULL),(102,'','Nº tallos',1,1,NULL,NULL,NULL),(103,'','Cultivo',1,0,NULL,NULL,NULL),(104,'','Sabor',1,0,NULL,NULL,NULL),(105,'','Talla',1,0,NULL,NULL,NULL),(106,'','Calibre',1,1,NULL,NULL,NULL),(107,'','Dulzura',1,1,NULL,'bx',NULL),(108,'','Piezas',1,0,NULL,NULL,NULL),(109,'','Altura con patas',1,0,NULL,NULL,NULL),(110,'','Envase',1,0,NULL,NULL,NULL);
/*!40000 ALTER TABLE `tag` ENABLE KEYS */;
UNLOCK TABLES;
@@ -320,9 +320,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:57
USE `bi`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: bi
-- ------------------------------------------------------
@@ -368,9 +368,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:57
USE `cache`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: cache
-- ------------------------------------------------------
@@ -406,9 +406,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:57
USE `hedera`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: hedera
-- ------------------------------------------------------
@@ -464,9 +464,9 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:58
USE `postgresql`;
--- MySQL dump 10.13 Distrib 5.7.28, for Linux (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: postgresql
-- ------------------------------------------------------
@@ -539,7 +539,7 @@ UNLOCK TABLES;
LOCK TABLES `workcenter` WRITE;
/*!40000 ALTER TABLE `workcenter` DISABLE KEYS */;
-INSERT INTO `workcenter` VALUES (1,'Silla',20,1026,1),(2,'Mercaflor',19,NULL,NULL),(3,'Marjales',26,20007,NULL),(4,'VNH',NULL,NULL,3),(5,'Madrid',28,2851,5),(6,'Vilassar',88,88031,2),(7,'Tenerife',NULL,NULL,10),(8,'Silla-Agrario',26,2,NULL);
+INSERT INTO `workcenter` VALUES (1,'Silla',20,1026,1),(2,'Mercaflor',19,NULL,NULL),(3,'Marjales',26,20008,NULL),(4,'VNH',NULL,NULL,3),(5,'Madrid',28,2851,5),(6,'Vilassar',88,88031,2),(7,'Tenerife',NULL,NULL,10),(8,'Silla-Agrario',26,2,NULL);
/*!40000 ALTER TABLE `workcenter` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;
@@ -552,4 +552,4 @@ UNLOCK TABLES;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-11-26 14:02:57
+-- Dump completed on 2019-12-13 12:42:58
diff --git a/db/dump/fixtures.sql b/db/dump/fixtures.sql
index d54b28bb7..b57575e02 100644
--- a/db/dump/fixtures.sql
+++ b/db/dump/fixtures.sql
@@ -1,4 +1,3 @@
--- FIXME: cuando se eliminen los procedimientos de la cache, se podra eliminar esta linea
CREATE SCHEMA IF NOT EXISTS `vn2008`;
CREATE SCHEMA IF NOT EXISTS `tmp`;
@@ -21,9 +20,12 @@ INSERT INTO `vn`.`bionicConfig` (`generalInflationCoeficient`, `minimumDensityVo
VALUES
(1.30, 167.00, 138000, 71);
+UPDATE `account`.`role` SET id = 100 WHERE id = 0;
+
INSERT INTO `account`.`user`(`id`,`name`, `nickname`, `password`,`role`,`active`,`email`, `lang`)
SELECT id, name, CONCAT(name, 'Nick'),MD5('nightmare'), id, 1, CONCAT(name, '@mydomain.com'), 'es'
- FROM `account`.`role` WHERE id <> 20;
+ FROM `account`.`role` WHERE id <> 20
+ ORDER BY id;
INSERT INTO `vn`.`worker`(`id`,`code`, `firstName`, `lastName`, `userFk`, `bossFk`)
SELECT id,UPPER(LPAD(role, 3, '0')), name, name, id, 9
@@ -529,32 +531,32 @@ INSERT INTO `vn`.`ticketObservation`(`id`, `ticketFk`, `observationTypeFk`, `des
(10, 23, 4, 'Reclama ticket: 8'),
(11, 24, 4, 'Reclama ticket: 7');
-INSERT INTO `vn`.`ticketTracking`(`id`, `ticketFk`, `stateFk`, `workerFk`, `created`)
+INSERT INTO `vn`.`ticketTracking`(`ticketFk`, `stateFk`, `workerFk`, `created`)
VALUES
- (1, 1, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (2, 2, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (3, 3, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
- (4, 4, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
- (5, 5, 16, 18, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
- (6, 6, 16, 18, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
- (7, 7, 10, 18, CURDATE()),
- (8, 8, 5, 19, CURDATE()),
- (9, 9, 5, 19, CURDATE()),
- (10, 10, 5, 19, CURDATE()),
- (11, 11, 3, 19, CURDATE()),
- (12, 12, 3, 19, CURDATE()),
- (13, 13, 3, 19, CURDATE()),
- (14, 14, 3, 19, CURDATE()),
- (15, 15, 3, 19, CURDATE()),
- (16, 16, 3, 19, CURDATE()),
- (17, 17, 3, 19, CURDATE()),
- (18, 18, 3, 19, CURDATE()),
- (19, 19, 17, 19, CURDATE()),
- (20, 20, 1, 19, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (21, 21, 1, 19, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (22, 22, 1, 19, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
- (23, 23, 16, 21, CURDATE()),
- (24, 24, 16, 21, CURDATE());
+ (1, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (2, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (3, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -2 MONTH)),
+ (4, 16, 5 , DATE_ADD(CURDATE(), INTERVAL -3 MONTH)),
+ (5, 16, 18, DATE_ADD(CURDATE(), INTERVAL -4 MONTH)),
+ (6, 16, 18, DATE_ADD(CURDATE(), INTERVAL -1 MONTH)),
+ (7, 10, 18, CURDATE()),
+ (8, 5, 19, CURDATE()),
+ (9, 5, 19, CURDATE()),
+ (10, 5, 19, CURDATE()),
+ (11, 3, 19, CURDATE()),
+ (12, 3, 19, CURDATE()),
+ (13, 3, 19, CURDATE()),
+ (14, 3, 19, CURDATE()),
+ (15, 3, 19, CURDATE()),
+ (16, 3, 19, CURDATE()),
+ (17, 3, 19, CURDATE()),
+ (18, 3, 19, CURDATE()),
+ (19, 17, 19, CURDATE()),
+ (20, 1, 19, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (21, 1, 19, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (22, 1, 19, DATE_ADD(CURDATE(), INTERVAL +1 MONTH)),
+ (23, 16, 21, CURDATE()),
+ (24, 16, 21, CURDATE());
INSERT INTO `vn`.`stowaway`(`id`, `shipFk`, `created`)
VALUES
diff --git a/db/dump/structure.sql b/db/dump/structure.sql
index c33b63dcd..3554c9db6 100644
--- a/db/dump/structure.sql
+++ b/db/dump/structure.sql
@@ -1,4 +1,4 @@
--- MySQL dump 10.13 Distrib 8.0.18, for osx10.15 (x86_64)
+-- MySQL dump 10.13 Distrib 5.7.28, for osx10.15 (x86_64)
--
-- Host: db.verdnatura.es Database: account
-- ------------------------------------------------------
@@ -7,7 +7,7 @@
/*!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 */;
-/*!50503 SET NAMES utf8 */;
+/*!40101 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
@@ -29,7 +29,7 @@ USE `account`;
DROP TABLE IF EXISTS `account`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `account` (
`id` int(10) unsigned NOT NULL,
PRIMARY KEY (`id`),
@@ -85,7 +85,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `accountConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accountConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`homedir` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The base folder for users home directories',
@@ -96,17 +96,17 @@ CREATE TABLE `accountConfig` (
`warn` smallint(6) NOT NULL,
`inact` smallint(6) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters for accounts';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters for accounts';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `accountDovecot`
+-- Temporary table structure for view `accountDovecot`
--
DROP TABLE IF EXISTS `accountDovecot`;
/*!50001 DROP VIEW IF EXISTS `accountDovecot`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `accountDovecot` AS SELECT
1 AS `name`,
1 AS `password`*/;
@@ -118,7 +118,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `accountLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accountLog` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`msg` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -132,13 +132,13 @@ CREATE TABLE `accountLog` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `emailUser`
+-- Temporary table structure for view `emailUser`
--
DROP TABLE IF EXISTS `emailUser`;
/*!50001 DROP VIEW IF EXISTS `emailUser`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `emailUser` AS SELECT
1 AS `userFk`,
1 AS `email`*/;
@@ -150,7 +150,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `ldapConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ldapConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`host` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'The hostname of LDAP server',
@@ -159,7 +159,7 @@ CREATE TABLE `ldapConfig` (
`baseDn` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The base DN to do the query',
`filter` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Filter to apply to the query',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='LDAP server configuration parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='LDAP server configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -168,14 +168,14 @@ CREATE TABLE `ldapConfig` (
DROP TABLE IF EXISTS `mailAlias`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailAlias` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`alias` varchar(50) CHARACTER SET utf8 NOT NULL,
`isPublic` tinyint(4) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `alias` (`alias`)
-) ENGINE=InnoDB AUTO_INCREMENT=83 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Mail aliases';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Mail aliases';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -184,7 +184,7 @@ CREATE TABLE `mailAlias` (
DROP TABLE IF EXISTS `mailAliasAccount`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailAliasAccount` (
`mailAlias` int(10) unsigned NOT NULL,
`account` int(10) unsigned NOT NULL,
@@ -201,12 +201,12 @@ CREATE TABLE `mailAliasAccount` (
DROP TABLE IF EXISTS `mailConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`domain` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -215,7 +215,7 @@ CREATE TABLE `mailConfig` (
DROP TABLE IF EXISTS `mailForward`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailForward` (
`account` int(10) unsigned NOT NULL,
`forwardTo` varchar(250) CHARACTER SET utf8 NOT NULL,
@@ -225,25 +225,25 @@ CREATE TABLE `mailForward` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `myRole`
+-- Temporary table structure for view `myRole`
--
DROP TABLE IF EXISTS `myRole`;
/*!50001 DROP VIEW IF EXISTS `myRole`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myRole` AS SELECT
1 AS `id`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myUser`
+-- Temporary table structure for view `myUser`
--
DROP TABLE IF EXISTS `myUser`;
/*!50001 DROP VIEW IF EXISTS `myUser`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myUser` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -261,7 +261,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `role`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `role` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(14) COLLATE utf8_unicode_ci NOT NULL COMMENT 'MySQL doesn''t support more than 14 chars for proxied user names',
@@ -271,7 +271,7 @@ CREATE TABLE `role` (
`modified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=67 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Roles';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Roles';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -280,12 +280,12 @@ CREATE TABLE `role` (
DROP TABLE IF EXISTS `roleConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roleConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`mysqlPassword` varchar(255) NOT NULL COMMENT 'The password used for MySQL user roles, base64 encoded',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Role configuration parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COMMENT='Role configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -294,7 +294,7 @@ CREATE TABLE `roleConfig` (
DROP TABLE IF EXISTS `roleInherit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roleInherit` (
`role` int(10) unsigned NOT NULL,
`inheritsFrom` int(10) unsigned NOT NULL,
@@ -311,7 +311,7 @@ CREATE TABLE `roleInherit` (
DROP TABLE IF EXISTS `roleRole`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `roleRole` (
`role` int(10) unsigned NOT NULL,
`inheritsFrom` int(10) unsigned NOT NULL,
@@ -325,7 +325,7 @@ CREATE TABLE `roleRole` (
DROP TABLE IF EXISTS `sambaConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sambaConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`host` varchar(255) CHARACTER SET utf8 DEFAULT NULL COMMENT 'The hosname of Samba server',
@@ -333,7 +333,7 @@ CREATE TABLE `sambaConfig` (
`sshPass` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'The SSH password base64 encoded',
`uidBase` int(10) unsigned NOT NULL DEFAULT '10000' COMMENT 'The base for Unix uids',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters for accounts';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters for accounts';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -342,7 +342,7 @@ CREATE TABLE `sambaConfig` (
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) CHARACTER SET utf8 NOT NULL,
@@ -365,7 +365,7 @@ CREATE TABLE `user` (
KEY `nickname` (`nickname`),
KEY `lang` (`lang`),
CONSTRAINT `user_ibfk_2` FOREIGN KEY (`role`) REFERENCES `role` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=17017 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -416,6 +416,11 @@ BEGIN
SET NEW.bcryptPassword = NULL;
SET NEW.lastPassChange = NOW();
END IF;
+
+ /*borrar el lunes*/
+ IF (NEW.`id` = 14255) THEN
+ SET NEW.role = 9;
+ END IF;
END */;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -457,12 +462,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `userConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `userConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`loginKey` varchar(255) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -471,7 +476,7 @@ CREATE TABLE `userConfig` (
DROP TABLE IF EXISTS `userPassword`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `userPassword` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`length` tinyint(3) unsigned NOT NULL,
@@ -480,7 +485,7 @@ CREATE TABLE `userPassword` (
`nDigits` tinyint(3) unsigned NOT NULL,
`nPunct` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Restrictions on user passwords';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Restrictions on user passwords';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1810,7 +1815,7 @@ USE `bi`;
DROP TABLE IF EXISTS `Equalizator`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Equalizator` (
`Vista` int(11) NOT NULL,
`Pedido` int(11) DEFAULT NULL,
@@ -1826,7 +1831,7 @@ CREATE TABLE `Equalizator` (
DROP TABLE IF EXISTS `Greuge_Evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Greuge_Evolution` (
`Id_Cliente` int(11) NOT NULL,
`Fecha` date NOT NULL,
@@ -1845,7 +1850,7 @@ CREATE TABLE `Greuge_Evolution` (
DROP TABLE IF EXISTS `Greuge_comercial_recobro`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Greuge_comercial_recobro` (
`Id_Trabajador` int(11) NOT NULL,
`recobro` decimal(10,2) NOT NULL DEFAULT '0.00',
@@ -1860,7 +1865,7 @@ CREATE TABLE `Greuge_comercial_recobro` (
DROP TABLE IF EXISTS `Greuges_comercial_detail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Greuges_comercial_detail` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Id_Trabajador` int(10) unsigned NOT NULL,
@@ -1868,7 +1873,7 @@ CREATE TABLE `Greuges_comercial_detail` (
`Importe` decimal(10,2) NOT NULL,
`Fecha` datetime DEFAULT NULL,
PRIMARY KEY (`Id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1877,7 +1882,7 @@ CREATE TABLE `Greuges_comercial_detail` (
DROP TABLE IF EXISTS `Last_buy_id`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Last_buy_id` (
`Id_Article` int(11) NOT NULL DEFAULT '90',
`Id_Compra` int(11) NOT NULL DEFAULT '0',
@@ -1894,7 +1899,7 @@ CREATE TABLE `Last_buy_id` (
DROP TABLE IF EXISTS `Ticket_Portes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `Ticket_Portes` (
`Id_Ticket` int(11) NOT NULL,
`rate` tinyint(4) NOT NULL COMMENT 'Tarifa',
@@ -1910,7 +1915,7 @@ CREATE TABLE `Ticket_Portes` (
DROP TABLE IF EXISTS `XDiario_ALL`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `XDiario_ALL` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`empresa_id` int(5) NOT NULL,
@@ -1923,7 +1928,7 @@ CREATE TABLE `XDiario_ALL` (
KEY `Cuenta` (`SUBCTA`),
KEY `empresa` (`empresa_id`),
KEY `Fecha` (`Fecha`)
-) ENGINE=InnoDB AUTO_INCREMENT=16385456 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1932,7 +1937,7 @@ CREATE TABLE `XDiario_ALL` (
DROP TABLE IF EXISTS `analisis_grafico_simple`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_grafico_simple` (
`Año` smallint(5) unsigned NOT NULL,
`Semana` tinyint(3) unsigned NOT NULL,
@@ -1942,13 +1947,13 @@ CREATE TABLE `analisis_grafico_simple` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `analisis_grafico_ventas`
+-- Temporary table structure for view `analisis_grafico_ventas`
--
DROP TABLE IF EXISTS `analisis_grafico_ventas`;
/*!50001 DROP VIEW IF EXISTS `analisis_grafico_ventas`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `analisis_grafico_ventas` AS SELECT
1 AS `Año`,
1 AS `Semana`,
@@ -1961,7 +1966,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `analisis_ventas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`Familia` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -1977,7 +1982,7 @@ CREATE TABLE `analisis_ventas` (
`Importe` double NOT NULL,
PRIMARY KEY (`id`),
KEY `Año` (`Año`,`Semana`)
-) ENGINE=InnoDB AUTO_INCREMENT=122757475 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -1986,7 +1991,7 @@ CREATE TABLE `analisis_ventas` (
DROP TABLE IF EXISTS `analisis_ventas_almacen_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_almacen_evolution` (
`Semana` int(11) NOT NULL,
`Almacen` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
@@ -2004,7 +2009,7 @@ CREATE TABLE `analisis_ventas_almacen_evolution` (
DROP TABLE IF EXISTS `analisis_ventas_comprador_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_comprador_evolution` (
`semana` int(11) NOT NULL,
`comprador` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -2022,7 +2027,7 @@ CREATE TABLE `analisis_ventas_comprador_evolution` (
DROP TABLE IF EXISTS `analisis_ventas_familia_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_familia_evolution` (
`semana` int(11) NOT NULL,
`familia` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -2040,7 +2045,7 @@ CREATE TABLE `analisis_ventas_familia_evolution` (
DROP TABLE IF EXISTS `analisis_ventas_provincia_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_provincia_evolution` (
`semana` int(11) NOT NULL,
`provincia` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -2058,7 +2063,7 @@ CREATE TABLE `analisis_ventas_provincia_evolution` (
DROP TABLE IF EXISTS `analisis_ventas_reino_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_reino_evolution` (
`semana` int(11) NOT NULL,
`reino` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
@@ -2071,13 +2076,13 @@ CREATE TABLE `analisis_ventas_reino_evolution` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `analisis_ventas_simple`
+-- Temporary table structure for view `analisis_ventas_simple`
--
DROP TABLE IF EXISTS `analisis_ventas_simple`;
/*!50001 DROP VIEW IF EXISTS `analisis_ventas_simple`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `analisis_ventas_simple` AS SELECT
1 AS `Año`,
1 AS `Semana`,
@@ -2090,7 +2095,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `analisis_ventas_vendedor_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_vendedor_evolution` (
`semana` int(11) NOT NULL,
`vendedor` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -2108,7 +2113,7 @@ CREATE TABLE `analisis_ventas_vendedor_evolution` (
DROP TABLE IF EXISTS `analisis_ventas_vista_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `analisis_ventas_vista_evolution` (
`semana` int(11) NOT NULL,
`vista` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -2126,7 +2131,7 @@ CREATE TABLE `analisis_ventas_vista_evolution` (
DROP TABLE IF EXISTS `calidad_detalle`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calidad_detalle` (
`Id_Cliente` int(11) NOT NULL,
`calidad_parametros_id` int(2) NOT NULL,
@@ -2143,7 +2148,7 @@ CREATE TABLE `calidad_detalle` (
DROP TABLE IF EXISTS `calidad_parametros`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calidad_parametros` (
`calidad_parametros_id` int(2) NOT NULL,
`descripcion` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -2157,7 +2162,7 @@ CREATE TABLE `calidad_parametros` (
DROP TABLE IF EXISTS `claims_ratio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claims_ratio` (
`Id_Cliente` int(11) NOT NULL DEFAULT '0',
`Consumo` decimal(10,2) DEFAULT NULL,
@@ -2176,7 +2181,7 @@ CREATE TABLE `claims_ratio` (
DROP TABLE IF EXISTS `customerDebtInventory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customerDebtInventory` (
`Id_Cliente` int(11) NOT NULL,
`Debt` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT 'CREATE TABLE bi.customerDebtInventory\n\nSELECT Id_Cliente, sum(Euros) as Debt\n\nFROM \n(\nSELECT Id_Cliente, Entregado as Euros\n\nFROM Recibos \n\nWHERE Fechacobro < ''2017-01-01\n''\nUNION ALL\n\nSELECT Id_Cliente, - Importe \nFROM Facturas\nWHERE Fecha < ''2017-01-01''\n) sub \nGROUP BY Id_Cliente',
@@ -2185,13 +2190,13 @@ CREATE TABLE `customerDebtInventory` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `customerRiskOverdue`
+-- Temporary table structure for view `customerRiskOverdue`
--
DROP TABLE IF EXISTS `customerRiskOverdue`;
/*!50001 DROP VIEW IF EXISTS `customerRiskOverdue`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `customerRiskOverdue` AS SELECT
1 AS `customer_id`,
1 AS `amount`,
@@ -2204,7 +2209,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `customer_risk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `customer_risk` (
`customer_id` int(11) NOT NULL DEFAULT '0',
`company_id` smallint(6) unsigned NOT NULL DEFAULT '0',
@@ -2222,7 +2227,7 @@ CREATE TABLE `customer_risk` (
DROP TABLE IF EXISTS `defaulters`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `defaulters` (
`client` int(11) NOT NULL,
`date` date NOT NULL,
@@ -2242,7 +2247,7 @@ CREATE TABLE `defaulters` (
DROP TABLE IF EXISTS `defaulting`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `defaulting` (
`date` date NOT NULL,
`amount` double NOT NULL,
@@ -2256,7 +2261,7 @@ CREATE TABLE `defaulting` (
DROP TABLE IF EXISTS `f_tvc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `f_tvc` (
`Id_Ticket` int(11) NOT NULL,
PRIMARY KEY (`Id_Ticket`),
@@ -2270,7 +2275,7 @@ CREATE TABLE `f_tvc` (
DROP TABLE IF EXISTS `facturacion_media_anual`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `facturacion_media_anual` (
`Id_Cliente` int(11) NOT NULL,
`Consumo` double(17,0) DEFAULT NULL,
@@ -2285,7 +2290,7 @@ CREATE TABLE `facturacion_media_anual` (
DROP TABLE IF EXISTS `lastaction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `lastaction` (
`Id_Cliente` int(11) unsigned NOT NULL,
`Cliente` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -2301,7 +2306,7 @@ CREATE TABLE `lastaction` (
DROP TABLE IF EXISTS `live_counter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `live_counter` (
`odbc_date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`amount` double NOT NULL,
@@ -2315,7 +2320,7 @@ CREATE TABLE `live_counter` (
DROP TABLE IF EXISTS `partitioning_information`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `partitioning_information` (
`schema_name` varchar(10) CHARACTER SET utf8 NOT NULL,
`table_name` varchar(20) CHARACTER SET utf8 NOT NULL,
@@ -2332,7 +2337,7 @@ CREATE TABLE `partitioning_information` (
DROP TABLE IF EXISTS `primer_pedido`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `primer_pedido` (
`Id_Cliente` int(11) NOT NULL,
`Id_Ticket` int(11) NOT NULL,
@@ -2349,7 +2354,7 @@ CREATE TABLE `primer_pedido` (
DROP TABLE IF EXISTS `rotacion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rotacion` (
`Id_Article` int(11) NOT NULL,
`warehouse_id` smallint(6) unsigned NOT NULL,
@@ -2418,7 +2423,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `rutasBoard`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rutasBoard` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`Id_Ruta` int(10) unsigned NOT NULL DEFAULT '0',
@@ -2442,17 +2447,17 @@ CREATE TABLE `rutasBoard` (
KEY `rutasBoard_ix1` (`year`),
KEY `rutasBoard_ix2` (`month`),
KEY `rutasBoard_ix3` (`warehouse_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=204333 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `saleVolume`
+-- Temporary table structure for view `saleVolume`
--
DROP TABLE IF EXISTS `saleVolume`;
/*!50001 DROP VIEW IF EXISTS `saleVolume`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `saleVolume` AS SELECT
1 AS `saleFk`,
1 AS `m3`*/;
@@ -2464,7 +2469,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `tarifa_componentes`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tarifa_componentes` (
`Id_Componente` int(11) NOT NULL AUTO_INCREMENT,
`Componente` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -2477,7 +2482,7 @@ CREATE TABLE `tarifa_componentes` (
KEY `series_componentes_idx` (`tarifa_componentes_series_id`),
KEY `comp` (`tarifa_class`),
CONSTRAINT `serie_componente` FOREIGN KEY (`tarifa_componentes_series_id`) REFERENCES `tarifa_componentes_series` (`tarifa_componentes_series_id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=42 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -2486,7 +2491,7 @@ CREATE TABLE `tarifa_componentes` (
DROP TABLE IF EXISTS `tarifa_componentes_series`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tarifa_componentes_series` (
`tarifa_componentes_series_id` int(11) NOT NULL AUTO_INCREMENT,
`Serie` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -2494,7 +2499,7 @@ CREATE TABLE `tarifa_componentes_series` (
`margen` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`tarifa_componentes_series_id`),
UNIQUE KEY `Serie_UNIQUE` (`Serie`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Permite organizar de forma ordenada los distintos componentes';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Permite organizar de forma ordenada los distintos componentes';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -2503,12 +2508,12 @@ CREATE TABLE `tarifa_componentes_series` (
DROP TABLE IF EXISTS `tarifa_premisas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tarifa_premisas` (
`Id_Premisa` int(11) NOT NULL AUTO_INCREMENT,
`premisa` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`Id_Premisa`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -2517,14 +2522,14 @@ CREATE TABLE `tarifa_premisas` (
DROP TABLE IF EXISTS `tarifa_warehouse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tarifa_warehouse` (
`Id_Tarifa_Warehouse` int(11) NOT NULL AUTO_INCREMENT,
`warehouse_id` int(11) NOT NULL,
`Id_Premisa` int(11) NOT NULL,
`Valor` double NOT NULL,
PRIMARY KEY (`Id_Tarifa_Warehouse`)
-) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los valores de gasto por almacen';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los valores de gasto por almacen';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -2914,55 +2919,55 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `analisis_ventas_update`()
-BEGIN
- DECLARE vLastMonth DATE;
-
- SET vLastMonth = util.firstDayOfMonth(TIMESTAMPADD(MONTH, -1, CURDATE()));
-
- DELETE FROM analisis_ventas
- WHERE Año > YEAR(vLastMonth)
- OR (Año = YEAR(vLastMonth) AND Mes >= MONTH(vLastMonth));
-
- INSERT INTO analisis_ventas (
- Familia,
- Reino,
- Comercial,
- Comprador,
- Provincia,
- almacen,
- Año,
- Mes,
- Semana,
- Vista,
- Importe
- )
- SELECT
- tp.Tipo AS Familia,
- r.reino AS Reino,
- tr.CodigoTrabajador AS Comercial,
- tr2.CodigoTrabajador AS Comprador,
- p.name AS Provincia,
- w.name AS almacen,
- tm.year AS Año,
- tm.month AS Mes,
- tm.week AS Semana,
- v.vista AS Vista,
- bt.importe AS Importe
- FROM bs.ventas bt
- LEFT JOIN vn2008.Tipos tp ON tp.tipo_id = bt.tipo_id
- LEFT JOIN vn2008.reinos r ON r.id = tp.reino_id
- LEFT JOIN vn2008.Clientes c on c.Id_Cliente = bt.Id_Cliente
- LEFT JOIN vn2008.Trabajadores tr ON tr.Id_Trabajador = c.Id_Trabajador
- LEFT JOIN vn2008.Trabajadores tr2 ON tr2.Id_Trabajador = tp.Id_Trabajador
- JOIN vn2008.time tm ON tm.date = bt.fecha
- JOIN vn2008.Movimientos m ON m.Id_Movimiento = bt.Id_Movimiento
- LEFT JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
- JOIN vn2008.Agencias a ON a.Id_Agencia = t.Id_Agencia
- LEFT JOIN vn2008.Vistas v ON v.vista_id = a.Vista
- LEFT JOIN vn2008.Consignatarios cs ON cs.Id_Consigna = t.Id_Consigna
- LEFT JOIN vn2008.province p ON p.province_id = cs.province_id
- LEFT JOIN vn2008.warehouse w ON w.id = t.warehouse_id
- WHERE bt.fecha >= vLastMonth AND r.mercancia;
+BEGIN
+ DECLARE vLastMonth DATE;
+
+ SET vLastMonth = util.firstDayOfMonth(TIMESTAMPADD(MONTH, -1, CURDATE()));
+
+ DELETE FROM analisis_ventas
+ WHERE Año > YEAR(vLastMonth)
+ OR (Año = YEAR(vLastMonth) AND Mes >= MONTH(vLastMonth));
+
+ INSERT INTO analisis_ventas (
+ Familia,
+ Reino,
+ Comercial,
+ Comprador,
+ Provincia,
+ almacen,
+ Año,
+ Mes,
+ Semana,
+ Vista,
+ Importe
+ )
+ SELECT
+ tp.Tipo AS Familia,
+ r.reino AS Reino,
+ tr.CodigoTrabajador AS Comercial,
+ tr2.CodigoTrabajador AS Comprador,
+ p.name AS Provincia,
+ w.name AS almacen,
+ tm.year AS Año,
+ tm.month AS Mes,
+ tm.week AS Semana,
+ v.vista AS Vista,
+ bt.importe AS Importe
+ FROM bs.ventas bt
+ LEFT JOIN vn2008.Tipos tp ON tp.tipo_id = bt.tipo_id
+ LEFT JOIN vn2008.reinos r ON r.id = tp.reino_id
+ LEFT JOIN vn2008.Clientes c on c.Id_Cliente = bt.Id_Cliente
+ LEFT JOIN vn2008.Trabajadores tr ON tr.Id_Trabajador = c.Id_Trabajador
+ LEFT JOIN vn2008.Trabajadores tr2 ON tr2.Id_Trabajador = tp.Id_Trabajador
+ JOIN vn2008.time tm ON tm.date = bt.fecha
+ JOIN vn2008.Movimientos m ON m.Id_Movimiento = bt.Id_Movimiento
+ LEFT JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
+ JOIN vn2008.Agencias a ON a.Id_Agencia = t.Id_Agencia
+ LEFT JOIN vn2008.Vistas v ON v.vista_id = a.Vista
+ LEFT JOIN vn2008.Consignatarios cs ON cs.Id_Consigna = t.Id_Consigna
+ LEFT JOIN vn2008.province p ON p.province_id = cs.province_id
+ LEFT JOIN vn2008.warehouse w ON w.id = t.warehouse_id
+ WHERE bt.fecha >= vLastMonth AND r.mercancia;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -2980,33 +2985,33 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `call_add`()
-BEGIN
- DECLARE datSTART DATETIME DEFAULT '2012-03-01'/*CURDATE()*/ ;
-
- -- Seleccionamos la ultima fecha introducida
- SELECT MAX(Fecha) INTO datSTART FROM `call`;
-
- -- Borramos todas las entradas del dia datSTART por si hubiese registros nuevos
- DELETE FROM `call` WHERE Fecha = datSTART;
-
- INSERT INTO bi.`call`(CodTrabajadorCartera,CodTrabajadorTelefono,dur_in,dur_out,Fecha,`year`,`month`,`week`,`hour`,phone)
- SELECT vn2008.Averiguar_ComercialCliente(pb.Id_Cliente,Fecha) CodTrabajadorCartera,ll.CodigoTrabajador, dur_in,
- dur_out, ll.Fecha,YEAR(ll.Fecha) `year`, MONTH(ll.Fecha) `month`,WEEK(ll.Fecha,7) `week`, Hora,phone
- FROM (
- SELECT Id_Trabajador,CodigoTrabajador, IFNULL(billsec,0) dur_in, 0 dur_out, 1 as Recibidas, NULL as Emitidas, calldate as Fecha,
- hour(calldate) as Hora,src as phone
- FROM vn2008.Trabajadores T
- JOIN vn2008.cdr C ON C.dstchannel LIKE CONCAT('%', T.extension, '%')
- WHERE calldate >= datSTART AND LENGTH(C.src) >=9 AND disposition = 'ANSWERED' AND duration
- UNION ALL
- SELECT Id_Trabajador,CodigoTrabajador,0 dur_in, IFNULL(billsec,0) dur_out, NULL as Recibidas, 1 as Emitidas, date(calldate), hour(calldate),dst
- FROM vn2008.Trabajadores T
- JOIN vn2008.cdr C ON C.src = T.extension
- WHERE calldate >= datSTART AND LENGTH(C.dst) >=9 AND disposition = 'ANSWERED' AND duration
- ) ll
- JOIN vn2008.Permisos USING(Id_Trabajador)
- LEFT JOIN vn2008.v_phonebook pb ON pb.Telefono = ll.phone
- WHERE Id_Grupo = 6;
+BEGIN
+ DECLARE datSTART DATETIME DEFAULT '2012-03-01'/*CURDATE()*/ ;
+
+ -- Seleccionamos la ultima fecha introducida
+ SELECT MAX(Fecha) INTO datSTART FROM `call`;
+
+ -- Borramos todas las entradas del dia datSTART por si hubiese registros nuevos
+ DELETE FROM `call` WHERE Fecha = datSTART;
+
+ INSERT INTO bi.`call`(CodTrabajadorCartera,CodTrabajadorTelefono,dur_in,dur_out,Fecha,`year`,`month`,`week`,`hour`,phone)
+ SELECT vn2008.Averiguar_ComercialCliente(pb.Id_Cliente,Fecha) CodTrabajadorCartera,ll.CodigoTrabajador, dur_in,
+ dur_out, ll.Fecha,YEAR(ll.Fecha) `year`, MONTH(ll.Fecha) `month`,WEEK(ll.Fecha,7) `week`, Hora,phone
+ FROM (
+ SELECT Id_Trabajador,CodigoTrabajador, IFNULL(billsec,0) dur_in, 0 dur_out, 1 as Recibidas, NULL as Emitidas, calldate as Fecha,
+ hour(calldate) as Hora,src as phone
+ FROM vn2008.Trabajadores T
+ JOIN vn2008.cdr C ON C.dstchannel LIKE CONCAT('%', T.extension, '%')
+ WHERE calldate >= datSTART AND LENGTH(C.src) >=9 AND disposition = 'ANSWERED' AND duration
+ UNION ALL
+ SELECT Id_Trabajador,CodigoTrabajador,0 dur_in, IFNULL(billsec,0) dur_out, NULL as Recibidas, 1 as Emitidas, date(calldate), hour(calldate),dst
+ FROM vn2008.Trabajadores T
+ JOIN vn2008.cdr C ON C.src = T.extension
+ WHERE calldate >= datSTART AND LENGTH(C.dst) >=9 AND disposition = 'ANSWERED' AND duration
+ ) ll
+ JOIN vn2008.Permisos USING(Id_Trabajador)
+ LEFT JOIN vn2008.v_phonebook pb ON pb.Telefono = ll.phone
+ WHERE Id_Grupo = 6;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -3024,205 +3029,205 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `claim_ratio_routine`()
-BEGIN
- DECLARE vMonthToRefund INT DEFAULT 4;
-
- /*
- * PAK 2015-11-20
- * Se trata de añadir a la tabla Greuges todos los
- * cargos que luego vamos a utilizar para calcular el recobro
- */
-
- -- descuentos comerciales COD 11
-
- INSERT INTO vn2008.Greuges(Fecha, Id_Cliente, Comentario, Importe, Id_Ticket)
- SELECT Fecha, Id_Cliente, Concat('COD11 : ',Concepte), - round(Cantidad *
- Preu * (100 - Descuento) / 100 ,2) AS Importe, t.Id_Ticket
- FROM vn2008.Tickets t
- JOIN vn2008.Movimientos m ON m.Id_Ticket = t.Id_Ticket
- WHERE Id_Article = 11
- AND Concepte NOT LIKE '$%'
- AND Fecha > '2014-01-01'
- HAVING nz(Importe) <> 0;
-
- DELETE mc.*
- FROM vn2008.Movimientos_componentes mc
- JOIN vn2008.Movimientos m ON m.Id_Movimiento = mc.Id_Movimiento
- JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
- WHERE m.Id_Article = 11
- AND m.Concepte NOT LIKE '$%'
- AND t.Fecha > '2017-01-01';
-
- INSERT INTO vn2008.Movimientos_componentes(Id_Movimiento, Id_Componente, Valor)
- SELECT m.Id_Movimiento, 34, round(m.Preu * (100 - m.Descuento)/100,4)
- FROM vn2008.Movimientos m
- JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
- WHERE m.Id_Article = 11
- AND m.Concepte NOT LIKE '$%'
- AND t.Fecha > '2017-01-01';
-
- UPDATE vn2008.Movimientos m
- JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
- SET Concepte = CONCAT('$ ',Concepte)
- WHERE Id_Article = 11
- AND Concepte NOT LIKE '$%'
- AND Fecha > '2014-01-01';
-
- -- Reclamaciones demasiado sensibles
-
- INSERT INTO vn2008.Greuges(Fecha, Id_Cliente, Comentario,
- Importe, Greuges_type_id,Id_Ticket)
- SELECT cm.Fecha
- , cm.Id_Cliente
- , concat('Claim ',cm.id,' : ', m.Concepte)
- ,round( -1 * ((sensib -1)/4) * Cantidad *
- Preu * (100 - Descuento) / 100, 2) AS Reclamaciones
- , 4
- , m.Id_Ticket
- FROM vn2008.Movimientos m
- JOIN vn2008.cl_act ca USING(Id_Movimiento)
- JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
- WHERE ca.cl_sol_id NOT IN (1,5)
- AND ca.greuge = 0
- AND cm.cl_est_id = 3;
-
- -- Reclamaciones que pasan a Maná
-
- INSERT INTO vn2008.Greuges(Fecha, Id_Cliente, Comentario,
- Importe , Greuges_type_id,Id_Ticket)
- SELECT cm.Fecha
- , cm.Id_Cliente
- , concat('Claim_mana ',cm.id,' : ', m.Concepte)
- ,round( ((sensib -1)/4) * Cantidad * Preu * (100 - Descuento) / 100, 2)
- AS Reclamaciones
- ,3
- ,m.Id_Ticket
- FROM vn2008.Movimientos m
- JOIN vn2008.cl_act ca USING(Id_Movimiento)
- JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
- WHERE ca.cl_sol_id NOT IN (1,5)
- AND ca.greuge = 0
- AND cm.cl_est_id = 3
- AND cm.mana;
-
- -- Marcamos para no repetir
- UPDATE vn2008.cl_act ca
- JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
- SET greuge = 1
- WHERE ca.cl_sol_id NOT IN (1,5)
- AND ca.greuge = 0
- AND cm.cl_est_id = 3;
-
- -- Recobros
-
- DROP TEMPORARY TABLE IF EXISTS tmp.ticket_list;
- CREATE TEMPORARY TABLE tmp.ticket_list
- (PRIMARY KEY (Id_Ticket))
- SELECT DISTINCT t.Id_Ticket
- FROM vn2008.Movimientos_componentes mc
- JOIN vn2008.Movimientos m ON mc.Id_Movimiento = m.Id_Movimiento
- JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
- JOIN vn2008.Tickets_state ts ON ts.Id_Ticket = t.Id_Ticket
- JOIN vncontrol.inter i ON i.inter_id = ts.inter_id
- JOIN vn2008.state s ON s.id = i.state_id
- WHERE mc.Id_Componente = 17
- AND mc.greuge = 0
- AND t.Fecha >= '2016-10-01'
- AND t.Fecha < CURDATE()
- AND s.alert_level >= 3;
-
- DELETE g.*
- FROM vn2008.Greuges g
- JOIN tmp.ticket_list t ON g.Id_Ticket = t.Id_Ticket
- WHERE Greuges_type_id = 2;
-
- INSERT INTO vn2008.Greuges (Id_Cliente,Comentario,Importe,Fecha,
- Greuges_type_id, Id_Ticket)
- SELECT Id_Cliente
- ,concat('recobro ', m.Id_Ticket), - round(SUM(mc.Valor*Cantidad),2)
- AS dif
- ,date(t.Fecha)
- , 2
- ,tt.Id_Ticket
- FROM vn2008.Movimientos m
- JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
- JOIN tmp.ticket_list tt ON tt.Id_Ticket = t.Id_Ticket
- JOIN vn2008.Movimientos_componentes mc
- ON mc.Id_Movimiento = m.Id_Movimiento AND mc.Id_Componente = 17
- GROUP BY t.Id_Ticket
- HAVING ABS(dif) > 1;
-
- UPDATE vn2008.Movimientos_componentes mc
- JOIN vn2008.Movimientos m ON m.Id_Movimiento = mc.Id_Movimiento
- JOIN tmp.ticket_list tt ON tt.Id_Ticket = m.Id_Ticket
- SET greuge = 1
- WHERE Id_Componente = 17;
-
- /*
- * Recalculamos la ratio de las reclamaciones, que luego
- * se va a utilizar en el recobro
- */
-
- REPLACE bi.claims_ratio(Id_Cliente, Consumo, Reclamaciones, Ratio, recobro)
- SELECT Id_Cliente, 0,0,0,0
- FROM vn2008.Clientes;
-
- REPLACE bi.claims_ratio(Id_Cliente, Consumo, Reclamaciones, Ratio, recobro)
- SELECT fm.Id_Cliente, 12 * fm.Consumo, Reclamaciones,
- round(Reclamaciones / (12*fm.Consumo),4) AS Ratio, 0
- FROM bi.facturacion_media_anual fm
- LEFT JOIN(
- SELECT cm.Id_Cliente, round(sum(-1 * ((sensib -1)/4) *
- Cantidad * Preu * (100 - Descuento) / 100))
- AS Reclamaciones
- FROM vn2008.Movimientos m
- JOIN vn2008.cl_act ca
- ON ca.Id_Movimiento = m.Id_Movimiento
- JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
- WHERE ca.cl_sol_id NOT IN (1,5)
- AND cm.cl_est_id = 3
- AND cm.Fecha >= TIMESTAMPADD(YEAR, -1, CURDATE())
- GROUP BY cm.Id_Cliente
- ) claims ON claims.Id_Cliente = fm.Id_Cliente;
-
-
- -- Calculamos el porcentaje del recobro para añadirlo al precio de venta
- UPDATE bi.claims_ratio cr
- JOIN (
- SELECT Id_Cliente, nz(SUM(Importe)) AS Greuge
- FROM vn2008.Greuges
- WHERE Fecha <= CURDATE()
- GROUP BY Id_Cliente
- ) g ON g.Id_Cliente = cr.Id_Cliente
- SET recobro = GREATEST(0,round(nz(Greuge) /
- (nz(Consumo) * vMonthToRefund / 12 ) ,3));
-
- -- Protección neonatos
- UPDATE bi.claims_ratio cr
- JOIN vn.firstTicketShipped fts ON fts.clientFk = cr.Id_Cliente
- SET recobro = 0, Ratio = 0
- WHERE fts.shipped > TIMESTAMPADD(MONTH,-1,CURDATE());
-
- -- CLIENTE 7983, JULIAN SUAU
- UPDATE bi.claims_ratio SET recobro = LEAST(0.05, recobro) WHERE Id_Cliente = 7983;
-
- -- CLIENTE 4358
- UPDATE bi.claims_ratio SET recobro = GREATEST(0.05, recobro) WHERE Id_Cliente = 4358;
-
- -- CLIENTE 5523, VERDECORA
+BEGIN
+ DECLARE vMonthToRefund INT DEFAULT 4;
+
+ /*
+ * PAK 2015-11-20
+ * Se trata de añadir a la tabla Greuges todos los
+ * cargos que luego vamos a utilizar para calcular el recobro
+ */
+
+ -- descuentos comerciales COD 11
+
+ INSERT INTO vn2008.Greuges(Fecha, Id_Cliente, Comentario, Importe, Id_Ticket)
+ SELECT Fecha, Id_Cliente, Concat('COD11 : ',Concepte), - round(Cantidad *
+ Preu * (100 - Descuento) / 100 ,2) AS Importe, t.Id_Ticket
+ FROM vn2008.Tickets t
+ JOIN vn2008.Movimientos m ON m.Id_Ticket = t.Id_Ticket
+ WHERE Id_Article = 11
+ AND Concepte NOT LIKE '$%'
+ AND Fecha > '2014-01-01'
+ HAVING nz(Importe) <> 0;
+
+ DELETE mc.*
+ FROM vn2008.Movimientos_componentes mc
+ JOIN vn2008.Movimientos m ON m.Id_Movimiento = mc.Id_Movimiento
+ JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
+ WHERE m.Id_Article = 11
+ AND m.Concepte NOT LIKE '$%'
+ AND t.Fecha > '2017-01-01';
+
+ INSERT INTO vn2008.Movimientos_componentes(Id_Movimiento, Id_Componente, Valor)
+ SELECT m.Id_Movimiento, 34, round(m.Preu * (100 - m.Descuento)/100,4)
+ FROM vn2008.Movimientos m
+ JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
+ WHERE m.Id_Article = 11
+ AND m.Concepte NOT LIKE '$%'
+ AND t.Fecha > '2017-01-01';
+
+ UPDATE vn2008.Movimientos m
+ JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
+ SET Concepte = CONCAT('$ ',Concepte)
+ WHERE Id_Article = 11
+ AND Concepte NOT LIKE '$%'
+ AND Fecha > '2014-01-01';
+
+ -- Reclamaciones demasiado sensibles
+
+ INSERT INTO vn2008.Greuges(Fecha, Id_Cliente, Comentario,
+ Importe, Greuges_type_id,Id_Ticket)
+ SELECT cm.Fecha
+ , cm.Id_Cliente
+ , concat('Claim ',cm.id,' : ', m.Concepte)
+ ,round( -1 * ((sensib -1)/4) * Cantidad *
+ Preu * (100 - Descuento) / 100, 2) AS Reclamaciones
+ , 4
+ , m.Id_Ticket
+ FROM vn2008.Movimientos m
+ JOIN vn2008.cl_act ca USING(Id_Movimiento)
+ JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
+ WHERE ca.cl_sol_id NOT IN (1,5)
+ AND ca.greuge = 0
+ AND cm.cl_est_id = 3;
+
+ -- Reclamaciones que pasan a Maná
+
+ INSERT INTO vn2008.Greuges(Fecha, Id_Cliente, Comentario,
+ Importe , Greuges_type_id,Id_Ticket)
+ SELECT cm.Fecha
+ , cm.Id_Cliente
+ , concat('Claim_mana ',cm.id,' : ', m.Concepte)
+ ,round( ((sensib -1)/4) * Cantidad * Preu * (100 - Descuento) / 100, 2)
+ AS Reclamaciones
+ ,3
+ ,m.Id_Ticket
+ FROM vn2008.Movimientos m
+ JOIN vn2008.cl_act ca USING(Id_Movimiento)
+ JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
+ WHERE ca.cl_sol_id NOT IN (1,5)
+ AND ca.greuge = 0
+ AND cm.cl_est_id = 3
+ AND cm.mana;
+
+ -- Marcamos para no repetir
+ UPDATE vn2008.cl_act ca
+ JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
+ SET greuge = 1
+ WHERE ca.cl_sol_id NOT IN (1,5)
+ AND ca.greuge = 0
+ AND cm.cl_est_id = 3;
+
+ -- Recobros
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.ticket_list;
+ CREATE TEMPORARY TABLE tmp.ticket_list
+ (PRIMARY KEY (Id_Ticket))
+ SELECT DISTINCT t.Id_Ticket
+ FROM vn2008.Movimientos_componentes mc
+ JOIN vn2008.Movimientos m ON mc.Id_Movimiento = m.Id_Movimiento
+ JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
+ JOIN vn2008.Tickets_state ts ON ts.Id_Ticket = t.Id_Ticket
+ JOIN vncontrol.inter i ON i.inter_id = ts.inter_id
+ JOIN vn2008.state s ON s.id = i.state_id
+ WHERE mc.Id_Componente = 17
+ AND mc.greuge = 0
+ AND t.Fecha >= '2016-10-01'
+ AND t.Fecha < CURDATE()
+ AND s.alert_level >= 3;
+
+ DELETE g.*
+ FROM vn2008.Greuges g
+ JOIN tmp.ticket_list t ON g.Id_Ticket = t.Id_Ticket
+ WHERE Greuges_type_id = 2;
+
+ INSERT INTO vn2008.Greuges (Id_Cliente,Comentario,Importe,Fecha,
+ Greuges_type_id, Id_Ticket)
+ SELECT Id_Cliente
+ ,concat('recobro ', m.Id_Ticket), - round(SUM(mc.Valor*Cantidad),2)
+ AS dif
+ ,date(t.Fecha)
+ , 2
+ ,tt.Id_Ticket
+ FROM vn2008.Movimientos m
+ JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
+ JOIN tmp.ticket_list tt ON tt.Id_Ticket = t.Id_Ticket
+ JOIN vn2008.Movimientos_componentes mc
+ ON mc.Id_Movimiento = m.Id_Movimiento AND mc.Id_Componente = 17
+ GROUP BY t.Id_Ticket
+ HAVING ABS(dif) > 1;
+
+ UPDATE vn2008.Movimientos_componentes mc
+ JOIN vn2008.Movimientos m ON m.Id_Movimiento = mc.Id_Movimiento
+ JOIN tmp.ticket_list tt ON tt.Id_Ticket = m.Id_Ticket
+ SET greuge = 1
+ WHERE Id_Componente = 17;
+
+ /*
+ * Recalculamos la ratio de las reclamaciones, que luego
+ * se va a utilizar en el recobro
+ */
+
+ REPLACE bi.claims_ratio(Id_Cliente, Consumo, Reclamaciones, Ratio, recobro)
+ SELECT Id_Cliente, 0,0,0,0
+ FROM vn2008.Clientes;
+
+ REPLACE bi.claims_ratio(Id_Cliente, Consumo, Reclamaciones, Ratio, recobro)
+ SELECT fm.Id_Cliente, 12 * fm.Consumo, Reclamaciones,
+ round(Reclamaciones / (12*fm.Consumo),4) AS Ratio, 0
+ FROM bi.facturacion_media_anual fm
+ LEFT JOIN(
+ SELECT cm.Id_Cliente, round(sum(-1 * ((sensib -1)/4) *
+ Cantidad * Preu * (100 - Descuento) / 100))
+ AS Reclamaciones
+ FROM vn2008.Movimientos m
+ JOIN vn2008.cl_act ca
+ ON ca.Id_Movimiento = m.Id_Movimiento
+ JOIN vn2008.cl_main cm ON cm.id = ca.cl_main_id
+ WHERE ca.cl_sol_id NOT IN (1,5)
+ AND cm.cl_est_id = 3
+ AND cm.Fecha >= TIMESTAMPADD(YEAR, -1, CURDATE())
+ GROUP BY cm.Id_Cliente
+ ) claims ON claims.Id_Cliente = fm.Id_Cliente;
+
+
+ -- Calculamos el porcentaje del recobro para añadirlo al precio de venta
+ UPDATE bi.claims_ratio cr
+ JOIN (
+ SELECT Id_Cliente, nz(SUM(Importe)) AS Greuge
+ FROM vn2008.Greuges
+ WHERE Fecha <= CURDATE()
+ GROUP BY Id_Cliente
+ ) g ON g.Id_Cliente = cr.Id_Cliente
+ SET recobro = GREATEST(0,round(nz(Greuge) /
+ (nz(Consumo) * vMonthToRefund / 12 ) ,3));
+
+ -- Protección neonatos
+ UPDATE bi.claims_ratio cr
+ JOIN vn.firstTicketShipped fts ON fts.clientFk = cr.Id_Cliente
+ SET recobro = 0, Ratio = 0
+ WHERE fts.shipped > TIMESTAMPADD(MONTH,-1,CURDATE());
+
+ -- CLIENTE 7983, JULIAN SUAU
+ UPDATE bi.claims_ratio SET recobro = LEAST(0.05, recobro) WHERE Id_Cliente = 7983;
+
+ -- CLIENTE 4358
+ UPDATE bi.claims_ratio SET recobro = GREATEST(0.05, recobro) WHERE Id_Cliente = 4358;
+
+ -- CLIENTE 5523, VERDECORA
UPDATE bi.claims_ratio SET recobro = GREATEST(0.12, recobro) WHERE Id_Cliente = 5523;
-- CLIENTE 15979, SERVEIS VETERINARIS
- UPDATE bi.claims_ratio SET recobro = GREATEST(0.05, recobro) WHERE Id_Cliente = 15979;
-
- -- CLIENTE 5189 i 8942, son de CSR i son el mateix client
- UPDATE bi.claims_ratio cr
- JOIN (SELECT sum(Consumo * recobro)/sum(Consumo) as recobro
- FROM bi.claims_ratio
- WHERE Id_Cliente IN ( 5189,8942)
- ) sub
- SET cr.recobro = sub.recobro
- WHERE Id_Cliente IN ( 5189,8942);
+ UPDATE bi.claims_ratio SET recobro = GREATEST(0.05, recobro) WHERE Id_Cliente = 15979;
+
+ -- CLIENTE 5189 i 8942, son de CSR i son el mateix client
+ UPDATE bi.claims_ratio cr
+ JOIN (SELECT sum(Consumo * recobro)/sum(Consumo) as recobro
+ FROM bi.claims_ratio
+ WHERE Id_Cliente IN ( 5189,8942)
+ ) sub
+ SET cr.recobro = sub.recobro
+ WHERE Id_Cliente IN ( 5189,8942);
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -3240,23 +3245,23 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clean`()
-BEGIN
- DECLARE vDateShort DATETIME;
- DECLARE vDateLong DATETIME;
- DECLARE vOneYearAgo DATETIME;
-
- SET vDateShort = TIMESTAMPADD(MONTH, -2, CURDATE());
- SET vDateLong = TIMESTAMPADD(MONTH, -18,CURDATE());
- SET vOneYearAgo = TIMESTAMPADD(YEAR, -1,CURDATE());
-
- -- DELETE FROM bi.comparativa_clientes WHERE Fecha < vDateLong;
-
- DELETE FROM bi.Greuge_Evolution
- WHERE (Fecha < vDateShort AND weekday(Fecha) != 1)
- OR Fecha < vOneYearAgo;
-
- DELETE FROM bi.defaulters WHERE `date` < vDateLong;
- DELETE FROM bi.defaulting WHERE `date` < vDateLong;
+BEGIN
+ DECLARE vDateShort DATETIME;
+ DECLARE vDateLong DATETIME;
+ DECLARE vOneYearAgo DATETIME;
+
+ SET vDateShort = TIMESTAMPADD(MONTH, -2, CURDATE());
+ SET vDateLong = TIMESTAMPADD(MONTH, -18,CURDATE());
+ SET vOneYearAgo = TIMESTAMPADD(YEAR, -1,CURDATE());
+
+ -- DELETE FROM bi.comparativa_clientes WHERE Fecha < vDateLong;
+
+ DELETE FROM bi.Greuge_Evolution
+ WHERE (Fecha < vDateShort AND weekday(Fecha) != 1)
+ OR Fecha < vOneYearAgo;
+
+ DELETE FROM bi.defaulters WHERE `date` < vDateLong;
+ DELETE FROM bi.defaulting WHERE `date` < vDateLong;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -3734,18 +3739,18 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `facturacion_media_anual_update`()
-BEGIN
- TRUNCATE TABLE bi.facturacion_media_anual;
-
- REPLACE bi.facturacion_media_anual(Id_Cliente, Consumo)
- SELECT clientFk, avg(Facturacion)
- FROM (
- SELECT clientFk, YEAR(issued) year, MONTH(issued) month, sum(amount) as Facturacion
- FROM vn.invoiceOut
- WHERE issued BETWEEN TIMESTAMPADD(YEAR,-1,CURDATE()) AND TIMESTAMPADD(DAY, - DAY(CURDATE()),CURDATE())
- GROUP BY clientFk, year, month
- ) vol
- GROUP BY clientFk;
+BEGIN
+ TRUNCATE TABLE bi.facturacion_media_anual;
+
+ REPLACE bi.facturacion_media_anual(Id_Cliente, Consumo)
+ SELECT clientFk, avg(Facturacion)
+ FROM (
+ SELECT clientFk, YEAR(issued) year, MONTH(issued) month, sum(amount) as Facturacion
+ FROM vn.invoiceOut
+ WHERE issued BETWEEN TIMESTAMPADD(YEAR,-1,CURDATE()) AND TIMESTAMPADD(DAY, - DAY(CURDATE()),CURDATE())
+ GROUP BY clientFk, year, month
+ ) vol
+ GROUP BY clientFk;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -3865,116 +3870,116 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `Greuge_Evolution_Add`()
-BEGIN
-/*
- Inserta en la tabla Greuge_Evolution el saldo acumulado de cada cliente,
- así como las ventas acumuladas en los ultimos 365 dias, para poder controlar
- su evolucion.
-*/
- DECLARE datFEC DATE;
- DECLARE datFEC_TOMORROW DATE;
- DECLARE datFEC_LASTYEAR DATE;
-
- DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN
-
- GET DIAGNOSTICS CONDITION 2 @errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
- SELECT CONCAT('ERROR ', IFNULL(@errno,0), ': ', ifnull(@text,'texto'));
- INSERT INTO vn2008.mail (`to`,`subject`,`text`) VALUES ('jgallego@verdnatura.es', 'Greuge_Evolution_Add' ,CONCAT('ERROR ', IFNULL(@errno,0), ': ', ifnull(@text,'texto')));
- INSERT INTO vn2008.mail (`to`,`subject`,`text`) VALUES ('pako@verdnatura.es', 'Greuge_Evolution_Add' ,CONCAT('ERROR ', IFNULL(@errno,0), ': ', ifnull(@text,'texto')));
-
- END;
-
- SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
+BEGIN
+/*
+ Inserta en la tabla Greuge_Evolution el saldo acumulado de cada cliente,
+ así como las ventas acumuladas en los ultimos 365 dias, para poder controlar
+ su evolucion.
+*/
+ DECLARE datFEC DATE;
+ DECLARE datFEC_TOMORROW DATE;
+ DECLARE datFEC_LASTYEAR DATE;
+
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION BEGIN
+
+ GET DIAGNOSTICS CONDITION 2 @errno = MYSQL_ERRNO, @text = MESSAGE_TEXT;
+ SELECT CONCAT('ERROR ', IFNULL(@errno,0), ': ', ifnull(@text,'texto'));
+ INSERT INTO vn2008.mail (`to`,`subject`,`text`) VALUES ('jgallego@verdnatura.es', 'Greuge_Evolution_Add' ,CONCAT('ERROR ', IFNULL(@errno,0), ': ', ifnull(@text,'texto')));
+ INSERT INTO vn2008.mail (`to`,`subject`,`text`) VALUES ('pako@verdnatura.es', 'Greuge_Evolution_Add' ,CONCAT('ERROR ', IFNULL(@errno,0), ': ', ifnull(@text,'texto')));
+
+ END;
+
+ SET TRANSACTION ISOLATION LEVEL READ UNCOMMITTED;
DELETE FROM bi.Greuge_Evolution WHERE Fecha >= TIMESTAMPADD(MONTH,-1,CURDATE());
-
- SELECT TIMESTAMPADD(DAY,1,MAX(Fecha)),
- TIMESTAMPADD(DAY,2,MAX(Fecha))
- INTO datFEC,
- datFEC_TOMORROW
- FROM bi.Greuge_Evolution;
-
- SET datFEC_LASTYEAR = TIMESTAMPADD(YEAR,-1,datFEC);
-
- DELETE FROM bi.Greuge_Evolution WHERE Fecha >= datFEC;
-
- DROP TEMPORARY TABLE IF EXISTS maxInvoice;
-
- CREATE TEMPORARY TABLE maxInvoice
- (PRIMARY KEY (Id_Cliente))
- ENGINE = MEMORY
- SELECT DISTINCT Id_Cliente, max(Fecha) as maxFecha
- FROM vn2008.Facturas
- GROUP BY Id_Cliente
- HAVING maxFecha < timestampadd(month,-2,datFEC);
-
- WHILE datFEC < CURDATE() DO
-
- REPLACE bi.Greuge_Evolution(Id_Cliente, Fecha, Greuge, Ventas, Fosil)
-
- SELECT Id_Cliente, datFEC as Fecha, Greuge, Ventas, 0
- FROM (
- SELECT Id_Cliente, sum(Importe) as Greuge
- FROM vn2008.Greuges
- where Fecha <= datFEC
- group by Id_Cliente
- ) sub
- RIGHT JOIN
-
- (
-
- SELECT Id_Cliente, sum(Ventas) as Ventas
- FROM
- (
-
- SELECT Id_Cliente, IF (fecha != datFEC, -1,1) * (importe + recargo) as Ventas
- FROM bs.ventas
- WHERE fecha = datFEC or fecha = datFEC_LASTYEAR
-
- UNION ALL
-
- SELECT Id_Cliente, Ventas
- FROM bi.Greuge_Evolution
- WHERE Fecha = TIMESTAMPADD(DAY, -1, datFEC)
-
- ) sub
- group by Id_Cliente
-
- ) v using(Id_Cliente)
- ;
-
- -- Ahora calcularemos el greuge muerto
-
- UPDATE bi.Greuge_Evolution ge
- JOIN maxInvoice m using(Id_Cliente)
- SET FOSIL = GREUGE
- WHERE m.maxFecha < TIMESTAMPADD(MONTH,-2,ge.Fecha);
-
- -- Recobro
-
- UPDATE bi.Greuge_Evolution ge
- JOIN (
- SELECT cs.Id_Cliente, sum(Valor * Cantidad) as Importe
- FROM vn2008.Tickets t
- JOIN vn2008.Consignatarios cs on cs.Id_Consigna = t.Id_Consigna
- JOIN vn2008.Movimientos m on m.Id_Ticket = t.Id_Ticket
- JOIN vn2008.Movimientos_componentes mc on mc.Id_Movimiento = m.Id_Movimiento
- WHERE t.Fecha >= datFEC
- AND t.Fecha < datFEC_TOMORROW
- AND mc.Id_Componente = 17 -- Recobro
- GROUP BY cs.Id_Cliente
- ) sub using(Id_Cliente)
- SET Recobro = Importe
- WHERE ge.Fecha = datFEC;
-
- SET datFEC = datFEC_TOMORROW;
- SET datFEC_TOMORROW = TIMESTAMPADD(DAY,1,datFEC_TOMORROW);
- SET datFEC_LASTYEAR = TIMESTAMPADD(YEAR,-1,datFEC);
-
-
- END WHILE;
-
- DROP TEMPORARY TABLE IF EXISTS maxInvoice;
+
+ SELECT TIMESTAMPADD(DAY,1,MAX(Fecha)),
+ TIMESTAMPADD(DAY,2,MAX(Fecha))
+ INTO datFEC,
+ datFEC_TOMORROW
+ FROM bi.Greuge_Evolution;
+
+ SET datFEC_LASTYEAR = TIMESTAMPADD(YEAR,-1,datFEC);
+
+ DELETE FROM bi.Greuge_Evolution WHERE Fecha >= datFEC;
+
+ DROP TEMPORARY TABLE IF EXISTS maxInvoice;
+
+ CREATE TEMPORARY TABLE maxInvoice
+ (PRIMARY KEY (Id_Cliente))
+ ENGINE = MEMORY
+ SELECT DISTINCT Id_Cliente, max(Fecha) as maxFecha
+ FROM vn2008.Facturas
+ GROUP BY Id_Cliente
+ HAVING maxFecha < timestampadd(month,-2,datFEC);
+
+ WHILE datFEC < CURDATE() DO
+
+ REPLACE bi.Greuge_Evolution(Id_Cliente, Fecha, Greuge, Ventas, Fosil)
+
+ SELECT Id_Cliente, datFEC as Fecha, Greuge, Ventas, 0
+ FROM (
+ SELECT Id_Cliente, sum(Importe) as Greuge
+ FROM vn2008.Greuges
+ where Fecha <= datFEC
+ group by Id_Cliente
+ ) sub
+ RIGHT JOIN
+
+ (
+
+ SELECT Id_Cliente, sum(Ventas) as Ventas
+ FROM
+ (
+
+ SELECT Id_Cliente, IF (fecha != datFEC, -1,1) * (importe + recargo) as Ventas
+ FROM bs.ventas
+ WHERE fecha = datFEC or fecha = datFEC_LASTYEAR
+
+ UNION ALL
+
+ SELECT Id_Cliente, Ventas
+ FROM bi.Greuge_Evolution
+ WHERE Fecha = TIMESTAMPADD(DAY, -1, datFEC)
+
+ ) sub
+ group by Id_Cliente
+
+ ) v using(Id_Cliente)
+ ;
+
+ -- Ahora calcularemos el greuge muerto
+
+ UPDATE bi.Greuge_Evolution ge
+ JOIN maxInvoice m using(Id_Cliente)
+ SET FOSIL = GREUGE
+ WHERE m.maxFecha < TIMESTAMPADD(MONTH,-2,ge.Fecha);
+
+ -- Recobro
+
+ UPDATE bi.Greuge_Evolution ge
+ JOIN (
+ SELECT cs.Id_Cliente, sum(Valor * Cantidad) as Importe
+ FROM vn2008.Tickets t
+ JOIN vn2008.Consignatarios cs on cs.Id_Consigna = t.Id_Consigna
+ JOIN vn2008.Movimientos m on m.Id_Ticket = t.Id_Ticket
+ JOIN vn2008.Movimientos_componentes mc on mc.Id_Movimiento = m.Id_Movimiento
+ WHERE t.Fecha >= datFEC
+ AND t.Fecha < datFEC_TOMORROW
+ AND mc.Id_Componente = 17 -- Recobro
+ GROUP BY cs.Id_Cliente
+ ) sub using(Id_Cliente)
+ SET Recobro = Importe
+ WHERE ge.Fecha = datFEC;
+
+ SET datFEC = datFEC_TOMORROW;
+ SET datFEC_TOMORROW = TIMESTAMPADD(DAY,1,datFEC_TOMORROW);
+ SET datFEC_LASTYEAR = TIMESTAMPADD(YEAR,-1,datFEC);
+
+
+ END WHILE;
+
+ DROP TEMPORARY TABLE IF EXISTS maxInvoice;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -4058,10 +4063,10 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `nigthlyAnalisisVentas`()
-BEGIN
- CALL analisis_ventas_update;
- CALL analisis_ventas_simple;
- CALL analisis_ventas_evolution_add;
+BEGIN
+ CALL analisis_ventas_update;
+ CALL analisis_ventas_simple;
+ CALL analisis_ventas_evolution_add;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -4849,13 +4854,13 @@ CREATE DATABASE /*!32312 IF NOT EXISTS*/ `bs` /*!40100 DEFAULT CHARACTER SET utf
USE `bs`;
--
--- Temporary view structure for view `bajasLaborales`
+-- Temporary table structure for view `bajasLaborales`
--
DROP TABLE IF EXISTS `bajasLaborales`;
/*!50001 DROP VIEW IF EXISTS `bajasLaborales`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `bajasLaborales` AS SELECT
1 AS `firstname`,
1 AS `name`,
@@ -4873,7 +4878,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `bancos_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bancos_evolution` (
`Fecha` date NOT NULL,
`Id_Banco` int(11) NOT NULL,
@@ -4895,7 +4900,7 @@ CREATE TABLE `bancos_evolution` (
DROP TABLE IF EXISTS `carteras`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `carteras` (
`CodigoTrabajador` varchar(3) CHARACTER SET latin1 NOT NULL,
`Año` int(11) NOT NULL,
@@ -4911,7 +4916,7 @@ CREATE TABLE `carteras` (
DROP TABLE IF EXISTS `clientDied`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientDied` (
`id` int(11) NOT NULL DEFAULT '0',
`clientName` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -4929,7 +4934,7 @@ CREATE TABLE `clientDied` (
DROP TABLE IF EXISTS `clientNewBorn`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientNewBorn` (
`clientFk` int(11) NOT NULL,
`shipped` date NOT NULL,
@@ -4944,7 +4949,7 @@ CREATE TABLE `clientNewBorn` (
DROP TABLE IF EXISTS `compradores`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compradores` (
`Id_Trabajador` int(11) NOT NULL,
`año` int(4) NOT NULL,
@@ -4962,7 +4967,7 @@ CREATE TABLE `compradores` (
DROP TABLE IF EXISTS `compradores_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `compradores_evolution` (
`Id_Trabajador` int(11) NOT NULL,
`fecha` date NOT NULL,
@@ -4978,7 +4983,7 @@ CREATE TABLE `compradores_evolution` (
DROP TABLE IF EXISTS `experienceIberflora2016`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `experienceIberflora2016` (
`Id_Cliente` int(11) NOT NULL,
`isVisitor` tinyint(4) NOT NULL DEFAULT '0',
@@ -4992,7 +4997,7 @@ CREATE TABLE `experienceIberflora2016` (
DROP TABLE IF EXISTS `fondo_maniobra`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fondo_maniobra` (
`fecha` date NOT NULL,
`fondo` double DEFAULT NULL,
@@ -5011,7 +5016,7 @@ CREATE TABLE `fondo_maniobra` (
DROP TABLE IF EXISTS `indicators`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `indicators` (
`updated` date NOT NULL,
`lastYearSales` int(11) DEFAULT NULL,
@@ -5039,13 +5044,13 @@ CREATE TABLE `indicators` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `lastIndicators`
+-- Temporary table structure for view `lastIndicators`
--
DROP TABLE IF EXISTS `lastIndicators`;
/*!50001 DROP VIEW IF EXISTS `lastIndicators`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `lastIndicators` AS SELECT
1 AS `updated`,
1 AS `lastYearSales`,
@@ -5086,7 +5091,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `m3`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `m3` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`fecha` date NOT NULL,
@@ -5100,17 +5105,17 @@ CREATE TABLE `m3` (
`dayName` varchar(12) COLLATE utf8_unicode_ci DEFAULT NULL,
`euros` decimal(10,2) DEFAULT '0.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=393137 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `m3Silla`
+-- Temporary table structure for view `m3Silla`
--
DROP TABLE IF EXISTS `m3Silla`;
/*!50001 DROP VIEW IF EXISTS `m3Silla`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `m3Silla` AS SELECT
1 AS `fecha`,
1 AS `year`,
@@ -5123,13 +5128,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `m3analisis`
+-- Temporary table structure for view `m3analisis`
--
DROP TABLE IF EXISTS `m3analisis`;
/*!50001 DROP VIEW IF EXISTS `m3analisis`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `m3analisis` AS SELECT
1 AS `fecha`,
1 AS `year`,
@@ -5155,7 +5160,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `manaCustomer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `manaCustomer` (
`Id_Cliente` int(11) NOT NULL,
`Mana` decimal(10,0) NOT NULL DEFAULT '0',
@@ -5167,25 +5172,25 @@ CREATE TABLE `manaCustomer` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `manaSpellersExcluded`
+-- Temporary table structure for view `manaSpellersExcluded`
--
DROP TABLE IF EXISTS `manaSpellersExcluded`;
/*!50001 DROP VIEW IF EXISTS `manaSpellersExcluded`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `manaSpellersExcluded` AS SELECT
1 AS `workerFk`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `mana_spellers`
+-- Temporary table structure for view `mana_spellers`
--
DROP TABLE IF EXISTS `mana_spellers`;
/*!50001 DROP VIEW IF EXISTS `mana_spellers`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `mana_spellers` AS SELECT
1 AS `Id_Trabajador`,
1 AS `size`,
@@ -5202,7 +5207,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `mana_spellers_excluded`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mana_spellers_excluded` (
`Id_Trabajador` int(11) NOT NULL,
PRIMARY KEY (`Id_Trabajador`),
@@ -5211,13 +5216,13 @@ CREATE TABLE `mana_spellers_excluded` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `mermas`
+-- Temporary table structure for view `mermas`
--
DROP TABLE IF EXISTS `mermas`;
/*!50001 DROP VIEW IF EXISTS `mermas`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `mermas` AS SELECT
1 AS `Comprador`,
1 AS `Familia`,
@@ -5237,7 +5242,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `mermasCache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mermasCache` (
`Comprador` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
`año` int(4) NOT NULL,
@@ -5254,7 +5259,7 @@ CREATE TABLE `mermasCache` (
DROP TABLE IF EXISTS `nightTask`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nightTask` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`started` datetime DEFAULT NULL,
@@ -5266,7 +5271,7 @@ CREATE TABLE `nightTask` (
`error` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`errorCode` varchar(10) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=55 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -5323,12 +5328,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `nightTaskConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nightTaskConfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`logMail` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -5337,7 +5342,7 @@ CREATE TABLE `nightTaskConfig` (
DROP TABLE IF EXISTS `payMethodClient`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payMethodClient` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -5349,7 +5354,7 @@ CREATE TABLE `payMethodClient` (
KEY `FkDateClientPayMethod` (`dated`,`clientFk`),
CONSTRAINT `FkClientPayMethod` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `FkPayMethodClient` FOREIGN KEY (`payMethodFk`) REFERENCES `vn`.`payMethod` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=6215710 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_bin;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -5358,7 +5363,7 @@ CREATE TABLE `payMethodClient` (
DROP TABLE IF EXISTS `payMethodClientEvolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payMethodClientEvolution` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -5367,7 +5372,7 @@ CREATE TABLE `payMethodClientEvolution` (
`amount` decimal(10,2) NOT NULL,
`equalizationTax` decimal(10,2) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2048 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -5376,7 +5381,7 @@ CREATE TABLE `payMethodClientEvolution` (
DROP TABLE IF EXISTS `productivity`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `productivity` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -5403,7 +5408,7 @@ CREATE TABLE `productivity` (
`m3PCA` double NOT NULL DEFAULT '0',
`m3Artificial` decimal(10,2) NOT NULL DEFAULT '0.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=64091248 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -5412,7 +5417,7 @@ CREATE TABLE `productivity` (
DROP TABLE IF EXISTS `productivityDepartment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `productivityDepartment` (
`dated` date NOT NULL,
`amountCoordinacion` decimal(10,2) NOT NULL DEFAULT '0.00',
@@ -5432,7 +5437,7 @@ CREATE TABLE `productivityDepartment` (
DROP TABLE IF EXISTS `productivity_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `productivity_evolution` (
`dated` date NOT NULL,
`m3productionCost` decimal(10,2) NOT NULL DEFAULT '0.00',
@@ -5446,7 +5451,7 @@ CREATE TABLE `productivity_evolution` (
DROP TABLE IF EXISTS `salaries2018`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `salaries2018` (
`person_id` int(11) NOT NULL DEFAULT '0',
`sex` enum('M','F') CHARACTER SET utf8 NOT NULL DEFAULT 'F' COMMENT 'M Masculino F Femenino',
@@ -5472,7 +5477,7 @@ CREATE TABLE `salaries2018` (
DROP TABLE IF EXISTS `salePersonEvolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `salePersonEvolution` (
`dated` date NOT NULL DEFAULT '0000-00-00',
`amount` decimal(10,2) NOT NULL DEFAULT '0.00',
@@ -5488,7 +5493,7 @@ CREATE TABLE `salePersonEvolution` (
DROP TABLE IF EXISTS `salesByWeek`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `salesByWeek` (
`week` int(11) NOT NULL,
`year` int(11) NOT NULL,
@@ -5503,7 +5508,7 @@ CREATE TABLE `salesByWeek` (
DROP TABLE IF EXISTS `vendedores`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendedores` (
`Id_Trabajador` int(11) NOT NULL,
`año` int(4) NOT NULL,
@@ -5524,7 +5529,7 @@ CREATE TABLE `vendedores` (
DROP TABLE IF EXISTS `vendedores_evolution`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vendedores_evolution` (
`workerFk` int(11) NOT NULL,
`year` int(11) NOT NULL,
@@ -5541,7 +5546,7 @@ CREATE TABLE `vendedores_evolution` (
DROP TABLE IF EXISTS `ventas`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ventas` (
`Id_Movimiento` int(11) NOT NULL,
`importe` decimal(10,3) NOT NULL DEFAULT '0.000',
@@ -5568,7 +5573,7 @@ CREATE TABLE `ventas` (
DROP TABLE IF EXISTS `ventas_contables`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ventas_contables` (
`year` int(4) NOT NULL,
`month` int(2) NOT NULL,
@@ -5588,7 +5593,7 @@ CREATE TABLE `ventas_contables` (
DROP TABLE IF EXISTS `warehouseProduction_kk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `warehouseProduction_kk` (
`fecha` date NOT NULL,
`warehouse_id` smallint(6) unsigned NOT NULL,
@@ -5602,13 +5607,13 @@ CREATE TABLE `warehouseProduction_kk` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerMana`
+-- Temporary table structure for view `workerMana`
--
DROP TABLE IF EXISTS `workerMana`;
/*!50001 DROP VIEW IF EXISTS `workerMana`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerMana` AS SELECT
1 AS `workerFk`,
1 AS `amount`*/;
@@ -5620,7 +5625,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workerSpeed`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerSpeed` (
`workerCode` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
`accion` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
@@ -6803,16 +6808,16 @@ BEGIN
* La tabla mana_spellers es una caché
*
*/
-
- UPDATE mana_spellers me
- JOIN
- (SELECT Id_Trabajador, FLOOR(SUM(importe)/12) as pesoCarteraMensual
- FROM bs.vendedores
- WHERE año * 100 + mes >= (YEAR(CURDATE()) -1) * 100 + MONTH(CURDATE())
- GROUP BY Id_Trabajador
- ) lastYearSales USING(Id_Trabajador)
- SET me.prices_modifier_rate = GREATEST(me.minRate,LEAST(me.maxRate,ROUND(- me.used/lastYearSales.pesoCarteraMensual,3))) ;
-
+
+ UPDATE mana_spellers me
+ JOIN
+ (SELECT Id_Trabajador, FLOOR(SUM(importe)/12) as pesoCarteraMensual
+ FROM bs.vendedores
+ WHERE año * 100 + mes >= (YEAR(CURDATE()) -1) * 100 + MONTH(CURDATE())
+ GROUP BY Id_Trabajador
+ ) lastYearSales USING(Id_Trabajador)
+ SET me.prices_modifier_rate = GREATEST(me.minRate,LEAST(me.maxRate,ROUND(- me.used/lastYearSales.pesoCarteraMensual,3))) ;
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -8304,7 +8309,7 @@ USE `cache`;
DROP TABLE IF EXISTS `available`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `available` (
`calc_id` int(10) unsigned NOT NULL,
`item_id` int(11) NOT NULL,
@@ -8320,14 +8325,14 @@ CREATE TABLE `available` (
DROP TABLE IF EXISTS `cache`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cache` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 NOT NULL,
`lifetime` time NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -8336,7 +8341,7 @@ CREATE TABLE `cache` (
DROP TABLE IF EXISTS `cache_calc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cache_calc` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`cache_id` int(10) unsigned NOT NULL,
@@ -8351,7 +8356,7 @@ CREATE TABLE `cache_calc` (
KEY `cache_id` (`cache_id`),
KEY `cacheName` (`cacheName`),
KEY `expires` (`expires`)
-) ENGINE=InnoDB AUTO_INCREMENT=446148 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -8360,12 +8365,12 @@ CREATE TABLE `cache_calc` (
DROP TABLE IF EXISTS `cache_valid`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cache_valid` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`valid` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=MEMORY AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=MEMORYDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -8374,7 +8379,7 @@ CREATE TABLE `cache_valid` (
DROP TABLE IF EXISTS `departure_limit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `departure_limit` (
`warehouse_id` smallint(6) unsigned NOT NULL,
`fecha` date NOT NULL,
@@ -8391,7 +8396,7 @@ CREATE TABLE `departure_limit` (
DROP TABLE IF EXISTS `last_buy`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `last_buy` (
`item_id` int(10) unsigned NOT NULL,
`warehouse_id` smallint(5) unsigned NOT NULL,
@@ -8409,7 +8414,7 @@ CREATE TABLE `last_buy` (
DROP TABLE IF EXISTS `prod_graphic_source`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `prod_graphic_source` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`m3` double NOT NULL DEFAULT '0',
@@ -8419,7 +8424,7 @@ CREATE TABLE `prod_graphic_source` (
`alert_level` int(11) NOT NULL DEFAULT '0',
`Agencia` varchar(45) CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2833411 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -8428,7 +8433,7 @@ CREATE TABLE `prod_graphic_source` (
DROP TABLE IF EXISTS `stock`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stock` (
`warehouse_id` smallint(5) unsigned NOT NULL,
`item_id` int(10) unsigned NOT NULL,
@@ -8444,7 +8449,7 @@ CREATE TABLE `stock` (
DROP TABLE IF EXISTS `visible`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visible` (
`calc_id` int(10) unsigned NOT NULL,
`item_id` int(11) NOT NULL,
@@ -8854,9 +8859,9 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cacheCalc_clean`()
-BEGIN
- DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW());
- DELETE FROM cache_calc WHERE expires < vCleanTime;
+BEGIN
+ DECLARE vCleanTime DATETIME DEFAULT TIMESTAMPADD(MINUTE, -5, NOW());
+ DELETE FROM cache_calc WHERE expires < vCleanTime;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -8874,27 +8879,27 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_calc_end`(IN `v_calc` INT)
-BEGIN
- DECLARE v_cache_name VARCHAR(255);
- DECLARE v_params VARCHAR(255);
-
- -- Libera el bloqueo y actualiza la fecha de ultimo refresco.
-
- UPDATE cache_calc cc JOIN cache c ON c.id = cc.cache_id
- SET
- cc.last_refresh = NOW(),
- cc.expires = ADDTIME(NOW(), c.lifetime),
- cc.connection_id = NULL
- WHERE cc.id = v_calc;
-
- SELECT c.name, ca.params INTO v_cache_name, v_params
- FROM cache c
- JOIN cache_calc ca ON c.id = ca.cache_id
- WHERE ca.id = v_calc;
-
- IF v_cache_name IS NOT NULL THEN
- DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
- END IF;
+BEGIN
+ DECLARE v_cache_name VARCHAR(255);
+ DECLARE v_params VARCHAR(255);
+
+ -- Libera el bloqueo y actualiza la fecha de ultimo refresco.
+
+ UPDATE cache_calc cc JOIN cache c ON c.id = cc.cache_id
+ SET
+ cc.last_refresh = NOW(),
+ cc.expires = ADDTIME(NOW(), c.lifetime),
+ cc.connection_id = NULL
+ WHERE cc.id = v_calc;
+
+ SELECT c.name, ca.params INTO v_cache_name, v_params
+ FROM cache c
+ JOIN cache_calc ca ON c.id = ca.cache_id
+ WHERE ca.id = v_calc;
+
+ IF v_cache_name IS NOT NULL THEN
+ DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
+ END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -8912,88 +8917,88 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_calc_start`(OUT `v_calc` INT, INOUT `v_refresh` INT, IN `v_cache_name` VARCHAR(50), IN `v_params` VARCHAR(100))
-proc: BEGIN
- DECLARE v_valid BOOL;
- DECLARE v_lock_id VARCHAR(100);
- DECLARE v_cache_id INT;
- DECLARE v_expires DATETIME;
- DECLARE v_clean_time DATETIME;
-
- DECLARE EXIT HANDLER FOR SQLEXCEPTION
- BEGIN
- IF v_lock_id IS NOT NULL THEN
- DO RELEASE_LOCK(v_lock_id);
- END IF;
-
- RESIGNAL;
- END;
-
- SET v_params = IFNULL(v_params, '');
-
- -- Si el servidor se ha reiniciado invalida todos los calculos.
-
- SELECT COUNT(*) > 0 INTO v_valid FROM cache_valid;
-
- IF !v_valid
- THEN
- DELETE FROM cache_calc;
- INSERT INTO cache_valid (valid) VALUES (TRUE);
- END IF;
-
- -- Obtiene un bloqueo exclusivo para que no haya problemas de concurrencia.
-
- SET v_lock_id = CONCAT_WS('/', v_cache_name, v_params);
-
- IF !GET_LOCK(v_lock_id, 30)
- THEN
- SET v_calc = NULL;
- SET v_refresh = FALSE;
- LEAVE proc;
- END IF;
-
- -- Comprueba si el calculo solicitado existe y esta actualizado.
-
- SELECT c.id, ca.id, ca.expires
- INTO v_cache_id, v_calc, v_expires
- FROM cache c
- LEFT JOIN cache_calc ca
- ON ca.cache_id = c.id AND ca.params = v_params COLLATE 'utf8_general_ci'
- WHERE c.name = v_cache_name COLLATE 'utf8_general_ci';
-
- -- Si existe una calculo valido libera el bloqueo y devuelve su identificador.
-
- IF !v_refresh AND NOW() < v_expires
- THEN
- DO RELEASE_LOCK(v_lock_id);
- SET v_refresh = FALSE;
- LEAVE proc;
- END IF;
-
- -- Si el calculo no existe le crea una entrada en la tabla de calculos.
-
- IF v_calc IS NULL
- THEN
- INSERT INTO cache_calc SET
- cache_id = v_cache_id,
- cacheName = v_cache_name,
- params = v_params,
- last_refresh = NULL,
- expires = NULL,
- connection_id = CONNECTION_ID();
-
- SET v_calc = LAST_INSERT_ID();
- ELSE
- UPDATE cache_calc
- SET
- last_refresh = NULL,
- expires = NULL,
- connection_id = CONNECTION_ID()
- WHERE id = v_calc;
- END IF;
-
- -- Si se debe recalcular mantiene el bloqueo y devuelve su identificador.
-
- SET v_refresh = TRUE;
+proc: BEGIN
+ DECLARE v_valid BOOL;
+ DECLARE v_lock_id VARCHAR(100);
+ DECLARE v_cache_id INT;
+ DECLARE v_expires DATETIME;
+ DECLARE v_clean_time DATETIME;
+
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION
+ BEGIN
+ IF v_lock_id IS NOT NULL THEN
+ DO RELEASE_LOCK(v_lock_id);
+ END IF;
+
+ RESIGNAL;
+ END;
+
+ SET v_params = IFNULL(v_params, '');
+
+ -- Si el servidor se ha reiniciado invalida todos los calculos.
+
+ SELECT COUNT(*) > 0 INTO v_valid FROM cache_valid;
+
+ IF !v_valid
+ THEN
+ DELETE FROM cache_calc;
+ INSERT INTO cache_valid (valid) VALUES (TRUE);
+ END IF;
+
+ -- Obtiene un bloqueo exclusivo para que no haya problemas de concurrencia.
+
+ SET v_lock_id = CONCAT_WS('/', v_cache_name, v_params);
+
+ IF !GET_LOCK(v_lock_id, 30)
+ THEN
+ SET v_calc = NULL;
+ SET v_refresh = FALSE;
+ LEAVE proc;
+ END IF;
+
+ -- Comprueba si el calculo solicitado existe y esta actualizado.
+
+ SELECT c.id, ca.id, ca.expires
+ INTO v_cache_id, v_calc, v_expires
+ FROM cache c
+ LEFT JOIN cache_calc ca
+ ON ca.cache_id = c.id AND ca.params = v_params COLLATE 'utf8_general_ci'
+ WHERE c.name = v_cache_name COLLATE 'utf8_general_ci';
+
+ -- Si existe una calculo valido libera el bloqueo y devuelve su identificador.
+
+ IF !v_refresh AND NOW() < v_expires
+ THEN
+ DO RELEASE_LOCK(v_lock_id);
+ SET v_refresh = FALSE;
+ LEAVE proc;
+ END IF;
+
+ -- Si el calculo no existe le crea una entrada en la tabla de calculos.
+
+ IF v_calc IS NULL
+ THEN
+ INSERT INTO cache_calc SET
+ cache_id = v_cache_id,
+ cacheName = v_cache_name,
+ params = v_params,
+ last_refresh = NULL,
+ expires = NULL,
+ connection_id = CONNECTION_ID();
+
+ SET v_calc = LAST_INSERT_ID();
+ ELSE
+ UPDATE cache_calc
+ SET
+ last_refresh = NULL,
+ expires = NULL,
+ connection_id = CONNECTION_ID()
+ WHERE id = v_calc;
+ END IF;
+
+ -- Si se debe recalcular mantiene el bloqueo y devuelve su identificador.
+
+ SET v_refresh = TRUE;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -9011,24 +9016,24 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_calc_unlock`(IN `v_calc` INT)
-proc: BEGIN
- DECLARE v_cache_name VARCHAR(50);
- DECLARE v_params VARCHAR(100);
-
- IF v_calc IS NULL THEN
- LEAVE proc;
- END IF;
-
- SELECT c.name, ca.params INTO v_cache_name, v_params
- FROM cache c
- JOIN cache_calc ca ON c.id = ca.cache_id
- WHERE ca.id = v_calc;
-
- DELETE FROM cache_calc WHERE id = v_calc;
-
- IF v_cache_name IS NOT NULL THEN
- DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
- END IF;
+proc: BEGIN
+ DECLARE v_cache_name VARCHAR(50);
+ DECLARE v_params VARCHAR(100);
+
+ IF v_calc IS NULL THEN
+ LEAVE proc;
+ END IF;
+
+ SELECT c.name, ca.params INTO v_cache_name, v_params
+ FROM cache c
+ JOIN cache_calc ca ON c.id = ca.cache_id
+ WHERE ca.id = v_calc;
+
+ DELETE FROM cache_calc WHERE id = v_calc;
+
+ IF v_cache_name IS NOT NULL THEN
+ DO RELEASE_LOCK(CONCAT_WS('/', v_cache_name, IFNULL(v_params, '')));
+ END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -9047,9 +9052,9 @@ DELIMITER ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `cache_clean`()
NO SQL
-BEGIN
- CALL available_clean;
- CALL visible_clean;
+BEGIN
+ CALL available_clean;
+ CALL visible_clean;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -9067,13 +9072,13 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clean`()
-BEGIN
-
- DECLARE vDateShort DATETIME;
-
- SET vDateShort = TIMESTAMPADD(MONTH, -1, CURDATE());
-
- DELETE FROM cache.departure_limit WHERE Fecha < vDateShort;
+BEGIN
+
+ DECLARE vDateShort DATETIME;
+
+ SET vDateShort = TIMESTAMPADD(MONTH, -1, CURDATE());
+
+ DELETE FROM cache.departure_limit WHERE Fecha < vDateShort;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -9702,7 +9707,7 @@ USE `edi`;
DROP TABLE IF EXISTS `PriceDetails`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `PriceDetails` (
`ID` int(11) NOT NULL,
`SuplyResponseID` int(11) NOT NULL,
@@ -9729,7 +9734,7 @@ CREATE TABLE `PriceDetails` (
DROP TABLE IF EXISTS `VMPSettings`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `VMPSettings` (
`VMPID` int(11) NOT NULL,
`MessageID` int(11) NOT NULL,
@@ -9743,7 +9748,7 @@ CREATE TABLE `VMPSettings` (
DROP TABLE IF EXISTS `bucket`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bucket` (
`bucket_id` int(11) unsigned NOT NULL,
`bucket_type_id` mediumint(8) unsigned NOT NULL,
@@ -9766,7 +9771,7 @@ CREATE TABLE `bucket` (
DROP TABLE IF EXISTS `bucket_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bucket_type` (
`bucket_type_id` mediumint(8) unsigned NOT NULL,
`description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
@@ -9783,7 +9788,7 @@ CREATE TABLE `bucket_type` (
DROP TABLE IF EXISTS `deliveryInformation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deliveryInformation` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`DeliveryType` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -9803,7 +9808,7 @@ CREATE TABLE `deliveryInformation` (
KEY `fgbSupplyResponse_idx2` (`FirstOrderDateTime`),
KEY `fgbSupplyResponse_idx3` (`LatestOrderDateTime`),
CONSTRAINT `fgbSupplyResponse` FOREIGN KEY (`supplyResponseID`) REFERENCES `supplyResponse` (`ID`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=25319964 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -9812,7 +9817,7 @@ CREATE TABLE `deliveryInformation` (
DROP TABLE IF EXISTS `ekt`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ekt` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`barcode` char(15) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -9861,7 +9866,7 @@ CREATE TABLE `ekt` (
KEY `barcode` (`barcode`),
KEY `fec` (`fec`),
KEY `putOrderFk` (`putOrderFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=1133448 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -9870,7 +9875,7 @@ CREATE TABLE `ekt` (
DROP TABLE IF EXISTS `exchange`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `exchange` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mailFk` int(10) unsigned NOT NULL,
@@ -9882,7 +9887,7 @@ CREATE TABLE `exchange` (
KEY `buy_edi_id` (`ektFk`),
CONSTRAINT `exchange_ibfk_1` FOREIGN KEY (`mailFk`) REFERENCES `mail` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `exchange_ibfk_2` FOREIGN KEY (`ektFk`) REFERENCES `ekt` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=674008 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -9891,7 +9896,7 @@ CREATE TABLE `exchange` (
DROP TABLE IF EXISTS `exchangeConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `exchangeConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`logMail` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Mail where the log information is sent',
@@ -9901,7 +9906,7 @@ CREATE TABLE `exchangeConfig` (
PRIMARY KEY (`id`),
KEY `presale_id` (`presaleFk`),
CONSTRAINT `exchangeConfig_ibfk_1` FOREIGN KEY (`presaleFk`) REFERENCES `exchangeType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Configuration parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -9910,7 +9915,7 @@ CREATE TABLE `exchangeConfig` (
DROP TABLE IF EXISTS `exchangeType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `exchangeType` (
`id` mediumint(8) unsigned NOT NULL,
`description` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -9924,7 +9929,7 @@ CREATE TABLE `exchangeType` (
DROP TABLE IF EXISTS `feature`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `feature` (
`item_id` int(11) unsigned NOT NULL,
`feature_type_id` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -9942,7 +9947,7 @@ CREATE TABLE `feature` (
DROP TABLE IF EXISTS `fileConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fileConfig` (
`fileName` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
`toTable` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
@@ -9959,14 +9964,14 @@ CREATE TABLE `fileConfig` (
DROP TABLE IF EXISTS `ftpConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ftpConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`host` varchar(255) CHARACTER SET utf8 NOT NULL,
`user` varchar(50) CHARACTER SET utf8 NOT NULL,
`password` varchar(50) CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Configuration parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -9975,7 +9980,7 @@ CREATE TABLE `ftpConfig` (
DROP TABLE IF EXISTS `genus`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `genus` (
`genus_id` mediumint(8) unsigned NOT NULL,
`latin_genus_name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
@@ -9992,7 +9997,7 @@ CREATE TABLE `genus` (
DROP TABLE IF EXISTS `goodCharacteristic`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `goodCharacteristic` (
`supplyResponse` varchar(26) COLLATE utf8_unicode_ci NOT NULL,
`type` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'edi.type',
@@ -10007,7 +10012,7 @@ CREATE TABLE `goodCharacteristic` (
DROP TABLE IF EXISTS `imapConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `imapConfig` (
`id` tinyint(3) unsigned NOT NULL,
`host` varchar(150) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'localhost',
@@ -10026,7 +10031,7 @@ CREATE TABLE `imapConfig` (
DROP TABLE IF EXISTS `item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item` (
`id` int(11) unsigned NOT NULL,
`product_name` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -10049,7 +10054,7 @@ CREATE TABLE `item` (
DROP TABLE IF EXISTS `item_feature`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item_feature` (
`item_id` int(11) NOT NULL,
`presentation_order` tinyint(11) unsigned NOT NULL,
@@ -10088,7 +10093,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `item_group`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item_group` (
`group_code` int(11) unsigned NOT NULL,
`dutch_group_description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
@@ -10105,7 +10110,7 @@ CREATE TABLE `item_group` (
DROP TABLE IF EXISTS `item_track`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item_track` (
`item_id` int(10) unsigned NOT NULL,
`s1` tinyint(3) NOT NULL DEFAULT '0',
@@ -10131,7 +10136,7 @@ CREATE TABLE `item_track` (
DROP TABLE IF EXISTS `mail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mail` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`senderFk` int(10) unsigned DEFAULT NULL,
@@ -10144,7 +10149,7 @@ CREATE TABLE `mail` (
UNIQUE KEY `mail_id` (`messageId`),
KEY `sender_id` (`senderFk`),
CONSTRAINT `mail_ibfk_2` FOREIGN KEY (`senderFk`) REFERENCES `mailSender` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=703783 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -10153,14 +10158,14 @@ CREATE TABLE `mail` (
DROP TABLE IF EXISTS `mailSender`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailSender` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mail` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
`kop` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `mail` (`mail`)
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='List of allowed mailers';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='List of allowed mailers';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -10169,7 +10174,7 @@ CREATE TABLE `mailSender` (
DROP TABLE IF EXISTS `marketPlace`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `marketPlace` (
`id` varchar(13) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -10184,7 +10189,7 @@ CREATE TABLE `marketPlace` (
DROP TABLE IF EXISTS `param`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `param` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -10195,7 +10200,7 @@ CREATE TABLE `param` (
`required` tinyint(3) unsigned NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`,`subname`)
-) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Parameters to capture of every exchange';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Parameters to capture of every exchange';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -10204,7 +10209,7 @@ CREATE TABLE `param` (
DROP TABLE IF EXISTS `plant`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `plant` (
`plant_id` mediumint(8) unsigned NOT NULL,
`genus_id` mediumint(8) unsigned NOT NULL,
@@ -10222,7 +10227,7 @@ CREATE TABLE `plant` (
DROP TABLE IF EXISTS `putOrder`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `putOrder` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`deliveryInformationID` int(11) DEFAULT NULL,
@@ -10236,7 +10241,7 @@ CREATE TABLE `putOrder` (
`isOrderProcessed` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `orderTradelineItemID_UNIQUE` (`orderTradelineItemID`)
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -10269,7 +10274,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `specie`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `specie` (
`specie_id` mediumint(8) unsigned NOT NULL,
`genus_id` mediumint(8) unsigned NOT NULL,
@@ -10287,7 +10292,7 @@ CREATE TABLE `specie` (
DROP TABLE IF EXISTS `supplier`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplier` (
`supplier_id` int(10) unsigned NOT NULL COMMENT 'FHRegistrationNr',
`glnAddressCode` varchar(13) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -10306,7 +10311,7 @@ CREATE TABLE `supplier` (
DROP TABLE IF EXISTS `supplyResponse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplyResponse` (
`ID` int(11) NOT NULL AUTO_INCREMENT,
`NumberBunchesPerCask` int(11) DEFAULT NULL,
@@ -10359,7 +10364,7 @@ CREATE TABLE `supplyResponse` (
PRIMARY KEY (`ID`),
UNIQUE KEY `ID_UNIQUE` (`ID`),
KEY `IX_TransNumber` (`TransactionNumber`) COMMENT 'Agregado por Ernesto 11.6.2019\nSe ejecutaba 1 consulta por segundo desde MAIL y consumia un 20% de CPU de todo el servidor !!!!!\nCPU usada es mas estable que Indice en SendererID, cpu vs espacio que ocupa?\n'
-) ENGINE=InnoDB AUTO_INCREMENT=9313265 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -10368,7 +10373,7 @@ CREATE TABLE `supplyResponse` (
DROP TABLE IF EXISTS `type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `type` (
`type_id` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
`type_group_id` tinyint(3) unsigned NOT NULL,
@@ -10386,7 +10391,7 @@ CREATE TABLE `type` (
DROP TABLE IF EXISTS `value`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `value` (
`type_id` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
`type_value` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -10537,158 +10542,158 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `ekt_load`(IN `vSelf` INT)
-BEGIN
- DECLARE vRef INT;
- DECLARE vBuy INT;
- DECLARE vItem INT;
- DECLARE vQty INT;
- DECLARE vPackage INT;
- DECLARE vIsLot BOOLEAN;
- DECLARE vForceToPacking INT DEFAULT 2;
-
- -- Carga los datos necesarios del EKT
-
- SELECT ref, qty, package INTO vRef, vQty, vPackage
- FROM ekt e
- LEFT JOIN item i ON e.ref = i.id
- WHERE e.id = vSelf;
-
- -- Inserta el cubo si no existe
-
- IF vPackage = 800
- THEN
- SET vPackage = 800 + vQty;
-
- INSERT IGNORE INTO vn2008.Cubos SET
- Id_Cubo = vPackage,
- x = 7200 / vQty,
- y = 1;
- ELSE
- INSERT IGNORE INTO vn2008.Cubos (Id_Cubo, X, Y, Z)
- SELECT bucket_id, ROUND(x_size/10), ROUND(y_size/10), ROUND(z_size/10)
- FROM bucket WHERE bucket_id = vPackage;
-
- IF ROW_COUNT() > 0
- THEN
- INSERT INTO vn2008.mail SET
- `subject` = 'Cubo añadido',
- `text` = CONCAT('Se ha añadido el cubo: ', vPackage),
- `to` = 'ekt@verdnatura.es';
- END IF;
- END IF;
-
- -- Intenta obtener el artículo en base a los atributos holandeses
-
- INSERT IGNORE INTO item_track SET
- item_id = vRef;
-
- SELECT c.Id_Compra, c.Id_Article INTO vBuy, vItem
- FROM vn2008.buy_edi e
- JOIN item_track t ON t.item_id = e.ref
- LEFT JOIN vn2008.buy_edi l ON l.ref = e.ref
- LEFT JOIN vn2008.Compres c ON c.buy_edi_id = l.id
- JOIN vn2008.config cfg
- WHERE e.id = vSelf
- AND l.id != vSelf
- AND c.Id_Article != cfg.generic_item
- AND IF(t.s1, l.s1 = e.s1, TRUE)
- AND IF(t.s2, l.s2 = e.s2, TRUE)
- AND IF(t.s3, l.s3 = e.s3, TRUE)
- AND IF(t.s4, l.s4 = e.s4, TRUE)
- AND IF(t.s5, l.s5 = e.s5, TRUE)
- AND IF(t.s6, l.s6 = e.s6, TRUE)
- AND IF(t.kop, l.kop = e.kop, TRUE)
- AND IF(t.pac, l.pac = e.pac, TRUE)
- AND IF(t.cat, l.cat = e.cat, TRUE)
- AND IF(t.ori, l.ori = e.ori, TRUE)
- AND IF(t.pro, l.pro = e.pro, TRUE)
- AND IF(t.sub, l.sub = e.sub, TRUE)
- AND IF(t.package, l.package = e.package, TRUE)
- AND c.Id_Article < 170000
- ORDER BY l.now DESC, c.Id_Compra ASC LIMIT 1;
-
- -- Determina si el articulo se vende por lotes
-
- IF vItem
- THEN
- SELECT COUNT(*) > 0 INTO vIsLot
- FROM vn2008.Articles a
- LEFT JOIN vn2008.Tipos t ON t.tipo_id = a.tipo_id
- WHERE a.Id_Article = vItem
- AND t.`transaction`;
-
- -- Si el articulo se vende por lotes se inserta un nuevo artículo
-
- IF vIsLot
- THEN
- INSERT INTO vn2008.Articles (
- Article
- ,Medida
- ,Categoria
- ,Id_Origen
- ,iva_group_id
- ,Foto
- ,Color
- ,Codintrastat
- ,tipo_id
- ,Tallos
- )
- SELECT
- i.`name`
- ,IFNULL(e.s1, e.pac)
- ,e.cat
- ,IFNULL(o.id, 17)
- ,IFNULL(a.iva_group_id, 1)
- ,a.Foto
- ,a.Color
- ,a.Codintrastat
- ,IFNULL(a.tipo_id, 10)
- ,IF(a.tipo_id = 15, 0, 1)
- FROM vn2008.buy_edi e
- LEFT JOIN item i ON i.id = e.ref
- LEFT JOIN vn2008.Origen o ON o.Abreviatura = e.ori
- LEFT JOIN vn2008.Articles a ON a.Id_Article = vItem
- WHERE e.id = vSelf;
-
- SET vItem = LAST_INSERT_ID();
- END IF;
- END IF;
-
- -- Inserta la compra asociada al EKT
-
- INSERT INTO vn2008.Compres
- (
- Id_Entrada
- ,buy_edi_id
- ,Costefijo
- ,Id_Article
- ,`grouping`
- ,caja
- ,Packing
- ,Cantidad
- ,Productor
- ,Etiquetas
- ,Id_Cubo
- )
- SELECT
- cfg.edi_entry
- ,vSelf
- ,(@t := IF(a.Tallos, a.Tallos, 1)) * e.pri
- ,IFNULL(vItem, cfg.generic_item)
- ,IFNULL(c.`grouping`, e.pac)
- ,vForceToPacking
- ,@pac := e.pac / @t
- ,@pac * e.qty
- ,s.company_name
- ,e.qty
- ,IFNULL(c.Id_Cubo, e.package)
- FROM vn2008.buy_edi e
- LEFT JOIN vn2008.Compres c ON c.Id_Compra = vBuy
- LEFT JOIN vn2008.Articles a ON a.Id_Article = c.Id_Article
- LEFT JOIN supplier s ON e.pro = s.supplier_id
- JOIN vn2008.config cfg
- WHERE e.id = vSelf
- LIMIT 1;
+BEGIN
+ DECLARE vRef INT;
+ DECLARE vBuy INT;
+ DECLARE vItem INT;
+ DECLARE vQty INT;
+ DECLARE vPackage INT;
+ DECLARE vIsLot BOOLEAN;
+ DECLARE vForceToPacking INT DEFAULT 2;
+
+ -- Carga los datos necesarios del EKT
+
+ SELECT ref, qty, package INTO vRef, vQty, vPackage
+ FROM ekt e
+ LEFT JOIN item i ON e.ref = i.id
+ WHERE e.id = vSelf;
+
+ -- Inserta el cubo si no existe
+
+ IF vPackage = 800
+ THEN
+ SET vPackage = 800 + vQty;
+
+ INSERT IGNORE INTO vn2008.Cubos SET
+ Id_Cubo = vPackage,
+ x = 7200 / vQty,
+ y = 1;
+ ELSE
+ INSERT IGNORE INTO vn2008.Cubos (Id_Cubo, X, Y, Z)
+ SELECT bucket_id, ROUND(x_size/10), ROUND(y_size/10), ROUND(z_size/10)
+ FROM bucket WHERE bucket_id = vPackage;
+
+ IF ROW_COUNT() > 0
+ THEN
+ INSERT INTO vn2008.mail SET
+ `subject` = 'Cubo añadido',
+ `text` = CONCAT('Se ha añadido el cubo: ', vPackage),
+ `to` = 'ekt@verdnatura.es';
+ END IF;
+ END IF;
+
+ -- Intenta obtener el artículo en base a los atributos holandeses
+
+ INSERT IGNORE INTO item_track SET
+ item_id = vRef;
+
+ SELECT c.Id_Compra, c.Id_Article INTO vBuy, vItem
+ FROM vn2008.buy_edi e
+ JOIN item_track t ON t.item_id = e.ref
+ LEFT JOIN vn2008.buy_edi l ON l.ref = e.ref
+ LEFT JOIN vn2008.Compres c ON c.buy_edi_id = l.id
+ JOIN vn2008.config cfg
+ WHERE e.id = vSelf
+ AND l.id != vSelf
+ AND c.Id_Article != cfg.generic_item
+ AND IF(t.s1, l.s1 = e.s1, TRUE)
+ AND IF(t.s2, l.s2 = e.s2, TRUE)
+ AND IF(t.s3, l.s3 = e.s3, TRUE)
+ AND IF(t.s4, l.s4 = e.s4, TRUE)
+ AND IF(t.s5, l.s5 = e.s5, TRUE)
+ AND IF(t.s6, l.s6 = e.s6, TRUE)
+ AND IF(t.kop, l.kop = e.kop, TRUE)
+ AND IF(t.pac, l.pac = e.pac, TRUE)
+ AND IF(t.cat, l.cat = e.cat, TRUE)
+ AND IF(t.ori, l.ori = e.ori, TRUE)
+ AND IF(t.pro, l.pro = e.pro, TRUE)
+ AND IF(t.sub, l.sub = e.sub, TRUE)
+ AND IF(t.package, l.package = e.package, TRUE)
+ AND c.Id_Article < 170000
+ ORDER BY l.now DESC, c.Id_Compra ASC LIMIT 1;
+
+ -- Determina si el articulo se vende por lotes
+
+ IF vItem
+ THEN
+ SELECT COUNT(*) > 0 INTO vIsLot
+ FROM vn2008.Articles a
+ LEFT JOIN vn2008.Tipos t ON t.tipo_id = a.tipo_id
+ WHERE a.Id_Article = vItem
+ AND t.`transaction`;
+
+ -- Si el articulo se vende por lotes se inserta un nuevo artículo
+
+ IF vIsLot
+ THEN
+ INSERT INTO vn2008.Articles (
+ Article
+ ,Medida
+ ,Categoria
+ ,Id_Origen
+ ,iva_group_id
+ ,Foto
+ ,Color
+ ,Codintrastat
+ ,tipo_id
+ ,Tallos
+ )
+ SELECT
+ i.`name`
+ ,IFNULL(e.s1, e.pac)
+ ,e.cat
+ ,IFNULL(o.id, 17)
+ ,IFNULL(a.iva_group_id, 1)
+ ,a.Foto
+ ,a.Color
+ ,a.Codintrastat
+ ,IFNULL(a.tipo_id, 10)
+ ,IF(a.tipo_id = 15, 0, 1)
+ FROM vn2008.buy_edi e
+ LEFT JOIN item i ON i.id = e.ref
+ LEFT JOIN vn2008.Origen o ON o.Abreviatura = e.ori
+ LEFT JOIN vn2008.Articles a ON a.Id_Article = vItem
+ WHERE e.id = vSelf;
+
+ SET vItem = LAST_INSERT_ID();
+ END IF;
+ END IF;
+
+ -- Inserta la compra asociada al EKT
+
+ INSERT INTO vn2008.Compres
+ (
+ Id_Entrada
+ ,buy_edi_id
+ ,Costefijo
+ ,Id_Article
+ ,`grouping`
+ ,caja
+ ,Packing
+ ,Cantidad
+ ,Productor
+ ,Etiquetas
+ ,Id_Cubo
+ )
+ SELECT
+ cfg.edi_entry
+ ,vSelf
+ ,(@t := IF(a.Tallos, a.Tallos, 1)) * e.pri
+ ,IFNULL(vItem, cfg.generic_item)
+ ,IFNULL(c.`grouping`, e.pac)
+ ,vForceToPacking
+ ,@pac := e.pac / @t
+ ,@pac * e.qty
+ ,s.company_name
+ ,e.qty
+ ,IFNULL(c.Id_Cubo, e.package)
+ FROM vn2008.buy_edi e
+ LEFT JOIN vn2008.Compres c ON c.Id_Compra = vBuy
+ LEFT JOIN vn2008.Articles a ON a.Id_Article = c.Id_Article
+ LEFT JOIN supplier s ON e.pro = s.supplier_id
+ JOIN vn2008.config cfg
+ WHERE e.id = vSelf
+ LIMIT 1;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -10738,154 +10743,154 @@ CREATE DEFINER=`root`@`%` PROCEDURE `exchange_new`(
IN `vAuction` SMALLINT,
IN `vPackage` INT,
IN `vPutOrderFk` INT)
-BEGIN
+BEGIN
/**
* Adds a new exchange, generates it's barcode and
* inserts/updates the transaction. When the referenced
* transaction exists as provisional, updates it with
- * the new values.
- */
- DECLARE vEkt INT;
- DECLARE vRewriteKop INT DEFAULT NULL;
- DECLARE vBarcode CHAR(15) DEFAULT NULL;
- DECLARE vIsDuplicated BOOL;
+ * the new values.
+ */
+ DECLARE vEkt INT;
+ DECLARE vRewriteKop INT DEFAULT NULL;
+ DECLARE vBarcode CHAR(15) DEFAULT NULL;
+ DECLARE vIsDuplicated BOOL;
DECLARE vUpdateExistent BOOL DEFAULT FALSE;
- DECLARE duplicateKey CONDITION FOR 1062;
+ DECLARE duplicateKey CONDITION FOR 1062;
+
+ DECLARE CONTINUE HANDLER FOR duplicateKey
+ SET vIsDuplicated = TRUE;
+
+ -- Generates the barcode
+
+ IF vAgj != 0 AND vAgj IS NOT NULL
+ THEN
+ SET vBarcode = CONCAT(
+ LPAD(vAuction, 2, 0),
+ LPAD(IFNULL(vClock, 99), 2, 0),
+ LPAD(DAYOFYEAR(vDate), 3, 0),
+ IF(vClock IS NULL OR vClock = 99,
+ LPAD(vAgj, 7, 0),
+ CONCAT(LPAD(vAgj, 5, 0), '01')
+ ),
+ '0'
+ );
+ END IF;
+
+ -- Rewrites the kop parameter
+
+ IF vKop IS NULL THEN
+ SELECT defaultKop INTO vKop FROM exchangeConfig;
+ END IF;
+
+ SELECT e.kop INTO vRewriteKop
+ FROM mailSender e
+ JOIN mail m ON m.senderFk = e.id
+ WHERE m.id = vMailFk;
+
+ SET vKop = IFNULL(vRewriteKop, vKop);
+
+ -- Inserts the new transaction
- DECLARE CONTINUE HANDLER FOR duplicateKey
- SET vIsDuplicated = TRUE;
-
- -- Generates the barcode
-
- IF vAgj != 0 AND vAgj IS NOT NULL
- THEN
- SET vBarcode = CONCAT(
- LPAD(vAuction, 2, 0),
- LPAD(IFNULL(vClock, 99), 2, 0),
- LPAD(DAYOFYEAR(vDate), 3, 0),
- IF(vClock IS NULL OR vClock = 99,
- LPAD(vAgj, 7, 0),
- CONCAT(LPAD(vAgj, 5, 0), '01')
- ),
- '0'
- );
- END IF;
-
- -- Rewrites the kop parameter
-
- IF vKop IS NULL THEN
- SELECT defaultKop INTO vKop FROM exchangeConfig;
- END IF;
-
- SELECT e.kop INTO vRewriteKop
- FROM mailSender e
- JOIN mail m ON m.senderFk = e.id
- WHERE m.id = vMailFk;
-
- SET vKop = IFNULL(vRewriteKop, vKop);
-
- -- Inserts the new transaction
-
- SET vIsDuplicated = FALSE;
- INSERT INTO ekt SET
- barcode = IFNULL(vBarcode, barcode)
- ,deliveryNumber = vDeliveryNumber
- ,entryYear = YEAR(vDate)
- ,fec = vDate
- ,hor = vHour
- ,ref = vRef
- ,item = vItem
- ,agj = vAgj
- ,cat = vCat
- ,pac = vPac
- ,sub = vSub
- ,kop = vKop
- ,ptd = vPtd
- ,pro = vPro
- ,ori = vOrigin
- ,ptj = vPtj
- ,qty = vQuantiy
- ,pri = vPrice
- ,klo = vClock
- ,s1 = vS1
- ,s2 = vS2
- ,s3 = vS3
- ,s4 = vS4
- ,s5 = vS5
- ,s6 = vS6
- ,k1 = vK1
- ,k2 = vK2
- ,k3 = vP1
- ,k4 = vP2
- ,auction = vAuction
- ,package = vPackage
- ,putOrderFk = vPutOrderFk;
-
- -- If it exists duplicado updates it
-
- IF NOT vIsDuplicated
- THEN
- SET vEkt = LAST_INSERT_ID();
- CALL ekt_load (vEkt);
-
- ELSEIF vDeliveryNumber != 0
- AND vDeliveryNumber IS NOT NULL
- THEN
- SELECT id INTO vEkt
- FROM ekt
- WHERE deliveryNumber = vDeliveryNumber;
-
- SELECT COUNT(*) = 0 INTO vUpdateExistent
- FROM ekt t
- JOIN `exchange` b ON b.ektFk = t.id
- JOIN exchangeConfig c
- WHERE t.deliveryNumber = vDeliveryNumber
- AND t.entryYear = YEAR(vDate)
- AND b.typeFk != c.presaleFk;
- END IF;
-
- IF vUpdateExistent
- THEN
- UPDATE ekt SET
- barcode = IFNULL(vBarcode, barcode)
- ,fec = vDate
- ,hor = vHour
- ,ref = vRef
- ,item = vItem
- ,agj = vAgj
- ,cat = vCat
- ,pac = vPac
- ,sub = vSub
- ,kop = vKop
- ,ptd = vPtd
- ,pro = vPro
- ,ori = vOrigin
- ,ptj = vPtj
- ,qty = vQuantiy
- ,pri = vPrice
- ,klo = vClock
- ,s1 = vS1
- ,s2 = vS2
- ,s3 = vS3
- ,s4 = vS4
- ,s5 = vS5
- ,s6 = vS6
- ,k1 = vK1
- ,k2 = vK2
- ,k3 = vP1
- ,k4 = vP2
- ,auction = vAuction
- ,package = vPackage
- ,putOrderFk = vPutOrderFk
- WHERE id = vEkt;
- END IF;
-
- -- Registers the exchange
-
- INSERT INTO `exchange` SET
- mailFk = vMailFk
- ,typeFk = vType
- ,ektFk = vEkt;
+ SET vIsDuplicated = FALSE;
+ INSERT INTO ekt SET
+ barcode = IFNULL(vBarcode, barcode)
+ ,deliveryNumber = vDeliveryNumber
+ ,entryYear = YEAR(vDate)
+ ,fec = vDate
+ ,hor = vHour
+ ,ref = vRef
+ ,item = vItem
+ ,agj = vAgj
+ ,cat = vCat
+ ,pac = vPac
+ ,sub = vSub
+ ,kop = vKop
+ ,ptd = vPtd
+ ,pro = vPro
+ ,ori = vOrigin
+ ,ptj = vPtj
+ ,qty = vQuantiy
+ ,pri = vPrice
+ ,klo = vClock
+ ,s1 = vS1
+ ,s2 = vS2
+ ,s3 = vS3
+ ,s4 = vS4
+ ,s5 = vS5
+ ,s6 = vS6
+ ,k1 = vK1
+ ,k2 = vK2
+ ,k3 = vP1
+ ,k4 = vP2
+ ,auction = vAuction
+ ,package = vPackage
+ ,putOrderFk = vPutOrderFk;
+
+ -- If it exists duplicado updates it
+
+ IF NOT vIsDuplicated
+ THEN
+ SET vEkt = LAST_INSERT_ID();
+ CALL ekt_load (vEkt);
+
+ ELSEIF vDeliveryNumber != 0
+ AND vDeliveryNumber IS NOT NULL
+ THEN
+ SELECT id INTO vEkt
+ FROM ekt
+ WHERE deliveryNumber = vDeliveryNumber;
+
+ SELECT COUNT(*) = 0 INTO vUpdateExistent
+ FROM ekt t
+ JOIN `exchange` b ON b.ektFk = t.id
+ JOIN exchangeConfig c
+ WHERE t.deliveryNumber = vDeliveryNumber
+ AND t.entryYear = YEAR(vDate)
+ AND b.typeFk != c.presaleFk;
+ END IF;
+
+ IF vUpdateExistent
+ THEN
+ UPDATE ekt SET
+ barcode = IFNULL(vBarcode, barcode)
+ ,fec = vDate
+ ,hor = vHour
+ ,ref = vRef
+ ,item = vItem
+ ,agj = vAgj
+ ,cat = vCat
+ ,pac = vPac
+ ,sub = vSub
+ ,kop = vKop
+ ,ptd = vPtd
+ ,pro = vPro
+ ,ori = vOrigin
+ ,ptj = vPtj
+ ,qty = vQuantiy
+ ,pri = vPrice
+ ,klo = vClock
+ ,s1 = vS1
+ ,s2 = vS2
+ ,s3 = vS3
+ ,s4 = vS4
+ ,s5 = vS5
+ ,s6 = vS6
+ ,k1 = vK1
+ ,k2 = vK2
+ ,k3 = vP1
+ ,k4 = vP2
+ ,auction = vAuction
+ ,package = vPackage
+ ,putOrderFk = vPutOrderFk
+ WHERE id = vEkt;
+ END IF;
+
+ -- Registers the exchange
+
+ INSERT INTO `exchange` SET
+ mailFk = vMailFk
+ ,typeFk = vType
+ ,ektFk = vEkt;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -10960,7 +10965,7 @@ USE `hedera`;
DROP TABLE IF EXISTS `androidUser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `androidUser` (
`androidId` varchar(200) CHARACTER SET utf8 NOT NULL,
`userFk` int(10) unsigned NOT NULL,
@@ -10975,7 +10980,7 @@ CREATE TABLE `androidUser` (
DROP TABLE IF EXISTS `basketOrder`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `basketOrder` (
`clientFk` int(11) NOT NULL,
`orderFk` int(10) unsigned NOT NULL,
@@ -10993,7 +10998,7 @@ CREATE TABLE `basketOrder` (
DROP TABLE IF EXISTS `browser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `browser` (
`name` varchar(30) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Browser name in browscap',
`version` float NOT NULL COMMENT 'Minimal version',
@@ -11007,7 +11012,7 @@ CREATE TABLE `browser` (
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`defaultLang` char(2) CHARACTER SET utf8 NOT NULL COMMENT 'The default language if none is specified',
@@ -11023,7 +11028,7 @@ CREATE TABLE `config` (
`pdfsDir` varchar(255) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Directory where PDFs are allocated',
`dmsDir` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Directory where documents are allocated',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11032,12 +11037,12 @@ CREATE TABLE `config` (
DROP TABLE IF EXISTS `contact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contact` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`recipient` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11046,7 +11051,7 @@ CREATE TABLE `contact` (
DROP TABLE IF EXISTS `image`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `image` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`collectionFk` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -11056,7 +11061,7 @@ CREATE TABLE `image` (
PRIMARY KEY (`id`),
UNIQUE KEY `collection` (`collectionFk`,`name`),
CONSTRAINT `image_ibfk_1` FOREIGN KEY (`collectionFk`) REFERENCES `imageCollection` (`name`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=176813 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11065,7 +11070,7 @@ CREATE TABLE `image` (
DROP TABLE IF EXISTS `imageCollection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `imageCollection` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -11079,7 +11084,7 @@ CREATE TABLE `imageCollection` (
`column` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Deprecated',
PRIMARY KEY (`id`),
UNIQUE KEY `name` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11088,7 +11093,7 @@ CREATE TABLE `imageCollection` (
DROP TABLE IF EXISTS `imageCollectionSize`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `imageCollectionSize` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`collectionFk` int(10) unsigned NOT NULL,
@@ -11098,7 +11103,7 @@ CREATE TABLE `imageCollectionSize` (
PRIMARY KEY (`id`),
KEY `image_schema_id` (`collectionFk`),
CONSTRAINT `imageCollectionSize_ibfk_1` FOREIGN KEY (`collectionFk`) REFERENCES `imageCollection` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11107,14 +11112,14 @@ CREATE TABLE `imageCollectionSize` (
DROP TABLE IF EXISTS `imageConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `imageConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`maxSize` int(10) unsigned NOT NULL COMMENT 'Maximun size for uploaded images in MB',
`useXsendfile` tinyint(4) NOT NULL COMMENT 'Whether to use the apache module XSendfile',
`url` varchar(255) NOT NULL COMMENT 'Public URL where image are hosted',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COMMENT='Global image parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COMMENT='Global image parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11123,7 +11128,7 @@ CREATE TABLE `imageConfig` (
DROP TABLE IF EXISTS `language`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `language` (
`code` varchar(10) CHARACTER SET utf8 NOT NULL,
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
@@ -11139,7 +11144,7 @@ CREATE TABLE `language` (
DROP TABLE IF EXISTS `link`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `link` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -11147,7 +11152,7 @@ CREATE TABLE `link` (
`link` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
`image` varchar(30) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=37 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11219,7 +11224,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `location`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `location` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`lat` varchar(12) COLLATE utf8_unicode_ci NOT NULL,
@@ -11232,7 +11237,7 @@ CREATE TABLE `location` (
`phone` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
`language` char(2) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11241,7 +11246,7 @@ CREATE TABLE `location` (
DROP TABLE IF EXISTS `mailConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT COMMENT 'Identifier',
`host` varchar(255) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'localhost' COMMENT 'SMTP host',
@@ -11252,7 +11257,7 @@ CREATE TABLE `mailConfig` (
`user` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'SMTP user',
`password` varchar(100) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'SMTP password, base64 encoded',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11261,7 +11266,7 @@ CREATE TABLE `mailConfig` (
DROP TABLE IF EXISTS `mainAccount`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mainAccount` (
`accountFk` mediumint(8) unsigned NOT NULL,
PRIMARY KEY (`accountFk`)
@@ -11269,13 +11274,13 @@ CREATE TABLE `mainAccount` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `mainAccountBank`
+-- Temporary table structure for view `mainAccountBank`
--
DROP TABLE IF EXISTS `mainAccountBank`;
/*!50001 DROP VIEW IF EXISTS `mainAccountBank`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `mainAccountBank` AS SELECT
1 AS `name`,
1 AS `iban`*/;
@@ -11287,7 +11292,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `menu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `menu` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -11299,7 +11304,7 @@ CREATE TABLE `menu` (
KEY `group_id` (`roleFk`),
KEY `parent` (`parentFk`),
CONSTRAINT `menu_ibfk_1` FOREIGN KEY (`roleFk`) REFERENCES `account`.`role` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11308,14 +11313,14 @@ CREATE TABLE `menu` (
DROP TABLE IF EXISTS `message`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `message` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`code` char(35) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
-) ENGINE=InnoDB AUTO_INCREMENT=17 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11324,7 +11329,7 @@ CREATE TABLE `message` (
DROP TABLE IF EXISTS `metatag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `metatag` (
`id` int(11) NOT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -11335,13 +11340,13 @@ CREATE TABLE `metatag` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `myAddress`
+-- Temporary table structure for view `myAddress`
--
DROP TABLE IF EXISTS `myAddress`;
/*!50001 DROP VIEW IF EXISTS `myAddress`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myAddress` AS SELECT
1 AS `id`,
1 AS `clientFk`,
@@ -11359,13 +11364,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myBasket`
+-- Temporary table structure for view `myBasket`
--
DROP TABLE IF EXISTS `myBasket`;
/*!50001 DROP VIEW IF EXISTS `myBasket`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myBasket` AS SELECT
1 AS `id`,
1 AS `made`,
@@ -11379,13 +11384,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myBasketDefaults`
+-- Temporary table structure for view `myBasketDefaults`
--
DROP TABLE IF EXISTS `myBasketDefaults`;
/*!50001 DROP VIEW IF EXISTS `myBasketDefaults`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myBasketDefaults` AS SELECT
1 AS `deliveryMethod`,
1 AS `agencyModeFk`,
@@ -11394,13 +11399,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myBasketItem`
+-- Temporary table structure for view `myBasketItem`
--
DROP TABLE IF EXISTS `myBasketItem`;
/*!50001 DROP VIEW IF EXISTS `myBasketItem`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myBasketItem` AS SELECT
1 AS `id`,
1 AS `orderFk`,
@@ -11411,13 +11416,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myClient`
+-- Temporary table structure for view `myClient`
--
DROP TABLE IF EXISTS `myClient`;
/*!50001 DROP VIEW IF EXISTS `myClient`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myClient` AS SELECT
1 AS `id`,
1 AS `isToBeMailed`,
@@ -11426,13 +11431,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myInvoice`
+-- Temporary table structure for view `myInvoice`
--
DROP TABLE IF EXISTS `myInvoice`;
/*!50001 DROP VIEW IF EXISTS `myInvoice`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myInvoice` AS SELECT
1 AS `id`,
1 AS `ref`,
@@ -11442,13 +11447,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myMenu`
+-- Temporary table structure for view `myMenu`
--
DROP TABLE IF EXISTS `myMenu`;
/*!50001 DROP VIEW IF EXISTS `myMenu`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myMenu` AS SELECT
1 AS `id`,
1 AS `path`,
@@ -11457,13 +11462,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myOrder`
+-- Temporary table structure for view `myOrder`
--
DROP TABLE IF EXISTS `myOrder`;
/*!50001 DROP VIEW IF EXISTS `myOrder`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myOrder` AS SELECT
1 AS `id`,
1 AS `landed`,
@@ -11481,13 +11486,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myOrderRow`
+-- Temporary table structure for view `myOrderRow`
--
DROP TABLE IF EXISTS `myOrderRow`;
/*!50001 DROP VIEW IF EXISTS `myOrderRow`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myOrderRow` AS SELECT
1 AS `id`,
1 AS `Fk`,
@@ -11502,26 +11507,26 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myOrderTicket`
+-- Temporary table structure for view `myOrderTicket`
--
DROP TABLE IF EXISTS `myOrderTicket`;
/*!50001 DROP VIEW IF EXISTS `myOrderTicket`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myOrderTicket` AS SELECT
1 AS `orderFk`,
1 AS `ticketFk`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myTicket`
+-- Temporary table structure for view `myTicket`
--
DROP TABLE IF EXISTS `myTicket`;
/*!50001 DROP VIEW IF EXISTS `myTicket`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myTicket` AS SELECT
1 AS `id`,
1 AS `clientFk`,
@@ -11537,13 +11542,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myTicketRow`
+-- Temporary table structure for view `myTicketRow`
--
DROP TABLE IF EXISTS `myTicketRow`;
/*!50001 DROP VIEW IF EXISTS `myTicketRow`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myTicketRow` AS SELECT
1 AS `id`,
1 AS `itemFk`,
@@ -11557,13 +11562,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myTicketState`
+-- Temporary table structure for view `myTicketState`
--
DROP TABLE IF EXISTS `myTicketState`;
/*!50001 DROP VIEW IF EXISTS `myTicketState`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myTicketState` AS SELECT
1 AS `id`,
1 AS `clientFk`,
@@ -11581,13 +11586,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `myTpvTransaction`
+-- Temporary table structure for view `myTpvTransaction`
--
DROP TABLE IF EXISTS `myTpvTransaction`;
/*!50001 DROP VIEW IF EXISTS `myTpvTransaction`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `myTpvTransaction` AS SELECT
1 AS `id`,
1 AS `merchantFk`,
@@ -11605,7 +11610,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `news`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `news` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
@@ -11620,7 +11625,7 @@ CREATE TABLE `news` (
KEY `tag` (`tag`),
CONSTRAINT `news_ibfk_1` FOREIGN KEY (`userFk`) REFERENCES `account`.`account` (`id`) ON UPDATE CASCADE,
CONSTRAINT `news_ibfk_2` FOREIGN KEY (`tag`) REFERENCES `newsTag` (`name`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=13076 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11692,7 +11697,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `newsTag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `newsTag` (
`name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
@@ -11706,7 +11711,7 @@ CREATE TABLE `newsTag` (
DROP TABLE IF EXISTS `order`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `order` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`date_send` date NOT NULL DEFAULT '0000-00-00',
@@ -11737,7 +11742,7 @@ CREATE TABLE `order` (
CONSTRAINT `order_ibfk_5` FOREIGN KEY (`address_id`) REFERENCES `vn`.`address` (`id`) ON UPDATE CASCADE,
CONSTRAINT `order_ibfk_8` FOREIGN KEY (`delivery_method_id`) REFERENCES `vn`.`deliveryMethod` (`id`) ON UPDATE CASCADE,
CONSTRAINT `order_ibfk_9` FOREIGN KEY (`agency_id`) REFERENCES `vn`.`agencyMode` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2286868 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11792,7 +11797,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `orderConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `orderConfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`employeeFk` int(11) NOT NULL,
@@ -11814,7 +11819,7 @@ CREATE TABLE `orderConfig` (
CONSTRAINT `orderConfig_ibfk_3` FOREIGN KEY (`guestAgencyFk`) REFERENCES `vn`.`agencyMode` (`id`) ON UPDATE CASCADE,
CONSTRAINT `orderConfig_ibfk_4` FOREIGN KEY (`defaultAgencyFk`) REFERENCES `vn`.`agencyMode` (`id`),
CONSTRAINT `orderConfig_ibfk_5` FOREIGN KEY (`guestAddressFk`) REFERENCES `vn`.`address` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -11823,7 +11828,7 @@ CREATE TABLE `orderConfig` (
DROP TABLE IF EXISTS `orderRecalc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `orderRecalc` (
`orderFk` int(10) unsigned NOT NULL,
PRIMARY KEY (`orderFk`),
@@ -11837,7 +11842,7 @@ CREATE TABLE `orderRecalc` (
DROP TABLE IF EXISTS `orderRow`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `orderRow` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`orderFk` int(10) unsigned NOT NULL DEFAULT '0',
@@ -11856,7 +11861,7 @@ CREATE TABLE `orderRow` (
KEY `warehouse_shipment` (`warehouseFk`,`shipment`),
CONSTRAINT `orderRow_ibfk_2` FOREIGN KEY (`itemFk`) REFERENCES `vn`.`item` (`id`) ON UPDATE CASCADE,
CONSTRAINT `orderRow_ibfk_3` FOREIGN KEY (`orderFk`) REFERENCES `order` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=13685290 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -11958,7 +11963,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `orderRowComponent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `orderRowComponent` (
`rowFk` int(10) unsigned NOT NULL,
`componentFk` int(11) NOT NULL,
@@ -11970,26 +11975,26 @@ CREATE TABLE `orderRowComponent` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `orderTicket`
+-- Temporary table structure for view `orderTicket`
--
DROP TABLE IF EXISTS `orderTicket`;
/*!50001 DROP VIEW IF EXISTS `orderTicket`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `orderTicket` AS SELECT
1 AS `orderFk`,
1 AS `ticketFk`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `order_component`
+-- Temporary table structure for view `order_component`
--
DROP TABLE IF EXISTS `order_component`;
/*!50001 DROP VIEW IF EXISTS `order_component`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `order_component` AS SELECT
1 AS `order_row_id`,
1 AS `component_id`,
@@ -11997,13 +12002,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `order_row`
+-- Temporary table structure for view `order_row`
--
DROP TABLE IF EXISTS `order_row`;
/*!50001 DROP VIEW IF EXISTS `order_row`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `order_row` AS SELECT
1 AS `id`,
1 AS `order_id`,
@@ -12023,7 +12028,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `restPriv`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `restPriv` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`methodPath` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -12031,7 +12036,7 @@ CREATE TABLE `restPriv` (
PRIMARY KEY (`id`),
KEY `role` (`role`),
CONSTRAINT `restPriv_ibfk_1` FOREIGN KEY (`role`) REFERENCES `account`.`role` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12040,7 +12045,7 @@ CREATE TABLE `restPriv` (
DROP TABLE IF EXISTS `shelf`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shelf` (
`id` int(10) unsigned NOT NULL,
`name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -12059,7 +12064,7 @@ CREATE TABLE `shelf` (
DROP TABLE IF EXISTS `shelfConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shelfConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
@@ -12077,7 +12082,7 @@ CREATE TABLE `shelfConfig` (
CONSTRAINT `shelfConfig_ibfk_1` FOREIGN KEY (`family`) REFERENCES `vn`.`itemType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `shelfConfig_ibfk_2` FOREIGN KEY (`shelf`) REFERENCES `shelf` (`id`) ON UPDATE CASCADE,
CONSTRAINT `shelfConfig_ibfk_3` FOREIGN KEY (`warehouse`) REFERENCES `vn`.`warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12086,7 +12091,7 @@ CREATE TABLE `shelfConfig` (
DROP TABLE IF EXISTS `social`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `social` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -12095,7 +12100,7 @@ CREATE TABLE `social` (
`priority` tinyint(3) unsigned NOT NULL,
PRIMARY KEY (`id`),
KEY `priority` (`priority`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12104,12 +12109,12 @@ CREATE TABLE `social` (
DROP TABLE IF EXISTS `survey`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `survey` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`question` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12118,7 +12123,7 @@ CREATE TABLE `survey` (
DROP TABLE IF EXISTS `surveyAnswer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `surveyAnswer` (
`id` int(10) unsigned NOT NULL,
`surveyFk` int(10) unsigned NOT NULL,
@@ -12135,7 +12140,7 @@ CREATE TABLE `surveyAnswer` (
DROP TABLE IF EXISTS `surveyVote`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `surveyVote` (
`surveyFk` int(10) unsigned NOT NULL,
`userFk` int(10) unsigned NOT NULL,
@@ -12152,7 +12157,7 @@ CREATE TABLE `surveyVote` (
DROP TABLE IF EXISTS `tpvConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`currency` smallint(5) unsigned NOT NULL,
@@ -12168,7 +12173,7 @@ CREATE TABLE `tpvConfig` (
PRIMARY KEY (`id`),
KEY `employee_id` (`employeeFk`),
CONSTRAINT `employee_id` FOREIGN KEY (`employeeFk`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Virtual TPV parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Virtual TPV parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12177,7 +12182,7 @@ CREATE TABLE `tpvConfig` (
DROP TABLE IF EXISTS `tpvError`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvError` (
`code` char(7) COLLATE utf8_unicode_ci NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -12191,7 +12196,7 @@ CREATE TABLE `tpvError` (
DROP TABLE IF EXISTS `tpvImapConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvImapConfig` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`host` varchar(150) COLLATE utf8_unicode_ci NOT NULL,
@@ -12201,7 +12206,7 @@ CREATE TABLE `tpvImapConfig` (
`successFolder` varchar(150) CHARACTER SET utf8 DEFAULT NULL,
`errorFolder` varchar(150) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='IMAP configuration parameters for virtual TPV';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='IMAP configuration parameters for virtual TPV';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12210,7 +12215,7 @@ CREATE TABLE `tpvImapConfig` (
DROP TABLE IF EXISTS `tpvMerchant`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvMerchant` (
`id` int(10) unsigned NOT NULL COMMENT 'Merchant identifier',
`description` varchar(50) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Small description',
@@ -12230,7 +12235,7 @@ CREATE TABLE `tpvMerchant` (
DROP TABLE IF EXISTS `tpvMerchantEnable`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvMerchantEnable` (
`merchantFk` int(10) unsigned NOT NULL DEFAULT '0',
`companyFk` smallint(6) unsigned NOT NULL,
@@ -12246,7 +12251,7 @@ CREATE TABLE `tpvMerchantEnable` (
DROP TABLE IF EXISTS `tpvResponse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvResponse` (
`id` smallint(5) unsigned NOT NULL,
`message` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -12260,7 +12265,7 @@ CREATE TABLE `tpvResponse` (
DROP TABLE IF EXISTS `tpvTransaction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tpvTransaction` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`merchantFk` int(10) unsigned NOT NULL,
@@ -12280,7 +12285,7 @@ CREATE TABLE `tpvTransaction` (
CONSTRAINT `receipt_id` FOREIGN KEY (`receiptFk`) REFERENCES `vn`.`receipt` (`Id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `tpvTransaction_ibfk_1` FOREIGN KEY (`clientFk`) REFERENCES `vn`.`client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `tpvTransaction_ibfk_2` FOREIGN KEY (`merchantFk`) REFERENCES `tpvMerchant` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=379747 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12289,7 +12294,7 @@ CREATE TABLE `tpvTransaction` (
DROP TABLE IF EXISTS `userSession`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `userSession` (
`created` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
`lastUpdate` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -12308,14 +12313,14 @@ CREATE TABLE `userSession` (
DROP TABLE IF EXISTS `visit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visit` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`firstAgentFk` int(10) unsigned DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `firstAgent` (`firstAgentFk`),
CONSTRAINT `visit_ibfk_1` FOREIGN KEY (`firstAgentFk`) REFERENCES `visitAgent` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2035382 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12324,7 +12329,7 @@ CREATE TABLE `visit` (
DROP TABLE IF EXISTS `visitAccess`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visitAccess` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`agentFk` int(10) unsigned NOT NULL,
@@ -12335,7 +12340,7 @@ CREATE TABLE `visitAccess` (
KEY `visit_access_idx_agent` (`agentFk`),
KEY `stamp` (`stamp`),
CONSTRAINT `visitAccess_ibfk_1` FOREIGN KEY (`agentFk`) REFERENCES `visitAgent` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=4558610 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12344,7 +12349,7 @@ CREATE TABLE `visitAccess` (
DROP TABLE IF EXISTS `visitAgent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visitAgent` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`visitFk` int(10) unsigned NOT NULL,
@@ -12360,7 +12365,7 @@ CREATE TABLE `visitAgent` (
KEY `firstAccess` (`firstAccessFk`),
CONSTRAINT `visitAgent_ibfk_1` FOREIGN KEY (`visitFk`) REFERENCES `visit` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `visitAgent_ibfk_2` FOREIGN KEY (`firstAccessFk`) REFERENCES `visitAccess` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2687431 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12369,7 +12374,7 @@ CREATE TABLE `visitAgent` (
DROP TABLE IF EXISTS `visitUser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visitUser` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`accessFk` int(10) unsigned NOT NULL,
@@ -12380,7 +12385,7 @@ CREATE TABLE `visitUser` (
KEY `date_time` (`stamp`),
KEY `user_id` (`userFk`),
CONSTRAINT `visitUser_ibfk_1` FOREIGN KEY (`accessFk`) REFERENCES `visitAccess` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3988167 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -12961,30 +12966,30 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `item_listAllocation`(IN `vWh` TINYINT, IN `vDate` DATE, IN `vType` INT, IN `vPrefix` VARCHAR(255), IN `vUseIds` BOOLEAN)
-BEGIN
-/**
- * Lists visible items and it's box sizes of the specified
- * type at specified date.
- *
- * @param vWh The warehouse id
- * @param vDate The visible date
- * @param vType The type id
- * @param vPrefix The article prefix to filter or %NULL for all
- * @param vUseIds Whether to order the result by item id
- * @select List of visible items with it's box sizes
- */
- CALL item_getVisible(vWh, vDate, vType, vPrefix);
-
- IF vUseIds
- THEN
- SELECT * FROM tmp.itemVisible
- ORDER BY Id_Article;
- ELSE
- SELECT * FROM tmp.itemVisible
- ORDER BY Article, packing;
- END IF;
-
- DROP TEMPORARY TABLE tmp.itemVisible;
+BEGIN
+/**
+ * Lists visible items and it's box sizes of the specified
+ * type at specified date.
+ *
+ * @param vWh The warehouse id
+ * @param vDate The visible date
+ * @param vType The type id
+ * @param vPrefix The article prefix to filter or %NULL for all
+ * @param vUseIds Whether to order the result by item id
+ * @select List of visible items with it's box sizes
+ */
+ CALL item_getVisible(vWh, vDate, vType, vPrefix);
+
+ IF vUseIds
+ THEN
+ SELECT * FROM tmp.itemVisible
+ ORDER BY Id_Article;
+ ELSE
+ SELECT * FROM tmp.itemVisible
+ ORDER BY Article, packing;
+ END IF;
+
+ DROP TEMPORARY TABLE tmp.itemVisible;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -15629,7 +15634,7 @@ USE `nst`;
DROP TABLE IF EXISTS `balance`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `balance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lft` int(11) NOT NULL,
@@ -15647,7 +15652,7 @@ CREATE TABLE `balance` (
DROP TABLE IF EXISTS `geo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `geo` (
`id` int(11) NOT NULL,
`lft` int(11) DEFAULT NULL,
@@ -15668,7 +15673,7 @@ CREATE TABLE `geo` (
DROP TABLE IF EXISTS `labourTree`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `labourTree` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lft` int(11) NOT NULL,
@@ -15677,7 +15682,7 @@ CREATE TABLE `labourTree` (
`sons` int(11) NOT NULL DEFAULT '0',
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=92 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -15686,7 +15691,7 @@ CREATE TABLE `labourTree` (
DROP TABLE IF EXISTS `nst`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nst` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`lft` int(11) NOT NULL,
@@ -15694,7 +15699,7 @@ CREATE TABLE `nst` (
PRIMARY KEY (`id`),
UNIQUE KEY `lft_UNIQUE` (`lft`),
UNIQUE KEY `rgt_UNIQUE` (`rgt`)
-) ENGINE=InnoDB AUTO_INCREMENT=6681 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16039,7 +16044,7 @@ USE `pbx`;
DROP TABLE IF EXISTS `blacklist`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `blacklist` (
`phone` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`phone`)
@@ -16092,7 +16097,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `cdr`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cdr` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`call_date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -16118,17 +16123,17 @@ CREATE TABLE `cdr` (
KEY `dstchannel` (`dst_channel`),
KEY `disposition` (`disposition`),
KEY `src` (`src`)
-) ENGINE=InnoDB AUTO_INCREMENT=321003 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `cdrConf`
+-- Temporary table structure for view `cdrConf`
--
DROP TABLE IF EXISTS `cdrConf`;
/*!50001 DROP VIEW IF EXISTS `cdrConf`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `cdrConf` AS SELECT
1 AS `calldate`,
1 AS `clid`,
@@ -16154,13 +16159,13 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`sundayFestive` tinyint(4) NOT NULL,
`countryPrefix` varchar(20) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16169,7 +16174,7 @@ CREATE TABLE `config` (
DROP TABLE IF EXISTS `followme`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `followme` (
`extension` varchar(128) CHARACTER SET utf8 NOT NULL,
`phone` varchar(20) CHARACTER SET utf8 NOT NULL,
@@ -16219,13 +16224,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `followmeConf`
+-- Temporary table structure for view `followmeConf`
--
DROP TABLE IF EXISTS `followmeConf`;
/*!50001 DROP VIEW IF EXISTS `followmeConf`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `followmeConf` AS SELECT
1 AS `name`,
1 AS `music`,
@@ -16240,7 +16245,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `followmeConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `followmeConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`music` varchar(50) CHARACTER SET utf8 DEFAULT NULL,
@@ -16249,17 +16254,17 @@ CREATE TABLE `followmeConfig` (
`declineCall` char(1) CHARACTER SET utf8 NOT NULL,
`timeout` int(11) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `followmeNumberConf`
+-- Temporary table structure for view `followmeNumberConf`
--
DROP TABLE IF EXISTS `followmeNumberConf`;
/*!50001 DROP VIEW IF EXISTS `followmeNumberConf`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `followmeNumberConf` AS SELECT
1 AS `name`,
1 AS `ordinal`,
@@ -16273,7 +16278,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `queue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `queue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(128) CHARACTER SET utf8 NOT NULL,
@@ -16284,7 +16289,7 @@ CREATE TABLE `queue` (
UNIQUE KEY `description` (`description`),
KEY `config` (`config`),
CONSTRAINT `queue_ibfk_1` FOREIGN KEY (`config`) REFERENCES `queueConfig` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Queues';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Queues';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -16328,13 +16333,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `queueConf`
+-- Temporary table structure for view `queueConf`
--
DROP TABLE IF EXISTS `queueConf`;
/*!50001 DROP VIEW IF EXISTS `queueConf`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `queueConf` AS SELECT
1 AS `name`,
1 AS `strategy`,
@@ -16351,7 +16356,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `queueConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `queueConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`strategy` varchar(128) CHARACTER SET utf8 NOT NULL,
@@ -16361,7 +16366,7 @@ CREATE TABLE `queueConfig` (
`maxLen` int(10) unsigned NOT NULL,
`ringInUse` tinyint(4) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Default values for queues configuration';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Default values for queues configuration';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16370,7 +16375,7 @@ CREATE TABLE `queueConfig` (
DROP TABLE IF EXISTS `queueMember`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `queueMember` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`queue` varchar(128) CHARACTER SET utf8 NOT NULL,
@@ -16380,17 +16385,17 @@ CREATE TABLE `queueMember` (
KEY `extension` (`extension`),
CONSTRAINT `queueMember_ibfk_1` FOREIGN KEY (`queue`) REFERENCES `queue` (`name`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `queueMember_ibfk_2` FOREIGN KEY (`extension`) REFERENCES `sip` (`extension`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=792 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Queue members';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Queue members';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `queueMemberConf`
+-- Temporary table structure for view `queueMemberConf`
--
DROP TABLE IF EXISTS `queueMemberConf`;
/*!50001 DROP VIEW IF EXISTS `queueMemberConf`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `queueMemberConf` AS SELECT
1 AS `uniqueid`,
1 AS `queue_name`,
@@ -16404,7 +16409,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `queuePhone`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `queuePhone` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`queue` varchar(128) CHARACTER SET utf8 NOT NULL,
@@ -16412,7 +16417,7 @@ CREATE TABLE `queuePhone` (
PRIMARY KEY (`id`),
UNIQUE KEY `queue` (`queue`,`phone`),
CONSTRAINT `queuePhone_ibfk_1` FOREIGN KEY (`queue`) REFERENCES `queue` (`name`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1003 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -16461,7 +16466,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `schedule`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `schedule` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`weekDay` tinyint(3) unsigned NOT NULL COMMENT '0 = Monday, 6 = Sunday',
@@ -16471,7 +16476,7 @@ CREATE TABLE `schedule` (
PRIMARY KEY (`id`),
KEY `queue` (`queue`),
CONSTRAINT `schedule_ibfk_1` FOREIGN KEY (`queue`) REFERENCES `queue` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16480,7 +16485,7 @@ CREATE TABLE `schedule` (
DROP TABLE IF EXISTS `sip`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sip` (
`user_id` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'The user id',
`extension` varchar(128) CHARACTER SET utf8 NOT NULL COMMENT 'The softphone extension',
@@ -16583,13 +16588,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `sipConf`
+-- Temporary table structure for view `sipConf`
--
DROP TABLE IF EXISTS `sipConf`;
/*!50001 DROP VIEW IF EXISTS `sipConf`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `sipConf` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -16622,7 +16627,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `sipConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sipConfig` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`host` varchar(40) CHARACTER SET utf8 DEFAULT NULL,
@@ -16644,7 +16649,7 @@ CREATE TABLE `sipConfig` (
`dtlsprivatekey` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`dtlssetup` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Default values for SIP accounts';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Default values for SIP accounts';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16653,7 +16658,7 @@ CREATE TABLE `sipConfig` (
DROP TABLE IF EXISTS `sipReg`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sipReg` (
`userId` int(10) unsigned NOT NULL,
`ipAddr` varchar(45) CHARACTER SET utf8 DEFAULT NULL,
@@ -16890,7 +16895,7 @@ USE `postgresql`;
DROP TABLE IF EXISTS `address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `address` (
`address_id` int(11) NOT NULL AUTO_INCREMENT,
`town_id` int(11) NOT NULL,
@@ -16904,7 +16909,7 @@ CREATE TABLE `address` (
KEY `address_town_id_idx` (`town_id`),
CONSTRAINT `address_ibfk_1` FOREIGN KEY (`address_type_id`) REFERENCES `address_type` (`address_type_id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `address_ibfk_2` FOREIGN KEY (`town_id`) REFERENCES `townKk` (`town_id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=846 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16913,12 +16918,12 @@ CREATE TABLE `address` (
DROP TABLE IF EXISTS `address_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `address_type` (
`address_type_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(20) NOT NULL,
PRIMARY KEY (`address_type_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=45 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16927,7 +16932,7 @@ CREATE TABLE `address_type` (
DROP TABLE IF EXISTS `bank_account`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bank_account` (
`bank_account_id` int(11) NOT NULL AUTO_INCREMENT,
`client_id` int(11) DEFAULT NULL,
@@ -16950,7 +16955,7 @@ CREATE TABLE `bank_account` (
CONSTRAINT `bank_account_bank_account_type_id_fkey` FOREIGN KEY (`bank_account_type_id`) REFERENCES `bank_account_type` (`bank_account_type_id`) ON UPDATE CASCADE,
CONSTRAINT `bank_account_nation_id_fkey` FOREIGN KEY (`nation_id`) REFERENCES `nation` (`nation_id`) ON UPDATE CASCADE,
CONSTRAINT `bank_profile` FOREIGN KEY (`client_id`) REFERENCES `profile` (`profile_id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=937 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16959,12 +16964,12 @@ CREATE TABLE `bank_account` (
DROP TABLE IF EXISTS `bank_account_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bank_account_type` (
`bank_account_type_id` int(11) NOT NULL AUTO_INCREMENT,
`name` char(15) DEFAULT NULL,
PRIMARY KEY (`bank_account_type_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -16973,7 +16978,7 @@ CREATE TABLE `bank_account_type` (
DROP TABLE IF EXISTS `bank_bic`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bank_bic` (
`nrbe` int(11) NOT NULL,
`denominacion` varchar(255) DEFAULT NULL,
@@ -16991,7 +16996,7 @@ CREATE TABLE `bank_bic` (
DROP TABLE IF EXISTS `business`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `business` (
`business_id` int(11) NOT NULL AUTO_INCREMENT,
`client_id` int(11) DEFAULT NULL,
@@ -17005,7 +17010,7 @@ CREATE TABLE `business` (
KEY `bussiness_provider` (`provider_id`),
CONSTRAINT `business_client` FOREIGN KEY (`client_id`) REFERENCES `profile` (`profile_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `bussiness_provider` FOREIGN KEY (`provider_id`) REFERENCES `profile` (`profile_id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3059 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17014,7 +17019,7 @@ CREATE TABLE `business` (
DROP TABLE IF EXISTS `business_labour`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `business_labour` (
`business_id` int(11) NOT NULL,
`notes` longtext,
@@ -17044,7 +17049,7 @@ CREATE TABLE `business_labour` (
DROP TABLE IF EXISTS `business_labour_payroll`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `business_labour_payroll` (
`business_id` int(11) NOT NULL,
`cod_tarifa` int(11) DEFAULT NULL,
@@ -17062,7 +17067,7 @@ CREATE TABLE `business_labour_payroll` (
DROP TABLE IF EXISTS `calendar_employee`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendar_employee` (
`business_id` int(11) NOT NULL,
`calendar_state_id` int(11) NOT NULL,
@@ -17080,13 +17085,13 @@ CREATE TABLE `calendar_employee` (
DROP TABLE IF EXISTS `calendar_free`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendar_free` (
`calendar_free_id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(20) NOT NULL,
`rgb` varchar(7) DEFAULT NULL,
PRIMARY KEY (`calendar_free_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17095,7 +17100,7 @@ CREATE TABLE `calendar_free` (
DROP TABLE IF EXISTS `calendar_labour`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendar_labour` (
`calendar_free_id` int(11) NOT NULL,
`person_id` int(11) NOT NULL,
@@ -17112,7 +17117,7 @@ CREATE TABLE `calendar_labour` (
CONSTRAINT `fk_calendar_labour_calendar_free1` FOREIGN KEY (`calendar_free_id`) REFERENCES `calendar_free` (`calendar_free_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fk_calendar_labour_legend_id` FOREIGN KEY (`calendar_labour_legend_id`) REFERENCES `calendar_labour_legend` (`calendar_labour_legend_id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `workcenter_calendar` FOREIGN KEY (`workcenter_id`) REFERENCES `workcenter` (`workcenter_id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=586 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17121,13 +17126,13 @@ CREATE TABLE `calendar_labour` (
DROP TABLE IF EXISTS `calendar_labour_legend`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendar_labour_legend` (
`calendar_labour_legend_id` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` longtext,
PRIMARY KEY (`calendar_labour_legend_id`),
UNIQUE KEY `calendar_labour_legend_calendar_labour_legend_id_key` (`calendar_labour_legend_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17136,7 +17141,7 @@ CREATE TABLE `calendar_labour_legend` (
DROP TABLE IF EXISTS `calendar_labour_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendar_labour_type` (
`calendar_labour_type_id` int(11) NOT NULL AUTO_INCREMENT,
`descripcion` varchar(50) DEFAULT NULL,
@@ -17145,7 +17150,7 @@ CREATE TABLE `calendar_labour_type` (
`isPartial` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`calendar_labour_type_id`),
UNIQUE KEY `hours_labour_hours_labour_id_key` (`calendar_labour_type_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=33 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17154,7 +17159,7 @@ CREATE TABLE `calendar_labour_type` (
DROP TABLE IF EXISTS `calendar_state`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendar_state` (
`calendar_state_id` int(11) NOT NULL AUTO_INCREMENT,
`type` varchar(30) NOT NULL,
@@ -17164,7 +17169,7 @@ CREATE TABLE `calendar_state` (
`code` varchar(45) DEFAULT NULL,
`isAllowedToWork` tinyint(4) NOT NULL DEFAULT '0',
PRIMARY KEY (`calendar_state_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17173,12 +17178,12 @@ CREATE TABLE `calendar_state` (
DROP TABLE IF EXISTS `currency`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `currency` (
`currency_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
PRIMARY KEY (`currency_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17187,7 +17192,7 @@ CREATE TABLE `currency` (
DROP TABLE IF EXISTS `income_employee`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `income_employee` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`debe` decimal(10,2) DEFAULT NULL,
@@ -17201,7 +17206,7 @@ CREATE TABLE `income_employee` (
KEY `fperson_id` (`person_id`),
CONSTRAINT `fincometype_id` FOREIGN KEY (`id_incomeType`) REFERENCES `incometype_employee` (`id_incometype`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `fperson_id` FOREIGN KEY (`person_id`) REFERENCES `person` (`person_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=76272 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17210,7 +17215,7 @@ CREATE TABLE `income_employee` (
DROP TABLE IF EXISTS `incometype_employee`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `incometype_employee` (
`id_incometype` int(11) NOT NULL,
`descripcion` varchar(255) DEFAULT NULL,
@@ -17225,7 +17230,7 @@ CREATE TABLE `incometype_employee` (
DROP TABLE IF EXISTS `journey`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `journey` (
`journey_id` int(11) NOT NULL AUTO_INCREMENT,
`day_id` smallint(6) NOT NULL DEFAULT '1' COMMENT 'Lunes = 1 \nDomingo = 7',
@@ -17235,7 +17240,7 @@ CREATE TABLE `journey` (
PRIMARY KEY (`journey_id`),
KEY `fki_business_journey` (`business_id`),
CONSTRAINT `business_journey` FOREIGN KEY (`business_id`) REFERENCES `business_labour` (`business_id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2716 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17244,7 +17249,7 @@ CREATE TABLE `journey` (
DROP TABLE IF EXISTS `labour_agreement`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `labour_agreement` (
`labour_agreement_id` int(11) NOT NULL AUTO_INCREMENT,
`month_hollidays` double DEFAULT NULL,
@@ -17253,7 +17258,7 @@ CREATE TABLE `labour_agreement` (
`date_START` date DEFAULT NULL,
`date_END` date DEFAULT NULL,
PRIMARY KEY (`labour_agreement_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17262,7 +17267,7 @@ CREATE TABLE `labour_agreement` (
DROP TABLE IF EXISTS `media`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `media` (
`media_id` int(11) NOT NULL AUTO_INCREMENT,
`media_type_id` int(11) NOT NULL,
@@ -17271,7 +17276,7 @@ CREATE TABLE `media` (
PRIMARY KEY (`media_id`),
KEY `media_media_type_id_idx` (`media_type_id`),
CONSTRAINT `media_ibfk_1` FOREIGN KEY (`media_type_id`) REFERENCES `media_type` (`media_type_id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1171 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17280,13 +17285,13 @@ CREATE TABLE `media` (
DROP TABLE IF EXISTS `media_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `media_type` (
`media_type_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
PRIMARY KEY (`media_type_id`),
UNIQUE KEY `media_type_name_key` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17295,7 +17300,7 @@ CREATE TABLE `media_type` (
DROP TABLE IF EXISTS `nation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `nation` (
`nation_id` int(11) NOT NULL AUTO_INCREMENT,
`currency_id` int(11) NOT NULL DEFAULT '1',
@@ -17306,7 +17311,7 @@ CREATE TABLE `nation` (
UNIQUE KEY `nation_name_key` (`name`),
KEY `nation_currency_id_idx` (`currency_id`),
CONSTRAINT `nation_ibfk_1` FOREIGN KEY (`currency_id`) REFERENCES `currency` (`currency_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17315,7 +17320,7 @@ CREATE TABLE `nation` (
DROP TABLE IF EXISTS `periodos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `periodos` (
`fecha` date NOT NULL,
`periodo` int(11) DEFAULT NULL,
@@ -17329,7 +17334,7 @@ CREATE TABLE `periodos` (
DROP TABLE IF EXISTS `person`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `person` (
`person_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(60) NOT NULL,
@@ -17352,7 +17357,7 @@ CREATE TABLE `person` (
KEY `index1` (`person_id`,`name`,`nickname`,`firstname`),
KEY `person_worker` (`id_trabajador`),
CONSTRAINT `Person_ibfk_1` FOREIGN KEY (`id_trabajador`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1166 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17361,7 +17366,7 @@ CREATE TABLE `person` (
DROP TABLE IF EXISTS `professional_category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `professional_category` (
`professional_category_id` int(11) NOT NULL AUTO_INCREMENT,
`category_name` varchar(50) NOT NULL,
@@ -17370,7 +17375,7 @@ CREATE TABLE `professional_category` (
`holiday_days` decimal(3,1) DEFAULT NULL,
PRIMARY KEY (`professional_category_id`),
UNIQUE KEY `professional_category_name_category_key` (`category_name`)
-) ENGINE=InnoDB AUTO_INCREMENT=31 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17379,13 +17384,13 @@ CREATE TABLE `professional_category` (
DROP TABLE IF EXISTS `professional_levels`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `professional_levels` (
`professional_levels_id` int(11) NOT NULL AUTO_INCREMENT,
`level_name` varchar(5) DEFAULT NULL,
`price_overtime` double DEFAULT NULL,
PRIMARY KEY (`professional_levels_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17394,7 +17399,7 @@ CREATE TABLE `professional_levels` (
DROP TABLE IF EXISTS `profile`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile` (
`profile_id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL,
@@ -17403,7 +17408,7 @@ CREATE TABLE `profile` (
KEY `profile_person_id_idx` (`person_id`),
KEY `profile_profile_type_id_idx` (`profile_type_id`),
CONSTRAINT `person_fk` FOREIGN KEY (`person_id`) REFERENCES `person` (`person_id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1050 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17412,7 +17417,7 @@ CREATE TABLE `profile` (
DROP TABLE IF EXISTS `profile_address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile_address` (
`profile_address_id` int(11) NOT NULL AUTO_INCREMENT,
`profile_id` int(11) NOT NULL,
@@ -17420,7 +17425,7 @@ CREATE TABLE `profile_address` (
PRIMARY KEY (`profile_address_id`),
KEY `profile_address_address_id_idx` (`address_id`),
KEY `profile_address_profile_id_idx` (`profile_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=182 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17429,7 +17434,7 @@ CREATE TABLE `profile_address` (
DROP TABLE IF EXISTS `profile_media`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile_media` (
`profile_media_id` int(11) NOT NULL AUTO_INCREMENT,
`profile_id` int(11) NOT NULL,
@@ -17439,7 +17444,7 @@ CREATE TABLE `profile_media` (
KEY `profile_media_profile_id_idx` (`profile_id`),
CONSTRAINT `fk_profile_media_media1` FOREIGN KEY (`media_id`) REFERENCES `media` (`media_id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `media_ibfk_20` FOREIGN KEY (`profile_id`) REFERENCES `profile` (`profile_id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1332 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17448,12 +17453,12 @@ CREATE TABLE `profile_media` (
DROP TABLE IF EXISTS `profile_type`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile_type` (
`profile_type_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
PRIMARY KEY (`profile_type_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17462,7 +17467,7 @@ CREATE TABLE `profile_type` (
DROP TABLE IF EXISTS `province`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `province` (
`province_id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(15) NOT NULL,
@@ -17471,7 +17476,7 @@ CREATE TABLE `province` (
UNIQUE KEY `province_name_key` (`name`),
KEY `province_nation_id_idx` (`nation_id`),
CONSTRAINT `fk_province_nation1` FOREIGN KEY (`nation_id`) REFERENCES `nation` (`nation_id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=162 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17480,7 +17485,7 @@ CREATE TABLE `province` (
DROP TABLE IF EXISTS `townKk`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `townKk` (
`town_id` int(11) NOT NULL AUTO_INCREMENT,
`province_id` int(11) NOT NULL,
@@ -17489,7 +17494,7 @@ CREATE TABLE `townKk` (
PRIMARY KEY (`town_id`),
KEY `town_province_id_idx` (`province_id`),
CONSTRAINT `townKk_ibfk_1` FOREIGN KEY (`province_id`) REFERENCES `province` (`province_id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3673 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17498,7 +17503,7 @@ CREATE TABLE `townKk` (
DROP TABLE IF EXISTS `workcenter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workcenter` (
`workcenter_id` int(11) NOT NULL AUTO_INCREMENT,
`name` longtext,
@@ -17506,7 +17511,7 @@ CREATE TABLE `workcenter` (
`counter` bigint(20) DEFAULT NULL,
`warehouseFk` smallint(6) DEFAULT NULL,
PRIMARY KEY (`workcenter_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17515,7 +17520,7 @@ CREATE TABLE `workcenter` (
DROP TABLE IF EXISTS `workerTimeControlConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControlConfig` (
`id` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`warehouseFk` smallint(6) unsigned NOT NULL,
@@ -17531,7 +17536,7 @@ CREATE TABLE `workerTimeControlConfig` (
DROP TABLE IF EXISTS `workers20190711_FichadasAbril`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711_FichadasAbril` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL DEFAULT '0',
@@ -17569,7 +17574,7 @@ USE `salix`;
DROP TABLE IF EXISTS `ACL`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ACL` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`model` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
@@ -17579,7 +17584,7 @@ CREATE TABLE `ACL` (
`principalType` set('ROLE','USER') COLLATE utf8_unicode_ci DEFAULT 'ROLE',
`principalId` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=202 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17588,7 +17593,7 @@ CREATE TABLE `ACL` (
DROP TABLE IF EXISTS `AccessToken`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `AccessToken` (
`id` varchar(255) CHARACTER SET utf8 NOT NULL,
`ttl` int(11) DEFAULT NULL,
@@ -17600,13 +17605,13 @@ CREATE TABLE `AccessToken` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `Account`
+-- Temporary table structure for view `Account`
--
DROP TABLE IF EXISTS `Account`;
/*!50001 DROP VIEW IF EXISTS `Account`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `Account` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -17619,13 +17624,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `Role`
+-- Temporary table structure for view `Role`
--
DROP TABLE IF EXISTS `Role`;
/*!50001 DROP VIEW IF EXISTS `Role`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `Role` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -17635,13 +17640,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `RoleMapping`
+-- Temporary table structure for view `RoleMapping`
--
DROP TABLE IF EXISTS `RoleMapping`;
/*!50001 DROP VIEW IF EXISTS `RoleMapping`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `RoleMapping` AS SELECT
1 AS `id`,
1 AS `principalType`,
@@ -17655,7 +17660,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `fieldAcl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fieldAcl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`model` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -17663,7 +17668,7 @@ CREATE TABLE `fieldAcl` (
`actionType` set('insert','update','*') COLLATE utf8_unicode_ci DEFAULT '*',
`role` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=65 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17672,7 +17677,7 @@ CREATE TABLE `fieldAcl` (
DROP TABLE IF EXISTS `user`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `user` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`realm` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
@@ -17682,7 +17687,7 @@ CREATE TABLE `user` (
`emailVerified` tinyint(1) DEFAULT NULL,
`verificationToken` varchar(512) CHARACTER SET utf8 DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=50054 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17691,7 +17696,7 @@ CREATE TABLE `user` (
DROP TABLE IF EXISTS `userConfigView`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `userConfigView` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userFk` int(10) unsigned NOT NULL,
@@ -17699,7 +17704,7 @@ CREATE TABLE `userConfigView` (
`configuration` text COLLATE utf8_unicode_ci,
PRIMARY KEY (`id`),
UNIQUE KEY `uniqueUser_TableCode` (`userFk`,`tableCode`)
-) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -17779,7 +17784,7 @@ USE `stock`;
DROP TABLE IF EXISTS `inbound`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inbound` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tableName` set('buy','sale') NOT NULL,
@@ -17868,7 +17873,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `inboundPick`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inboundPick` (
`inboundFk` int(10) unsigned DEFAULT NULL,
`outboundFk` int(10) unsigned DEFAULT NULL,
@@ -17884,7 +17889,7 @@ CREATE TABLE `inboundPick` (
DROP TABLE IF EXISTS `log`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `log` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`operation` set('insert','delete') NOT NULL,
@@ -17901,7 +17906,7 @@ CREATE TABLE `log` (
DROP TABLE IF EXISTS `outbound`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `outbound` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`tableName` set('sale','buy','orderRow') NOT NULL,
@@ -17993,7 +17998,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `visible`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `visible` (
`itemFk` int(10) unsigned NOT NULL,
`warehouseFk` int(10) unsigned NOT NULL,
@@ -18292,23 +18297,23 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `log_add`(IN `vTableName` VARCHAR(255), IN `vNewId` VARCHAR(255), IN `vOldId` VARCHAR(255))
-proc: BEGIN
- -- XXX: Disabled while testing
- LEAVE proc;
-
- IF vOldId IS NOT NULL AND !(vOldId <=> vNewId) THEN
- INSERT IGNORE INTO `log` SET
- tableName = vTableName,
- tableId = vOldId,
- operation = 'delete';
- END IF;
-
- IF vNewId IS NOT NULL THEN
- INSERT IGNORE INTO `log` SET
- tableName = vTableName,
- tableId = vNewId,
- operation = 'insert';
- END IF;
+proc: BEGIN
+ -- XXX: Disabled while testing
+ LEAVE proc;
+
+ IF vOldId IS NOT NULL AND !(vOldId <=> vNewId) THEN
+ INSERT IGNORE INTO `log` SET
+ tableName = vTableName,
+ tableId = vOldId,
+ operation = 'delete';
+ END IF;
+
+ IF vNewId IS NOT NULL THEN
+ INSERT IGNORE INTO `log` SET
+ tableName = vTableName,
+ tableId = vNewId,
+ operation = 'insert';
+ END IF;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -18576,29 +18581,29 @@ CREATE DEFINER=`root`@`%` PROCEDURE `log_refreshSale`(
BEGIN
DROP TEMPORARY TABLE IF EXISTS tValues;
CREATE TEMPORARY TABLE tValues
- ENGINE = MEMORY
- SELECT
- m.id saleFk,
- m.ticketFk,
- m.itemFk,
- t.warehouseFk,
- t.shipped,
+ ENGINE = MEMORY
+ SELECT
+ m.id saleFk,
+ m.ticketFk,
+ m.itemFk,
+ t.warehouseFk,
+ t.shipped,
ABS(m.quantity) quantity,
m.created,
TIMESTAMPADD(DAY, tp.life, t.shipped) expired,
m.quantity < 0 isIn,
- m.isPicked OR s.alertLevel > 1 isPicked
- FROM vn.sale m
- JOIN vn.ticket t ON t.id = m.ticketFk
+ m.isPicked OR s.alertLevel > 1 isPicked
+ FROM vn.sale m
+ JOIN vn.ticket t ON t.id = m.ticketFk
JOIN vn.ticketState s ON s.ticketFk = t.id
JOIN vn.item i ON i.id = m.itemFk
- JOIN vn.itemType tp ON tp.id = i.typeFk
+ JOIN vn.itemType tp ON tp.id = i.typeFk
WHERE (
- vTableId IS NULL
- OR (vTableName = 'ticket' AND t.id = vTableId)
- OR (vTableName = 'sale' AND m.id = vTableId)
- )
- AND t.shipped >= vn.getInventoryDate()
+ vTableId IS NULL
+ OR (vTableName = 'ticket' AND t.id = vTableId)
+ OR (vTableName = 'sale' AND m.id = vTableId)
+ )
+ AND t.shipped >= vn.getInventoryDate()
AND m.quantity != 0;
REPLACE INTO inbound (
@@ -18631,7 +18636,7 @@ BEGIN
FROM tValues
WHERE !isIn;
- DROP TEMPORARY TABLE tValues;
+ DROP TEMPORARY TABLE tValues;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -19018,7 +19023,7 @@ USE `util`;
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`dbVersion` char(11) CHARACTER SET utf8 DEFAULT NULL COMMENT 'The current database version',
@@ -19026,7 +19031,7 @@ CREATE TABLE `config` (
`environment` varchar(45) CHARACTER SET utf8 DEFAULT NULL COMMENT 'The current Database environment',
`lastDump` datetime DEFAULT NULL COMMENT 'Timestamp of the last data dump',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration table';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global configuration table';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -19035,7 +19040,7 @@ CREATE TABLE `config` (
DROP TABLE IF EXISTS `debug`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `debug` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP,
@@ -19045,7 +19050,7 @@ CREATE TABLE `debug` (
`variable` varchar(255) CHARACTER SET utf8 DEFAULT NULL,
`value` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=546 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Log de depuración';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Log de depuración';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -19930,7 +19935,7 @@ USE `vn`;
DROP TABLE IF EXISTS `XDiario`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `XDiario` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ASIEN` double DEFAULT NULL,
@@ -20002,7 +20007,7 @@ CREATE TABLE `XDiario` (
PRIMARY KEY (`id`),
KEY `empresa_id` (`empresa_id`),
CONSTRAINT `XDiario_ibfk_1` FOREIGN KEY (`empresa_id`) REFERENCES `company` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=4095537 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20051,13 +20056,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `absenceType`
+-- Temporary table structure for view `absenceType`
--
DROP TABLE IF EXISTS `absenceType`;
/*!50001 DROP VIEW IF EXISTS `absenceType`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `absenceType` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -20071,7 +20076,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `accountingType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accountingType` (
`id` smallint(6) NOT NULL DEFAULT '0',
`description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
@@ -20085,7 +20090,7 @@ CREATE TABLE `accountingType` (
DROP TABLE IF EXISTS `activeContrat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activeContrat` (
`date` date NOT NULL,
`business_id` int(11) NOT NULL,
@@ -20099,7 +20104,7 @@ CREATE TABLE `activeContrat` (
DROP TABLE IF EXISTS `activityTaxDismissed`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `activityTaxDismissed` (
`clientFk` int(11) NOT NULL,
`isNotified` tinyint(1) DEFAULT '0',
@@ -20116,7 +20121,7 @@ CREATE TABLE `activityTaxDismissed` (
DROP TABLE IF EXISTS `address`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `address` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL DEFAULT '0',
@@ -20151,7 +20156,7 @@ CREATE TABLE `address` (
CONSTRAINT `address_ibfk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `address_ibfk_3` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE,
CONSTRAINT `address_ibfk_4` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=29842 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20245,7 +20250,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `addressForPackaging`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `addressForPackaging` (
`addressFk` int(11) NOT NULL,
`packagingValue` decimal(10,2) NOT NULL DEFAULT '0.04',
@@ -20260,7 +20265,7 @@ CREATE TABLE `addressForPackaging` (
DROP TABLE IF EXISTS `addressObservation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `addressObservation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`addressFk` int(11) NOT NULL,
@@ -20271,7 +20276,7 @@ CREATE TABLE `addressObservation` (
KEY `addressObservationFgn_idx` (`observationTypeFk`),
CONSTRAINT `addressFgn` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `addressObservationFgn` FOREIGN KEY (`observationTypeFk`) REFERENCES `observationType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=4245 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20280,7 +20285,7 @@ CREATE TABLE `addressObservation` (
DROP TABLE IF EXISTS `agency`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `agency` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
@@ -20302,7 +20307,7 @@ CREATE TABLE `agency` (
CONSTRAINT `agency_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE,
CONSTRAINT `agency_ibfk_3` FOREIGN KEY (`workCenterFk`) REFERENCES `workCenter` (`id`) ON UPDATE CASCADE,
CONSTRAINT `agency_ibfk_4` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=287 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20329,7 +20334,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `agencyMode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `agencyMode` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -20351,16 +20356,32 @@ CREATE TABLE `agencyMode` (
PRIMARY KEY (`id`),
KEY `Agencias` (`name`),
KEY `Vista` (`deliveryMethodFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=1243 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Temporary table structure for view `agencyProvince__`
+--
+
+DROP TABLE IF EXISTS `agencyProvince__`;
+/*!50001 DROP VIEW IF EXISTS `agencyProvince__`*/;
+SET @saved_cs_client = @@character_set_client;
+SET character_set_client = utf8;
+/*!50001 CREATE VIEW `agencyProvince__` AS SELECT
+ 1 AS `provinceFk`,
+ 1 AS `agencyFk`,
+ 1 AS `zone`,
+ 1 AS `warehouseFk`,
+ 1 AS `isVolumetric`*/;
+SET character_set_client = @saved_cs_client;
+
--
-- Table structure for table `alertLevel`
--
DROP TABLE IF EXISTS `alertLevel`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `alertLevel` (
`code` varchar(45) CHARACTER SET utf8 NOT NULL,
`alertLevel` int(11) NOT NULL,
@@ -20370,13 +20391,13 @@ CREATE TABLE `alertLevel` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `annualAverageInvoiced`
+-- Temporary table structure for view `annualAverageInvoiced`
--
DROP TABLE IF EXISTS `annualAverageInvoiced`;
/*!50001 DROP VIEW IF EXISTS `annualAverageInvoiced`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `annualAverageInvoiced` AS SELECT
1 AS `clientFk`,
1 AS `invoiced`*/;
@@ -20388,7 +20409,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `assignedTicketToWorker`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `assignedTicketToWorker` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idWorker` int(11) DEFAULT NULL,
@@ -20396,7 +20417,7 @@ CREATE TABLE `assignedTicketToWorker` (
PRIMARY KEY (`id`),
UNIQUE KEY `idWorker_UNIQUE` (`idWorker`),
UNIQUE KEY `idTicket_UNIQUE` (`idTicket`)
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla para relacionar un ticket con el sacador del altillo ';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla para relacionar un ticket con el sacador del altillo ';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20405,7 +20426,7 @@ CREATE TABLE `assignedTicketToWorker` (
DROP TABLE IF EXISTS `autoRadioConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `autoRadioConfig` (
`id` int(11) NOT NULL,
`password` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -20425,7 +20446,7 @@ CREATE TABLE `autoRadioConfig` (
DROP TABLE IF EXISTS `autoRadioLogCall`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `autoRadioLogCall` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ticketFk` int(11) NOT NULL,
@@ -20434,7 +20455,7 @@ CREATE TABLE `autoRadioLogCall` (
PRIMARY KEY (`id`),
KEY `ticket_idx` (`ticketFk`),
CONSTRAINT `ticket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=1896 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20443,7 +20464,7 @@ CREATE TABLE `autoRadioLogCall` (
DROP TABLE IF EXISTS `autonomousRegion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `autonomousRegion` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 NOT NULL,
@@ -20452,7 +20473,7 @@ CREATE TABLE `autonomousRegion` (
PRIMARY KEY (`id`),
KEY `countryFk` (`countryFk`),
CONSTRAINT `countryFk` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20461,7 +20482,7 @@ CREATE TABLE `autonomousRegion` (
DROP TABLE IF EXISTS `bank`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bank` (
`id` int(11) NOT NULL DEFAULT '0',
`bank` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -20488,7 +20509,7 @@ CREATE TABLE `bank` (
DROP TABLE IF EXISTS `bankEntity`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bankEntity` (
`countryFk` mediumint(8) unsigned NOT NULL DEFAULT '1',
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
@@ -20498,7 +20519,7 @@ CREATE TABLE `bankEntity` (
UNIQUE KEY `bic_UNIQUE` (`bic`),
KEY `fg_entity1_idx` (`countryFk`),
CONSTRAINT `fg_entity1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=30055 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Entidades bancarias ';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Entidades bancarias ';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20507,7 +20528,7 @@ CREATE TABLE `bankEntity` (
DROP TABLE IF EXISTS `bionicConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bionicConfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`generalInflationCoeficient` double(10,2) NOT NULL,
@@ -20515,7 +20536,7 @@ CREATE TABLE `bionicConfig` (
`verdnaturaVolumeBox` int(11) NOT NULL,
`itemCarryBox` int(11) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20524,7 +20545,7 @@ CREATE TABLE `bionicConfig` (
DROP TABLE IF EXISTS `bookingPlanner`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `bookingPlanner` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`effectived` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -20542,7 +20563,7 @@ CREATE TABLE `bookingPlanner` (
CONSTRAINT `bookingPlanner_ibfk_1` FOREIGN KEY (`pgcFk`) REFERENCES `pgc` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `bookingPlanner_ibfk_2` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `bookingPlanner_ibfk_3` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON DELETE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=86 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20551,7 +20572,7 @@ CREATE TABLE `bookingPlanner` (
DROP TABLE IF EXISTS `botanicExport`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `botanicExport` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`ediGenusFk` mediumint(8) unsigned NOT NULL,
@@ -20562,8 +20583,12 @@ CREATE TABLE `botanicExport` (
`isProtectedZone` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
KEY `Id_Paises` (`countryFk`),
+ KEY `botanicExport_ibfk_2_idx` (`ediGenusFk`),
+ KEY `botanicExport_ibfk_3_idx` (`ediSpecieFk`),
+ CONSTRAINT `botanicExport_ediGenusFk` FOREIGN KEY (`ediGenusFk`) REFERENCES `edi`.`genus` (`genus_id`) ON UPDATE CASCADE,
+ CONSTRAINT `botanicExport_ediSpecieFk` FOREIGN KEY (`ediSpecieFk`) REFERENCES `edi`.`specie` (`specie_id`) ON UPDATE CASCADE,
CONSTRAINT `botanicExport_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=340 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Especifica los generos y especies prohibidos en paises';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Especifica los generos y especies prohibidos en paises';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20592,12 +20617,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `businessReasonEnd`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `businessReasonEnd` (
`id` tinyint(3) NOT NULL AUTO_INCREMENT,
`reason` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20606,7 +20631,7 @@ CREATE TABLE `businessReasonEnd` (
DROP TABLE IF EXISTS `buy`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `buy` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`entryFk` int(11) NOT NULL DEFAULT '0',
@@ -20649,7 +20674,7 @@ CREATE TABLE `buy` (
CONSTRAINT `buy_ibfk_2` FOREIGN KEY (`packageFk`) REFERENCES `packaging` (`id`) ON UPDATE CASCADE,
CONSTRAINT `buy_id` FOREIGN KEY (`entryFk`) REFERENCES `entry` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `buy_itemfk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=358205565 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -20839,7 +20864,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `buyMark`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `buyMark` (
`id` int(11) NOT NULL,
`comment` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -20856,7 +20881,7 @@ CREATE TABLE `buyMark` (
DROP TABLE IF EXISTS `calendarHolidays`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendarHolidays` (
`calendarHolidaysTypeFk` int(11) NOT NULL,
`dated` date NOT NULL,
@@ -20878,12 +20903,12 @@ CREATE TABLE `calendarHolidays` (
DROP TABLE IF EXISTS `calendarHolidaysName`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendarHolidaysName` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=26 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20892,13 +20917,13 @@ CREATE TABLE `calendarHolidaysName` (
DROP TABLE IF EXISTS `calendarHolidaysType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `calendarHolidaysType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) NOT NULL,
`hexColour` char(7) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20907,13 +20932,13 @@ CREATE TABLE `calendarHolidaysType` (
DROP TABLE IF EXISTS `category`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `category` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`nick` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20922,12 +20947,12 @@ CREATE TABLE `category` (
DROP TABLE IF EXISTS `chain`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `chain` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Grupos de clientes';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Grupos de clientes';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20936,7 +20961,7 @@ CREATE TABLE `chain` (
DROP TABLE IF EXISTS `claim`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claim` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ticketCreated` date NOT NULL,
@@ -20959,7 +20984,7 @@ CREATE TABLE `claim` (
CONSTRAINT `claim_ibfk_3` FOREIGN KEY (`claimStateFk`) REFERENCES `claimState` (`id`) ON UPDATE CASCADE,
CONSTRAINT `claim_ibfk_4` FOREIGN KEY (`claimDepartmentFk`) REFERENCES `vn2008`.`cl_dep` (`id`) ON UPDATE CASCADE,
CONSTRAINT `claim_ibfk_5` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=72699 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -20968,7 +20993,7 @@ CREATE TABLE `claim` (
DROP TABLE IF EXISTS `claimBeginning`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimBeginning` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`claimFk` int(10) unsigned NOT NULL,
@@ -20981,7 +21006,7 @@ CREATE TABLE `claimBeginning` (
KEY `cl_main_id` (`claimFk`),
CONSTRAINT `claimBeginning_ibfk_7` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `claimBeginning_ibfk_8` FOREIGN KEY (`claimFk`) REFERENCES `claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=159141 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21018,7 +21043,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `claimDestination`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimDestination` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
@@ -21026,7 +21051,7 @@ CREATE TABLE `claimDestination` (
PRIMARY KEY (`id`),
KEY `clSolAddressFk_idx` (`addressFk`),
CONSTRAINT `clSolAddressFk` FOREIGN KEY (`addressFk`) REFERENCES `address` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Solucion ofrecida a la reclamación';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Solucion ofrecida a la reclamación';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21035,7 +21060,7 @@ CREATE TABLE `claimDestination` (
DROP TABLE IF EXISTS `claimDevelopment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimDevelopment` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`claimFk` int(10) unsigned NOT NULL,
@@ -21060,7 +21085,7 @@ CREATE TABLE `claimDevelopment` (
CONSTRAINT `claimDevelopment_ibfk_7` FOREIGN KEY (`claimReasonFk`) REFERENCES `claimReason` (`id`) ON UPDATE CASCADE,
CONSTRAINT `claimDevelopment_ibfk_8` FOREIGN KEY (`claimResultFk`) REFERENCES `claimResult` (`id`) ON UPDATE CASCADE,
CONSTRAINT `claimDevelopment_ibfk_9` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=61996 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21069,7 +21094,7 @@ CREATE TABLE `claimDevelopment` (
DROP TABLE IF EXISTS `claimDms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimDms` (
`claimFk` int(10) unsigned NOT NULL,
`dmsFk` int(11) NOT NULL,
@@ -21086,7 +21111,7 @@ CREATE TABLE `claimDms` (
DROP TABLE IF EXISTS `claimEnd`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimEnd` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`saleFk` int(11) DEFAULT NULL,
@@ -21102,7 +21127,7 @@ CREATE TABLE `claimEnd` (
CONSTRAINT `claimEnd_ibfk_1` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `claimEnd_ibfk_3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
CONSTRAINT `claimEnd_ibfk_4` FOREIGN KEY (`claimFk`) REFERENCES `claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=121333 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21111,7 +21136,7 @@ CREATE TABLE `claimEnd` (
DROP TABLE IF EXISTS `claimLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(10) unsigned NOT NULL,
@@ -21129,17 +21154,17 @@ CREATE TABLE `claimLog` (
KEY `userFk` (`userFk`),
CONSTRAINT `claimOriginFk` FOREIGN KEY (`originFk`) REFERENCES `claim` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `claimUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=8585 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `claimRatio`
+-- Temporary table structure for view `claimRatio`
--
DROP TABLE IF EXISTS `claimRatio`;
/*!50001 DROP VIEW IF EXISTS `claimRatio`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `claimRatio` AS SELECT
1 AS `clientFk`,
1 AS `yearSale`,
@@ -21155,12 +21180,12 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `claimReason`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimReason` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Motivos de las fallos';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Motivos de las fallos';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21169,12 +21194,12 @@ CREATE TABLE `claimReason` (
DROP TABLE IF EXISTS `claimRedelivery`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimRedelivery` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Método por el cual el cliente nos devuelve la mercancía';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Método por el cual el cliente nos devuelve la mercancía';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21183,13 +21208,13 @@ CREATE TABLE `claimRedelivery` (
DROP TABLE IF EXISTS `claimResponsible`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimResponsible` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`responsability` tinyint(4) NOT NULL DEFAULT '0' COMMENT 'if=1 >sensib >culpa',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=23 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Responsables de las causas';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Responsables de las causas';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21198,12 +21223,12 @@ CREATE TABLE `claimResponsible` (
DROP TABLE IF EXISTS `claimResult`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimResult` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=28 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Consecuencias de los motivos';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Consecuencias de los motivos';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21212,7 +21237,7 @@ CREATE TABLE `claimResult` (
DROP TABLE IF EXISTS `claimState`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `claimState` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
@@ -21220,7 +21245,7 @@ CREATE TABLE `claimState` (
PRIMARY KEY (`id`),
KEY `roleFgn_idx` (`roleFk`),
CONSTRAINT `roleFgn` FOREIGN KEY (`roleFk`) REFERENCES `account`.`role` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Estados posibles de las reclamaciones';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Estados posibles de las reclamaciones';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21229,7 +21254,7 @@ CREATE TABLE `claimState` (
DROP TABLE IF EXISTS `client`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `client` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
@@ -21318,7 +21343,7 @@ CREATE TABLE `client` (
CONSTRAINT `client_ibfk_5` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE,
CONSTRAINT `tipos_de_cliente` FOREIGN KEY (`clientTypeFk`) REFERENCES `clientType` (`id`) ON UPDATE CASCADE,
CONSTRAINT `typeFk` FOREIGN KEY (`typeFk`) REFERENCES `clientType` (`code`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=17017 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21441,7 +21466,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `clientChain`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientChain` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL,
@@ -21451,7 +21476,7 @@ CREATE TABLE `clientChain` (
KEY `clientChain_fk2_idx` (`chainFk`),
CONSTRAINT `clientChain_fk1` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `clientChain_fk2` FOREIGN KEY (`chainFk`) REFERENCES `chain` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21460,14 +21485,14 @@ CREATE TABLE `clientChain` (
DROP TABLE IF EXISTS `clientContact`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientContact` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL,
`name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`phone` varchar(15) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4162 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21476,7 +21501,7 @@ CREATE TABLE `clientContact` (
DROP TABLE IF EXISTS `clientCredit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientCredit` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL,
@@ -21488,7 +21513,7 @@ CREATE TABLE `clientCredit` (
KEY `credit_ClienteFk` (`clientFk`),
CONSTRAINT `credit_ClienteFk` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `workers_fk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=86085 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21497,7 +21522,7 @@ CREATE TABLE `clientCredit` (
DROP TABLE IF EXISTS `clientCreditLimit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientCreditLimit` (
`id` int(11) NOT NULL,
`maxAmount` int(10) unsigned NOT NULL,
@@ -21512,7 +21537,7 @@ CREATE TABLE `clientCreditLimit` (
DROP TABLE IF EXISTS `clientDms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientDms` (
`clientFk` int(11) NOT NULL,
`dmsFk` int(11) NOT NULL,
@@ -21530,7 +21555,7 @@ CREATE TABLE `clientDms` (
DROP TABLE IF EXISTS `clientLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -21548,17 +21573,17 @@ CREATE TABLE `clientLog` (
KEY `userFk` (`userFk`),
CONSTRAINT `clientLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `clientLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=243781 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `clientManaCache`
+-- Temporary table structure for view `clientManaCache`
--
DROP TABLE IF EXISTS `clientManaCache`;
/*!50001 DROP VIEW IF EXISTS `clientManaCache`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `clientManaCache` AS SELECT
1 AS `clientFk`,
1 AS `mana`,
@@ -21571,7 +21596,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `clientObservation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientObservation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL,
@@ -21583,7 +21608,7 @@ CREATE TABLE `clientObservation` (
KEY `Id_Cliente` (`clientFk`),
CONSTRAINT `clientObservation_ibfk_1` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `clientObservation_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=79281 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21633,7 +21658,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `clientProtected`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientProtected` (
`clientFk` int(11) NOT NULL,
`workerFk` int(11) NOT NULL,
@@ -21646,13 +21671,13 @@ CREATE TABLE `clientProtected` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `clientRisk`
+-- Temporary table structure for view `clientRisk`
--
DROP TABLE IF EXISTS `clientRisk`;
/*!50001 DROP VIEW IF EXISTS `clientRisk`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `clientRisk` AS SELECT
1 AS `clientFk`,
1 AS `companyFk`,
@@ -21665,7 +21690,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `clientSample`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientSample` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`clientFk` int(10) unsigned NOT NULL,
@@ -21678,7 +21703,7 @@ CREATE TABLE `clientSample` (
PRIMARY KEY (`id`),
KEY `empresa_id` (`companyFk`),
CONSTRAINT `clientSample_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=18669 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21687,7 +21712,7 @@ CREATE TABLE `clientSample` (
DROP TABLE IF EXISTS `clientType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `clientType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(20) CHARACTER SET utf8 NOT NULL,
@@ -21695,7 +21720,7 @@ CREATE TABLE `clientType` (
`isCreatedAsServed` tinyint(1) DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `code_UNIQUE` (`code`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Establece categorias para poder agrupar las ventas';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Establece categorias para poder agrupar las ventas';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21704,7 +21729,7 @@ CREATE TABLE `clientType` (
DROP TABLE IF EXISTS `cmr`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cmr` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ticketFk` int(11) NOT NULL,
@@ -21717,7 +21742,7 @@ CREATE TABLE `cmr` (
PRIMARY KEY (`id`),
KEY `cmr_fk1_idx` (`ticketFk`),
CONSTRAINT `cmr_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=75 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -21761,13 +21786,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `cmr_list`
+-- Temporary table structure for view `cmr_list`
--
DROP TABLE IF EXISTS `cmr_list`;
/*!50001 DROP VIEW IF EXISTS `cmr_list`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `cmr_list` AS SELECT
1 AS `cmrFk`,
1 AS `ticketFk`,
@@ -21807,7 +21832,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `collection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `collection` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -21815,17 +21840,17 @@ CREATE TABLE `collection` (
PRIMARY KEY (`id`),
KEY `ticketCollection_idx` (`workerFk`),
CONSTRAINT `ticketCollection` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=133 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `collectionReportSource`
+-- Temporary table structure for view `collectionReportSource`
--
DROP TABLE IF EXISTS `collectionReportSource`;
/*!50001 DROP VIEW IF EXISTS `collectionReportSource`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `collectionReportSource` AS SELECT
1 AS `collectionFk`,
1 AS `ticketFk`,
@@ -21843,7 +21868,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `company`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `company` (
`id` smallint(5) unsigned NOT NULL,
`code` char(3) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -21884,22 +21909,22 @@ CREATE TABLE `company` (
DROP TABLE IF EXISTS `companyGroup`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `companyGroup` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `component`
+-- Temporary table structure for view `component`
--
DROP TABLE IF EXISTS `component`;
/*!50001 DROP VIEW IF EXISTS `component`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `component` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -21910,13 +21935,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `componentRate`
+-- Temporary table structure for view `componentRate`
--
DROP TABLE IF EXISTS `componentRate`;
/*!50001 DROP VIEW IF EXISTS `componentRate`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `componentRate` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -21928,13 +21953,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `componentType`
+-- Temporary table structure for view `componentType`
--
DROP TABLE IF EXISTS `componentType`;
/*!50001 DROP VIEW IF EXISTS `componentType`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `componentType` AS SELECT
1 AS `id`,
1 AS `type`,
@@ -21943,13 +21968,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `componentTypeRate`
+-- Temporary table structure for view `componentTypeRate`
--
DROP TABLE IF EXISTS `componentTypeRate`;
/*!50001 DROP VIEW IF EXISTS `componentTypeRate`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `componentTypeRate` AS SELECT
1 AS `id`,
1 AS `type`,
@@ -21962,12 +21987,12 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `confectionType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `confectionType` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -21976,7 +22001,7 @@ CREATE TABLE `confectionType` (
DROP TABLE IF EXISTS `config`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ochoa` int(10) unsigned NOT NULL,
@@ -22024,7 +22049,7 @@ CREATE TABLE `config` (
`ASIEN` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `fechainv_idx` (`inventoried`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22033,7 +22058,7 @@ CREATE TABLE `config` (
DROP TABLE IF EXISTS `config__`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `config__` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`mdbServer` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -22041,7 +22066,7 @@ CREATE TABLE `config__` (
`defaultersMaxAmount` int(10) DEFAULT '200' COMMENT 'maxima deuda permitida a partir de la cual se bloquea a un usuario',
`ASIEN` bigint(20) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22050,12 +22075,12 @@ CREATE TABLE `config__` (
DROP TABLE IF EXISTS `contactChannel`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `contactChannel` (
`id` smallint(6) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Canal por el que nos ha conocido un cliente y se ha dado de';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Canal por el que nos ha conocido un cliente y se ha dado de';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22064,7 +22089,7 @@ CREATE TABLE `contactChannel` (
DROP TABLE IF EXISTS `country`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `country` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`country` varchar(25) COLLATE utf8_unicode_ci NOT NULL,
@@ -22080,7 +22105,7 @@ CREATE TABLE `country` (
`ibanLength` tinyint(4) DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `Id_Paisreal` (`politicalCountryFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=72 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -22168,12 +22193,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `cplusCorrectingType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusCorrectingType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22182,7 +22207,7 @@ CREATE TABLE `cplusCorrectingType` (
DROP TABLE IF EXISTS `cplusInvoiceType472`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusInvoiceType472` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22196,7 +22221,7 @@ CREATE TABLE `cplusInvoiceType472` (
DROP TABLE IF EXISTS `cplusInvoiceType477`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusInvoiceType477` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22210,7 +22235,7 @@ CREATE TABLE `cplusInvoiceType477` (
DROP TABLE IF EXISTS `cplusRectificationType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusRectificationType` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22224,7 +22249,7 @@ CREATE TABLE `cplusRectificationType` (
DROP TABLE IF EXISTS `cplusSubjectOp`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusSubjectOp` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22238,7 +22263,7 @@ CREATE TABLE `cplusSubjectOp` (
DROP TABLE IF EXISTS `cplusTaxBreak`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusTaxBreak` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22252,7 +22277,7 @@ CREATE TABLE `cplusTaxBreak` (
DROP TABLE IF EXISTS `cplusTerIdNif`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusTerIdNif` (
`id` int(11) NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22266,7 +22291,7 @@ CREATE TABLE `cplusTerIdNif` (
DROP TABLE IF EXISTS `cplusTrascendency472`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusTrascendency472` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22280,7 +22305,7 @@ CREATE TABLE `cplusTrascendency472` (
DROP TABLE IF EXISTS `cplusTrascendency477`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `cplusTrascendency477` (
`id` int(10) unsigned NOT NULL,
`description` varchar(255) CHARACTER SET utf8 NOT NULL,
@@ -22294,7 +22319,7 @@ CREATE TABLE `cplusTrascendency477` (
DROP TABLE IF EXISTS `creditClassification`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `creditClassification` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`client` int(11) NOT NULL,
@@ -22304,7 +22329,7 @@ CREATE TABLE `creditClassification` (
KEY `creditClassifClientFk_idx` (`client`),
KEY `creditClassifdateEnd_idx` (`dateEnd`),
CONSTRAINT `creditClassifClientFk` FOREIGN KEY (`client`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3277 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -22338,7 +22363,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `creditInsurance`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `creditInsurance` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`creditClassification` int(11) DEFAULT NULL,
@@ -22348,7 +22373,7 @@ CREATE TABLE `creditInsurance` (
PRIMARY KEY (`id`),
KEY `CreditInsurance_Fk1_idx` (`creditClassification`),
CONSTRAINT `CreditInsurance_Fk1` FOREIGN KEY (`creditClassification`) REFERENCES `creditClassification` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3200 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalla los clientes que tienen seguro de credito';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalla los clientes que tienen seguro de credito';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -22379,7 +22404,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `currency`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `currency` (
`id` tinyint(3) unsigned NOT NULL,
`code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -22396,7 +22421,7 @@ CREATE TABLE `currency` (
DROP TABLE IF EXISTS `dayMinute`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dayMinute` (
`id` int(10) unsigned NOT NULL,
`hh` int(10) unsigned NOT NULL,
@@ -22408,13 +22433,13 @@ CREATE TABLE `dayMinute` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `defaulter`
+-- Temporary table structure for view `defaulter`
--
DROP TABLE IF EXISTS `defaulter`;
/*!50001 DROP VIEW IF EXISTS `defaulter`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `defaulter` AS SELECT
1 AS `clientFk`,
1 AS `created`,
@@ -22429,14 +22454,14 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `deliveryMethod`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deliveryMethod` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`code` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code` (`code`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22445,13 +22470,13 @@ CREATE TABLE `deliveryMethod` (
DROP TABLE IF EXISTS `deliveryPoint`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deliveryPoint` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`ubication` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22460,7 +22485,7 @@ CREATE TABLE `deliveryPoint` (
DROP TABLE IF EXISTS `delivery_zip`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `delivery_zip` (
`postal_code` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
`country_code` varchar(150) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -22488,7 +22513,7 @@ CREATE TABLE `delivery_zip` (
DROP TABLE IF EXISTS `department`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `department` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -22511,7 +22536,7 @@ CREATE TABLE `department` (
KEY `dep_org_ibfk_3_idx` (`companyFk`),
KEY `lft_rgt_depth_idx` (`lft`,`rgt`,`depth`),
CONSTRAINT `fk_department_Trabajadores1` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=95 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -22579,7 +22604,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `departmentItemType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `departmentItemType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`departmentFk` int(11) NOT NULL,
@@ -22592,17 +22617,17 @@ CREATE TABLE `departmentItemType` (
CONSTRAINT `departmentItemTypeIdx1` FOREIGN KEY (`departmentFk`) REFERENCES `department` (`id`) ON UPDATE CASCADE,
CONSTRAINT `departmentItemTypeIdx2` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE,
CONSTRAINT `departmentItemTypeIdx3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `departmentTree`
+-- Temporary table structure for view `departmentTree`
--
DROP TABLE IF EXISTS `departmentTree`;
/*!50001 DROP VIEW IF EXISTS `departmentTree`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `departmentTree` AS SELECT
1 AS `id`,
1 AS `dep`*/;
@@ -22614,12 +22639,12 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `department_recalc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `department_recalc` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`isChanged` tinyint(4) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22628,7 +22653,7 @@ CREATE TABLE `department_recalc` (
DROP TABLE IF EXISTS `device`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `device` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`sn` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -22637,7 +22662,7 @@ CREATE TABLE `device` (
PRIMARY KEY (`id`),
KEY `device_fk1_idx` (`userFk`),
CONSTRAINT `device_fk1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=375 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22646,7 +22671,7 @@ CREATE TABLE `device` (
DROP TABLE IF EXISTS `deviceProduction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deviceProduction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`imei` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -22662,7 +22687,7 @@ CREATE TABLE `deviceProduction` (
KEY `departmentFgn` (`departmentFk`),
CONSTRAINT `departmentFgn` FOREIGN KEY (`departmentFk`) REFERENCES `department` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `deviceProductionModelsFgn` FOREIGN KEY (`modelFk`) REFERENCES `deviceProductionModels` (`code`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=381 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22671,7 +22696,7 @@ CREATE TABLE `deviceProduction` (
DROP TABLE IF EXISTS `deviceProductionModels`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deviceProductionModels` (
`code` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`code`)
@@ -22684,7 +22709,7 @@ CREATE TABLE `deviceProductionModels` (
DROP TABLE IF EXISTS `deviceProductionUser`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `deviceProductionUser` (
`deviceProductionFk` int(11) NOT NULL,
`userFk` int(10) unsigned NOT NULL,
@@ -22701,7 +22726,7 @@ CREATE TABLE `deviceProductionUser` (
DROP TABLE IF EXISTS `dms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dms` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dmsTypeFk` int(11) NOT NULL DEFAULT '1',
@@ -22719,7 +22744,7 @@ CREATE TABLE `dms` (
UNIQUE KEY `emp_id` (`companyFk`,`hardCopyNumber`,`warehouseFk`),
KEY `trabajador_id` (`workerFk`),
KEY `warehouse_id` (`warehouseFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=1409575 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -22797,7 +22822,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `dmsType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dmsType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -22810,7 +22835,7 @@ CREATE TABLE `dmsType` (
KEY `writeRoleFk` (`writeRoleFk`),
CONSTRAINT `readRoleFk` FOREIGN KEY (`readRoleFk`) REFERENCES `account`.`role` (`id`),
CONSTRAINT `writeRoleFk` FOREIGN KEY (`writeRoleFk`) REFERENCES `account`.`role` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=21 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22819,7 +22844,7 @@ CREATE TABLE `dmsType` (
DROP TABLE IF EXISTS `dua`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `dua` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -22839,7 +22864,7 @@ CREATE TABLE `dua` (
CONSTRAINT `dua_fk1` FOREIGN KEY (`gestdocFk`) REFERENCES `dms` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `dua_fk2` FOREIGN KEY (`awbFk`) REFERENCES `vn2008`.`awb` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `dua_fk4` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=19542 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22848,7 +22873,7 @@ CREATE TABLE `dua` (
DROP TABLE IF EXISTS `duaEntry`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `duaEntry` (
`duaFk` int(11) NOT NULL,
`entryFk` int(11) NOT NULL,
@@ -22869,7 +22894,7 @@ CREATE TABLE `duaEntry` (
DROP TABLE IF EXISTS `duaIntrastat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `duaIntrastat` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`duaFk` int(11) NOT NULL,
@@ -22880,7 +22905,7 @@ CREATE TABLE `duaIntrastat` (
KEY `duaIntrastat_fk2_idx` (`duaFk`),
CONSTRAINT `duaIntrastat_fk1` FOREIGN KEY (`intrastatFk`) REFERENCES `intrastat` (`id`) ON UPDATE CASCADE,
CONSTRAINT `duaIntrastat_fk2` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=7324 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22889,7 +22914,7 @@ CREATE TABLE `duaIntrastat` (
DROP TABLE IF EXISTS `duaInvoiceIn`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `duaInvoiceIn` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`duaFk` int(11) NOT NULL,
@@ -22900,7 +22925,7 @@ CREATE TABLE `duaInvoiceIn` (
KEY `duaInvoiceIn_fk2_idx` (`invoiceInFk`),
CONSTRAINT `duaInvoiceIn_fk1` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `duaInvoiceIn_fk2` FOREIGN KEY (`invoiceInFk`) REFERENCES `vn2008`.`recibida` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=5333 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Facturas asociadas a la declaración aduanera, básicamente la del agente transitario';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Facturas asociadas a la declaración aduanera, básicamente la del agente transitario';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22909,7 +22934,7 @@ CREATE TABLE `duaInvoiceIn` (
DROP TABLE IF EXISTS `duaTax`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `duaTax` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`duaFk` int(11) NOT NULL,
@@ -22925,17 +22950,17 @@ CREATE TABLE `duaTax` (
CONSTRAINT `duaTax_fk1` FOREIGN KEY (`duaFk`) REFERENCES `dua` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `duaTax_fk2` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE,
CONSTRAINT `duaTax_fk3` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=10732 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `ediGenus`
+-- Temporary table structure for view `ediGenus`
--
DROP TABLE IF EXISTS `ediGenus`;
/*!50001 DROP VIEW IF EXISTS `ediGenus`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ediGenus` AS SELECT
1 AS `id`,
1 AS `latinGenusName`,
@@ -22945,13 +22970,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `ediSpecie`
+-- Temporary table structure for view `ediSpecie`
--
DROP TABLE IF EXISTS `ediSpecie`;
/*!50001 DROP VIEW IF EXISTS `ediSpecie`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ediSpecie` AS SELECT
1 AS `id`,
1 AS `genusFk`,
@@ -22967,13 +22992,13 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `emergencyMedia`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `emergencyMedia` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`value` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Table to save all emergency phones',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -22982,7 +23007,7 @@ CREATE TABLE `emergencyMedia` (
DROP TABLE IF EXISTS `energyInput`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `energyInput` (
`input` int(11) NOT NULL COMMENT 'The input number',
`description` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -22997,7 +23022,7 @@ CREATE TABLE `energyInput` (
DROP TABLE IF EXISTS `energyMeter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `energyMeter` (
`input` int(11) NOT NULL COMMENT 'The input number',
`period` datetime NOT NULL COMMENT 'Consumption period in hours interval',
@@ -23013,7 +23038,7 @@ CREATE TABLE `energyMeter` (
DROP TABLE IF EXISTS `entry`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `entry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`supplierFk` int(11) NOT NULL DEFAULT '644',
@@ -23046,7 +23071,7 @@ CREATE TABLE `entry` (
CONSTRAINT `entry_ibfk_1` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE,
CONSTRAINT `entry_ibfk_6` FOREIGN KEY (`travelFk`) REFERENCES `travel` (`id`) ON UPDATE CASCADE,
CONSTRAINT `entry_ibfk_7` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=183609 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -23235,7 +23260,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `entryLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `entryLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -23248,7 +23273,7 @@ CREATE TABLE `entryLog` (
KEY `entryLog_ibfk_2` (`userFk`),
CONSTRAINT `entryLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `entry` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `entryLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=181611 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23257,7 +23282,7 @@ CREATE TABLE `entryLog` (
DROP TABLE IF EXISTS `entrySplit`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `entrySplit` (
`receivedFk` int(11) NOT NULL,
`delayedFk` int(11) NOT NULL,
@@ -23274,7 +23299,7 @@ CREATE TABLE `entrySplit` (
DROP TABLE IF EXISTS `entryVirtual`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `entryVirtual` (
`entryFk` int(11) NOT NULL,
PRIMARY KEY (`entryFk`),
@@ -23288,7 +23313,7 @@ CREATE TABLE `entryVirtual` (
DROP TABLE IF EXISTS `envialiaAgency`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `envialiaAgency` (
`id` varchar(6) COLLATE utf8_unicode_ci NOT NULL,
`route` varchar(3) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -23304,7 +23329,7 @@ CREATE TABLE `envialiaAgency` (
DROP TABLE IF EXISTS `envialiaCity`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `envialiaCity` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`city` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -23313,7 +23338,7 @@ CREATE TABLE `envialiaCity` (
PRIMARY KEY (`id`),
KEY `agencyFk` (`agencyFk`),
KEY `postalCode` (`postalCode`)
-) ENGINE=InnoDB AUTO_INCREMENT=1585166 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23322,7 +23347,7 @@ CREATE TABLE `envialiaCity` (
DROP TABLE IF EXISTS `envialiaConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `envialiaConfig` (
`serviceType` varchar(3) COLLATE utf8_unicode_ci NOT NULL DEFAULT '024' COMMENT 'Tipo de servicio en horas. 024 -> servicio las 24h',
`numBox` varchar(3) COLLATE utf8_unicode_ci DEFAULT '001' COMMENT 'cajas por envio',
@@ -23337,13 +23362,13 @@ CREATE TABLE `envialiaConfig` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `exchangeInsuranceEntry`
+-- Temporary table structure for view `exchangeInsuranceEntry`
--
DROP TABLE IF EXISTS `exchangeInsuranceEntry`;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceEntry`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `exchangeInsuranceEntry` AS SELECT
1 AS `dated`,
1 AS `Dolares`,
@@ -23351,13 +23376,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `exchangeInsuranceIn`
+-- Temporary table structure for view `exchangeInsuranceIn`
--
DROP TABLE IF EXISTS `exchangeInsuranceIn`;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceIn`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `exchangeInsuranceIn` AS SELECT
1 AS `dated`,
1 AS `amount`,
@@ -23365,13 +23390,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `exchangeInsuranceOut`
+-- Temporary table structure for view `exchangeInsuranceOut`
--
DROP TABLE IF EXISTS `exchangeInsuranceOut`;
/*!50001 DROP VIEW IF EXISTS `exchangeInsuranceOut`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `exchangeInsuranceOut` AS SELECT
1 AS `received`,
1 AS `divisa`,
@@ -23379,13 +23404,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `exchangeReportSourcePrevious`
+-- Temporary table structure for view `exchangeReportSourcePrevious`
--
DROP TABLE IF EXISTS `exchangeReportSourcePrevious`;
/*!50001 DROP VIEW IF EXISTS `exchangeReportSourcePrevious`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `exchangeReportSourcePrevious` AS SELECT
1 AS `dated`,
1 AS `amountIn`,
@@ -23402,13 +23427,13 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `excuse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `excuse` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`txt` varchar(255) CHARACTER SET latin1 NOT NULL,
`date` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23417,7 +23442,7 @@ CREATE TABLE `excuse` (
DROP TABLE IF EXISTS `expedition`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `expedition` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`agencyModeFk` int(11) NOT NULL,
@@ -23438,7 +23463,7 @@ CREATE TABLE `expedition` (
KEY `index4` (`ticketFk`),
CONSTRAINT `Id_Agencia` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ticket_id` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3475031 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -23541,7 +23566,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `expeditionBoxVol`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `expeditionBoxVol` (
`boxFk` int(11) NOT NULL,
`m3` double NOT NULL,
@@ -23556,7 +23581,7 @@ CREATE TABLE `expeditionBoxVol` (
DROP TABLE IF EXISTS `expence`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `expence` (
`id` varchar(10) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
`taxTypeFk` tinyint(4) NOT NULL,
@@ -23570,26 +23595,26 @@ CREATE TABLE `expence` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `firstTicketShipped`
+-- Temporary table structure for view `firstTicketShipped`
--
DROP TABLE IF EXISTS `firstTicketShipped`;
/*!50001 DROP VIEW IF EXISTS `firstTicketShipped`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `firstTicketShipped` AS SELECT
1 AS `shipped`,
1 AS `clientFk`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `floraHollandBuyedItems`
+-- Temporary table structure for view `floraHollandBuyedItems`
--
DROP TABLE IF EXISTS `floraHollandBuyedItems`;
/*!50001 DROP VIEW IF EXISTS `floraHollandBuyedItems`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `floraHollandBuyedItems` AS SELECT
1 AS `itemFk`,
1 AS `longName`,
@@ -23605,14 +23630,14 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `fuelType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fuelType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`code` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `code_UNIQUE` (`code`)
-) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23621,13 +23646,13 @@ CREATE TABLE `fuelType` (
DROP TABLE IF EXISTS `gateArea`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `gateArea` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23636,7 +23661,7 @@ CREATE TABLE `gateArea` (
DROP TABLE IF EXISTS `greuge`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `greuge` (
`Id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`clientFk` int(10) unsigned NOT NULL,
@@ -23652,7 +23677,7 @@ CREATE TABLE `greuge` (
KEY `Greuges_cliente_idx` (`clientFk`),
CONSTRAINT `Id_Ticket_Greuge_Ticket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `greuges_type_fk` FOREIGN KEY (`greugeTypeFk`) REFERENCES `greugeType` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=3850864 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -23683,23 +23708,23 @@ DELIMITER ;
DROP TABLE IF EXISTS `greugeType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `greugeType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`code` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `holiday`
+-- Temporary table structure for view `holiday`
--
DROP TABLE IF EXISTS `holiday`;
/*!50001 DROP VIEW IF EXISTS `holiday`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `holiday` AS SELECT
1 AS `holidayDetailFk`,
1 AS `holidayTypeFk`,
@@ -23708,39 +23733,39 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `holidayDetail`
+-- Temporary table structure for view `holidayDetail`
--
DROP TABLE IF EXISTS `holidayDetail`;
/*!50001 DROP VIEW IF EXISTS `holidayDetail`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `holidayDetail` AS SELECT
1 AS `id`,
1 AS `description`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `holidayLegend`
+-- Temporary table structure for view `holidayLegend`
--
DROP TABLE IF EXISTS `holidayLegend`;
/*!50001 DROP VIEW IF EXISTS `holidayLegend`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `holidayLegend` AS SELECT
1 AS `id`,
1 AS `description`*/;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `holidayType`
+-- Temporary table structure for view `holidayType`
--
DROP TABLE IF EXISTS `holidayType`;
/*!50001 DROP VIEW IF EXISTS `holidayType`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `holidayType` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -23753,7 +23778,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `ink`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ink` (
`id` char(3) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -23771,7 +23796,7 @@ CREATE TABLE `ink` (
DROP TABLE IF EXISTS `inkI18n`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inkI18n` (
`inkFk` char(3) COLLATE utf8_unicode_ci NOT NULL,
`lang` char(2) CHARACTER SET utf8 NOT NULL,
@@ -23781,13 +23806,13 @@ CREATE TABLE `inkI18n` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `inkL10n`
+-- Temporary table structure for view `inkL10n`
--
DROP TABLE IF EXISTS `inkL10n`;
/*!50001 DROP VIEW IF EXISTS `inkL10n`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `inkL10n` AS SELECT
1 AS `id`,
1 AS `name`*/;
@@ -23799,7 +23824,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `intrastat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `intrastat` (
`id` int(8) unsigned zerofill NOT NULL,
`description` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -23818,7 +23843,7 @@ CREATE TABLE `intrastat` (
DROP TABLE IF EXISTS `inventoryFailure`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventoryFailure` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -23841,7 +23866,7 @@ CREATE TABLE `inventoryFailure` (
CONSTRAINT `inventoryFailure_fk3` FOREIGN KEY (`guiltyFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `inventoryFailure_fk4` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `inventoryFailure_fk5` FOREIGN KEY (`causeFk`) REFERENCES `inventoryFailureCause` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=29968 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23850,12 +23875,12 @@ CREATE TABLE `inventoryFailure` (
DROP TABLE IF EXISTS `inventoryFailureCause`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inventoryFailureCause` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23864,7 +23889,7 @@ CREATE TABLE `inventoryFailureCause` (
DROP TABLE IF EXISTS `invoiceCorrection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceCorrection` (
`correctingFk` int(10) unsigned NOT NULL COMMENT 'Factura rectificativa',
`correctedFk` int(10) unsigned NOT NULL COMMENT 'Factura rectificada',
@@ -23885,13 +23910,13 @@ CREATE TABLE `invoiceCorrection` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `invoiceCorrectionDataSource`
+-- Temporary table structure for view `invoiceCorrectionDataSource`
--
DROP TABLE IF EXISTS `invoiceCorrectionDataSource`;
/*!50001 DROP VIEW IF EXISTS `invoiceCorrectionDataSource`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `invoiceCorrectionDataSource` AS SELECT
1 AS `itemFk`,
1 AS `quantity`,
@@ -23909,13 +23934,13 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `invoiceCorrectionType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceCorrectionType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `description_UNIQUE` (`description`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23924,7 +23949,7 @@ CREATE TABLE `invoiceCorrectionType` (
DROP TABLE IF EXISTS `invoiceInSerial`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceInSerial` (
`code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -23944,7 +23969,7 @@ CREATE TABLE `invoiceInSerial` (
DROP TABLE IF EXISTS `invoiceInTaxBookingAccount`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceInTaxBookingAccount` (
`id` int(10) NOT NULL AUTO_INCREMENT,
`effectived` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -23961,7 +23986,7 @@ CREATE TABLE `invoiceInTaxBookingAccount` (
CONSTRAINT `invoiceInTaxBookingAccount_fk1` FOREIGN KEY (`taxAreaFk`) REFERENCES `taxArea` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `invoiceInTaxBookingAccount_fk2` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE,
CONSTRAINT `invoiceInTaxBookingAccount_fk3` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -23970,7 +23995,7 @@ CREATE TABLE `invoiceInTaxBookingAccount` (
DROP TABLE IF EXISTS `invoiceOut`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceOut` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`ref` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
@@ -24017,7 +24042,7 @@ CREATE TABLE `invoiceOut` (
CONSTRAINT `invoiceOut_ibfk_4` FOREIGN KEY (`cplusTaxBreakFk`) REFERENCES `cplusTaxBreak` (`id`) ON UPDATE CASCADE,
CONSTRAINT `invoice_bank_id` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE,
CONSTRAINT `invoice_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=525260 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -24130,7 +24155,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `invoiceOutExpence`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceOutExpence` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`invoiceOutFk` int(10) unsigned NOT NULL,
@@ -24143,7 +24168,7 @@ CREATE TABLE `invoiceOutExpence` (
KEY `invoiceOutExpence_FK_2_idx` (`expenceFk`),
CONSTRAINT `invoiceOutExpence_FK_1` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `invoiceOutExpence_FK_2` FOREIGN KEY (`expenceFk`) REFERENCES `expence` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=139712 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -24152,7 +24177,7 @@ CREATE TABLE `invoiceOutExpence` (
DROP TABLE IF EXISTS `invoiceOutSerial`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceOutSerial` (
`code` varchar(2) COLLATE utf8_unicode_ci NOT NULL,
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -24172,7 +24197,7 @@ CREATE TABLE `invoiceOutSerial` (
DROP TABLE IF EXISTS `invoiceOutTax`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `invoiceOutTax` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`invoiceOutFk` int(10) unsigned NOT NULL,
@@ -24186,7 +24211,7 @@ CREATE TABLE `invoiceOutTax` (
KEY `pgcFk` (`pgcFk`),
CONSTRAINT `invoiceOutFk` FOREIGN KEY (`invoiceOutFk`) REFERENCES `invoiceOut` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `invoiceOutTax_ibfk_1` FOREIGN KEY (`pgcFk`) REFERENCES `pgc` (`code`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1193218 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -24195,7 +24220,7 @@ CREATE TABLE `invoiceOutTax` (
DROP TABLE IF EXISTS `item`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `item` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`equivalent` int(11) unsigned DEFAULT NULL,
@@ -24265,7 +24290,7 @@ CREATE TABLE `item` (
CONSTRAINT `item_ibfk_5` FOREIGN KEY (`typeFk`) REFERENCES `itemType` (`id`) ON UPDATE CASCADE,
CONSTRAINT `item_ibfk_6` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `producer_id` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=380013 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -24384,7 +24409,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `itemBarcode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemBarcode` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
@@ -24394,7 +24419,7 @@ CREATE TABLE `itemBarcode` (
UNIQUE KEY `Id_Article_2` (`itemFk`,`code`),
KEY `Id_Article` (`itemFk`),
CONSTRAINT `itemBarcode_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=43128 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -24403,7 +24428,7 @@ CREATE TABLE `itemBarcode` (
DROP TABLE IF EXISTS `itemBotanical`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemBotanical` (
`itemFk` int(11) NOT NULL,
`botanical` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -24458,13 +24483,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `itemBotanicalWithGenus`
+-- Temporary table structure for view `itemBotanicalWithGenus`
--
DROP TABLE IF EXISTS `itemBotanicalWithGenus`;
/*!50001 DROP VIEW IF EXISTS `itemBotanicalWithGenus`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemBotanicalWithGenus` AS SELECT
1 AS `itemFk`,
1 AS `ediBotanic`*/;
@@ -24476,7 +24501,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemCategory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemCategory` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -24489,7 +24514,7 @@ CREATE TABLE `itemCategory` (
`code` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `reino_UNIQUE` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=13 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -24498,7 +24523,7 @@ CREATE TABLE `itemCategory` (
DROP TABLE IF EXISTS `itemCategoryI18n`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemCategoryI18n` (
`categoryFk` int(10) unsigned NOT NULL,
`lang` char(2) CHARACTER SET utf8 NOT NULL,
@@ -24508,13 +24533,13 @@ CREATE TABLE `itemCategoryI18n` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `itemCategoryL10n`
+-- Temporary table structure for view `itemCategoryL10n`
--
DROP TABLE IF EXISTS `itemCategoryL10n`;
/*!50001 DROP VIEW IF EXISTS `itemCategoryL10n`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemCategoryL10n` AS SELECT
1 AS `id`,
1 AS `name`*/;
@@ -24526,7 +24551,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemConversor`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemConversor` (
`espItemFk` int(11) NOT NULL,
`genItemFk` int(11) DEFAULT NULL,
@@ -24538,13 +24563,13 @@ CREATE TABLE `itemConversor` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `itemEntryIn`
+-- Temporary table structure for view `itemEntryIn`
--
DROP TABLE IF EXISTS `itemEntryIn`;
/*!50001 DROP VIEW IF EXISTS `itemEntryIn`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemEntryIn` AS SELECT
1 AS `warehouseInFk`,
1 AS `landed`,
@@ -24556,13 +24581,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemEntryOut`
+-- Temporary table structure for view `itemEntryOut`
--
DROP TABLE IF EXISTS `itemEntryOut`;
/*!50001 DROP VIEW IF EXISTS `itemEntryOut`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemEntryOut` AS SELECT
1 AS `warehouseOutFk`,
1 AS `shipped`,
@@ -24578,7 +24603,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemFreeNumber`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemFreeNumber` (
`itemFk` int(11) NOT NULL,
PRIMARY KEY (`itemFk`)
@@ -24591,7 +24616,7 @@ CREATE TABLE `itemFreeNumber` (
DROP TABLE IF EXISTS `itemLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -24609,7 +24634,7 @@ CREATE TABLE `itemLog` (
KEY `itemLogUserFk_idx` (`userFk`),
CONSTRAINT `itemLogItemFk` FOREIGN KEY (`originFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemLogUserFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=107546 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -24618,7 +24643,7 @@ CREATE TABLE `itemLog` (
DROP TABLE IF EXISTS `itemPlacement`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemPlacement` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
@@ -24636,7 +24661,7 @@ CREATE TABLE `itemPlacement` (
CONSTRAINT `Articles_nicho_wh_fk` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `Articles_nichos_fk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemPlacement_fk3` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1179115 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -24667,7 +24692,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `itemPlacementSupply`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemPlacementSupply` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
@@ -24686,17 +24711,17 @@ CREATE TABLE `itemPlacementSupply` (
CONSTRAINT `itemPlacementSupply_fk2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemPlacementSupply_fk3` FOREIGN KEY (`repoUserFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemPlacementSupply_fk4` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=86940 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `itemPlacementSupplyList`
+-- Temporary table structure for view `itemPlacementSupplyList`
--
DROP TABLE IF EXISTS `itemPlacementSupplyList`;
/*!50001 DROP VIEW IF EXISTS `itemPlacementSupplyList`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemPlacementSupplyList` AS SELECT
1 AS `id`,
1 AS `itemFk`,
@@ -24716,13 +24741,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemPlacementSupplyList__`
+-- Temporary table structure for view `itemPlacementSupplyList__`
--
DROP TABLE IF EXISTS `itemPlacementSupplyList__`;
/*!50001 DROP VIEW IF EXISTS `itemPlacementSupplyList__`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemPlacementSupplyList__` AS SELECT
1 AS `id`,
1 AS `itemFk`,
@@ -24747,7 +24772,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemRepo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemRepo` (
`itemFk` int(11) NOT NULL,
`quantity` int(10) unsigned NOT NULL DEFAULT '0',
@@ -24762,7 +24787,7 @@ CREATE TABLE `itemRepo` (
DROP TABLE IF EXISTS `itemShelving`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemShelving` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
@@ -24787,7 +24812,7 @@ CREATE TABLE `itemShelving` (
CONSTRAINT `itemShelving_fk1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemShelving_fk2` FOREIGN KEY (`shelvingFk`) REFERENCES `shelving` (`code`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemShelving_fk3` FOREIGN KEY (`packagingFk`) REFERENCES `packaging` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=151395 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla utilizada para localizar los artículos dentro de los carros. Usado para la gestión del almacén en el altillo ';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla utilizada para localizar los artículos dentro de los carros. Usado para la gestión del almacén en el altillo ';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -24831,13 +24856,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `itemShelvingAvailable`
+-- Temporary table structure for view `itemShelvingAvailable`
--
DROP TABLE IF EXISTS `itemShelvingAvailable`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingAvailable`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingAvailable` AS SELECT
1 AS `saleFk`,
1 AS `Modificado`,
@@ -24864,13 +24889,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemShelvingList`
+-- Temporary table structure for view `itemShelvingList`
--
DROP TABLE IF EXISTS `itemShelvingList`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingList`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingList` AS SELECT
1 AS `shelvingFk`,
1 AS `visible`,
@@ -24889,7 +24914,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemShelvingPlacementSupply`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemShelvingPlacementSupply` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`itemShelvingFk` int(10) unsigned NOT NULL,
@@ -24904,17 +24929,17 @@ CREATE TABLE `itemShelvingPlacementSupply` (
KEY `itemShelvingPlacementSupply_fk3_idx` (`userFk`),
CONSTRAINT `itemShelvingPlacementSupply_fk1` FOREIGN KEY (`itemShelvingFk`) REFERENCES `itemShelving` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemShelvingPlacementSupply_fk2` FOREIGN KEY (`itemPlacementSupplyFk`) REFERENCES `itemPlacementSupply` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=81650 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de los itemShelving afectados por las ordenes de reposicion de nicho';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de los itemShelving afectados por las ordenes de reposicion de nicho';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `itemShelvingPlacementSupplyStock`
+-- Temporary table structure for view `itemShelvingPlacementSupplyStock`
--
DROP TABLE IF EXISTS `itemShelvingPlacementSupplyStock`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingPlacementSupplyStock`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingPlacementSupplyStock` AS SELECT
1 AS `itemShelvingFk`,
1 AS `itemFk`,
@@ -24933,13 +24958,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemShelvingPlacementSupplyStock__`
+-- Temporary table structure for view `itemShelvingPlacementSupplyStock__`
--
DROP TABLE IF EXISTS `itemShelvingPlacementSupplyStock__`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingPlacementSupplyStock__`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingPlacementSupplyStock__` AS SELECT
1 AS `itemShelvingFk`,
1 AS `itemFk`,
@@ -24961,7 +24986,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemShelvingSale`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemShelvingSale` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemShelvingFk` int(10) unsigned NOT NULL,
@@ -24976,7 +25001,7 @@ CREATE TABLE `itemShelvingSale` (
CONSTRAINT `itemShelvingSale_fk1` FOREIGN KEY (`itemShelvingFk`) REFERENCES `itemShelving` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemShelvingSale_fk2` FOREIGN KEY (`saleFk`) REFERENCES `sale` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemShelvingSale_fk3` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=56499 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -25002,13 +25027,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `itemShelvingSaleSum`
+-- Temporary table structure for view `itemShelvingSaleSum`
--
DROP TABLE IF EXISTS `itemShelvingSaleSum`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingSaleSum`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingSaleSum` AS SELECT
1 AS `id`,
1 AS `itemShelvingFk`,
@@ -25019,13 +25044,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemShelvingStock`
+-- Temporary table structure for view `itemShelvingStock`
--
DROP TABLE IF EXISTS `itemShelvingStock`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStock`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingStock` AS SELECT
1 AS `itemFk`,
1 AS `visible`,
@@ -25044,13 +25069,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemShelvingStockFull`
+-- Temporary table structure for view `itemShelvingStockFull`
--
DROP TABLE IF EXISTS `itemShelvingStockFull`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStockFull`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingStockFull` AS SELECT
1 AS `itemFk`,
1 AS `quantity`,
@@ -25068,13 +25093,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `itemShelvingStockRemoved`
+-- Temporary table structure for view `itemShelvingStockRemoved`
--
DROP TABLE IF EXISTS `itemShelvingStockRemoved`;
/*!50001 DROP VIEW IF EXISTS `itemShelvingStockRemoved`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemShelvingStockRemoved` AS SELECT
1 AS `itemShelvingFk`,
1 AS `itemFk`,
@@ -25087,7 +25112,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemTag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemTag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
@@ -25103,7 +25128,7 @@ CREATE TABLE `itemTag` (
KEY `itemFk_2` (`itemFk`,`tagFk`,`intValue`),
CONSTRAINT `itemTagItemFk` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `itemTagTagFk` FOREIGN KEY (`tagFk`) REFERENCES `tag` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1428016 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -25216,13 +25241,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `itemTagged`
+-- Temporary table structure for view `itemTagged`
--
DROP TABLE IF EXISTS `itemTagged`;
/*!50001 DROP VIEW IF EXISTS `itemTagged`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemTagged` AS SELECT
1 AS `itemFk`*/;
SET character_set_client = @saved_cs_client;
@@ -25233,7 +25258,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemTaxCountry`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemTaxCountry` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemFk` int(11) DEFAULT NULL,
@@ -25247,17 +25272,17 @@ CREATE TABLE `itemTaxCountry` (
CONSTRAINT `countryFK_paises` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
CONSTRAINT `itemFK_Article` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `taxClassFK_Iva_Group` FOREIGN KEY (`taxClassFk`) REFERENCES `taxClass` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=911122 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `itemTicketOut`
+-- Temporary table structure for view `itemTicketOut`
--
DROP TABLE IF EXISTS `itemTicketOut`;
/*!50001 DROP VIEW IF EXISTS `itemTicketOut`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemTicketOut` AS SELECT
1 AS `warehouseFk`,
1 AS `shipped`,
@@ -25276,7 +25301,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemType` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -25319,7 +25344,7 @@ CREATE TABLE `itemType` (
CONSTRAINT `itemType_ibfk_1` FOREIGN KEY (`categoryFk`) REFERENCES `itemCategory` (`id`) ON UPDATE CASCADE,
CONSTRAINT `itemType_ibfk_2` FOREIGN KEY (`roleCodeFk`) REFERENCES `account`.`role` (`name`) ON UPDATE CASCADE,
CONSTRAINT `warehouseFk5` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=286 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Protege la tabla tipos de updates para los 4 parámetros de los compradores, en funcion del valor del campo CodigoRojo de tblContadores.';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Protege la tabla tipos de updates para los 4 parámetros de los compradores, en funcion del valor del campo CodigoRojo de tblContadores.';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -25359,7 +25384,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `itemTypeI18n`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemTypeI18n` (
`typeFk` smallint(5) unsigned NOT NULL,
`lang` char(2) CHARACTER SET utf8 NOT NULL,
@@ -25369,13 +25394,13 @@ CREATE TABLE `itemTypeI18n` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `itemTypeL10n`
+-- Temporary table structure for view `itemTypeL10n`
--
DROP TABLE IF EXISTS `itemTypeL10n`;
/*!50001 DROP VIEW IF EXISTS `itemTypeL10n`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `itemTypeL10n` AS SELECT
1 AS `id`,
1 AS `name`*/;
@@ -25387,7 +25412,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `itemTypeTag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemTypeTag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemTypeFk` smallint(5) unsigned NOT NULL,
@@ -25399,7 +25424,7 @@ CREATE TABLE `itemTypeTag` (
KEY `itemTypeTagTag_idx` (`tagFk`),
CONSTRAINT `itemTypeTagTag` FOREIGN KEY (`tagFk`) REFERENCES `tag` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `itemTypeTagTipos` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=250 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25408,7 +25433,7 @@ CREATE TABLE `itemTypeTag` (
DROP TABLE IF EXISTS `itemVerdecora`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `itemVerdecora` (
`itemFk` int(11) NOT NULL,
`codin` int(11) DEFAULT NULL,
@@ -25423,7 +25448,7 @@ CREATE TABLE `itemVerdecora` (
DROP TABLE IF EXISTS `labourTree`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `labourTree` (
`id` int(11) NOT NULL DEFAULT '0',
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -25441,7 +25466,7 @@ CREATE TABLE `labourTree` (
DROP TABLE IF EXISTS `ledgerConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ledgerConfig` (
`lastBookEntry` int(11) NOT NULL,
PRIMARY KEY (`lastBookEntry`)
@@ -25454,7 +25479,7 @@ CREATE TABLE `ledgerConfig` (
DROP TABLE IF EXISTS `mail`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mail` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`sender` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -25471,7 +25496,7 @@ CREATE TABLE `mail` (
PRIMARY KEY (`id`),
KEY `sent_idx` (`sent`),
KEY `creation_idx` (`creationDate`)
-) ENGINE=InnoDB AUTO_INCREMENT=1969292 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25480,13 +25505,13 @@ CREATE TABLE `mail` (
DROP TABLE IF EXISTS `mailTemplates`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mailTemplates` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) CHARACTER SET utf8 NOT NULL,
`attachmentPath` text CHARACTER SET utf8 NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25495,7 +25520,7 @@ CREATE TABLE `mailTemplates` (
DROP TABLE IF EXISTS `mandate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mandate` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL,
@@ -25511,7 +25536,7 @@ CREATE TABLE `mandate` (
CONSTRAINT `mandato_fgkey1` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `mandato_fgkey2` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `mandato_fgkey3` FOREIGN KEY (`mandateTypeFk`) REFERENCES `mandateType` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=17348 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -25544,12 +25569,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `mandateType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mandateType` (
`id` smallint(5) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25558,7 +25583,7 @@ CREATE TABLE `mandateType` (
DROP TABLE IF EXISTS `manuscript`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `manuscript` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(45) CHARACTER SET utf8 NOT NULL,
@@ -25566,7 +25591,7 @@ CREATE TABLE `manuscript` (
`enabled` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `code_UNIQUE` (`code`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25575,12 +25600,12 @@ CREATE TABLE `manuscript` (
DROP TABLE IF EXISTS `medicalCenter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `medicalCenter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=12 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25589,7 +25614,7 @@ CREATE TABLE `medicalCenter` (
DROP TABLE IF EXISTS `medicalReview`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `medicalReview` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workerFk` int(11) NOT NULL,
@@ -25605,7 +25630,7 @@ CREATE TABLE `medicalReview` (
KEY `frgnkWorker_idx` (`workerFk`),
CONSTRAINT `frgcenter` FOREIGN KEY (`centerFk`) REFERENCES `medicalCenter` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `frgnkWorker` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=369 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25614,7 +25639,7 @@ CREATE TABLE `medicalReview` (
DROP TABLE IF EXISTS `message`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `message` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uuid` varchar(50) CHARACTER SET utf8 NOT NULL,
@@ -25626,7 +25651,7 @@ CREATE TABLE `message` (
KEY `sender` (`sender`),
KEY `recipient` (`recipient`),
KEY `uuid` (`uuid`(8))
-) ENGINE=InnoDB AUTO_INCREMENT=2077647 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25635,7 +25660,7 @@ CREATE TABLE `message` (
DROP TABLE IF EXISTS `messageInbox`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `messageInbox` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`uuid` varchar(50) CHARACTER SET utf8 NOT NULL,
@@ -25648,7 +25673,7 @@ CREATE TABLE `messageInbox` (
PRIMARY KEY (`id`),
KEY `uuid` (`uuid`(8)),
KEY `finalRecipient` (`finalRecipient`)
-) ENGINE=InnoDB AUTO_INCREMENT=2254338 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25657,13 +25682,13 @@ CREATE TABLE `messageInbox` (
DROP TABLE IF EXISTS `mobileAppVersionControl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `mobileAppVersionControl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`appName` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`version` int(11) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla para llevar el control de las Versions de las aplicaciones móvil ';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla para llevar el control de las Versions de las aplicaciones móvil ';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25672,7 +25697,7 @@ CREATE TABLE `mobileAppVersionControl` (
DROP TABLE IF EXISTS `noticeCategory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `noticeCategory` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`keyName` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -25683,7 +25708,7 @@ CREATE TABLE `noticeCategory` (
`requiredRole` int(11) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `keyName_UNIQUE` (`keyName`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25692,7 +25717,7 @@ CREATE TABLE `noticeCategory` (
DROP TABLE IF EXISTS `noticeSubscription`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `noticeSubscription` (
`noticeCategoryFk` int(11) NOT NULL DEFAULT '0',
`userFk` int(10) unsigned NOT NULL DEFAULT '0',
@@ -25709,12 +25734,12 @@ CREATE TABLE `noticeSubscription` (
DROP TABLE IF EXISTS `observationType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `observationType` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25723,7 +25748,7 @@ CREATE TABLE `observationType` (
DROP TABLE IF EXISTS `orderTicket`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `orderTicket` (
`orderFk` int(10) unsigned NOT NULL,
`ticketFk` int(11) NOT NULL DEFAULT '0',
@@ -25738,7 +25763,7 @@ CREATE TABLE `orderTicket` (
DROP TABLE IF EXISTS `origin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `origin` (
`id` tinyint(2) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -25752,7 +25777,7 @@ CREATE TABLE `origin` (
KEY `warehouse_id` (`warehouseFk`),
KEY `Id_Paises` (`countryFk`),
CONSTRAINT `origin_ibfk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=60 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25761,7 +25786,7 @@ CREATE TABLE `origin` (
DROP TABLE IF EXISTS `originI18n`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `originI18n` (
`originFk` tinyint(2) unsigned NOT NULL,
`lang` char(2) CHARACTER SET utf8 NOT NULL,
@@ -25771,13 +25796,13 @@ CREATE TABLE `originI18n` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `originL10n`
+-- Temporary table structure for view `originL10n`
--
DROP TABLE IF EXISTS `originL10n`;
/*!50001 DROP VIEW IF EXISTS `originL10n`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `originL10n` AS SELECT
1 AS `id`,
1 AS `name`*/;
@@ -25789,7 +25814,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `outgoingInvoiceVat`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `outgoingInvoiceVat` (
`outgoingInvoice` mediumint(8) NOT NULL,
`taxBase` decimal(12,2) DEFAULT NULL,
@@ -25805,14 +25830,14 @@ CREATE TABLE `outgoingInvoiceVat` (
DROP TABLE IF EXISTS `packageChecked`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `packageChecked` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `entryFk_UNIQUE` (`itemFk`),
KEY `fkItem_idx` (`itemFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=3438 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25821,7 +25846,7 @@ CREATE TABLE `packageChecked` (
DROP TABLE IF EXISTS `packageEquivalent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `packageEquivalent` (
`packageFk` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`equivalentFk` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
@@ -25833,13 +25858,13 @@ CREATE TABLE `packageEquivalent` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `packageEquivalentItem`
+-- Temporary table structure for view `packageEquivalentItem`
--
DROP TABLE IF EXISTS `packageEquivalentItem`;
/*!50001 DROP VIEW IF EXISTS `packageEquivalentItem`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `packageEquivalentItem` AS SELECT
1 AS `itemFk`,
1 AS `equivalentFk`*/;
@@ -25851,7 +25876,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `packaging`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `packaging` (
`id` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`volume` decimal(10,2) DEFAULT '0.00',
@@ -25883,7 +25908,7 @@ CREATE TABLE `packaging` (
DROP TABLE IF EXISTS `parking`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `parking` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`column` varchar(5) CHARACTER SET utf8 NOT NULL DEFAULT '--',
@@ -25895,7 +25920,7 @@ CREATE TABLE `parking` (
UNIQUE KEY `code_UNIQUE` (`code`),
KEY `parking_fk1_idx` (`sectorFk`),
CONSTRAINT `parking_fk1` FOREIGN KEY (`sectorFk`) REFERENCES `sector` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=27886 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla con los parkings del altillo';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla con los parkings del altillo';
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -25944,12 +25969,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `payDem`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payDem` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`payDem` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25958,7 +25983,7 @@ CREATE TABLE `payDem` (
DROP TABLE IF EXISTS `payMethod`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `payMethod` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
@@ -25968,7 +25993,7 @@ CREATE TABLE `payMethod` (
`ibanRequired` tinyint(3) DEFAULT '0',
`isNotified` tinyint(3) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=27 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25977,13 +26002,13 @@ CREATE TABLE `payMethod` (
DROP TABLE IF EXISTS `pedidosInternos`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pedidosInternos` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`idArticle` int(11) DEFAULT NULL,
`quantity` int(11) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=54 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -25992,7 +26017,7 @@ CREATE TABLE `pedidosInternos` (
DROP TABLE IF EXISTS `person`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `person` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`firstname` varchar(20) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -26009,17 +26034,17 @@ CREATE TABLE `person` (
KEY `nifIndex` (`fi`),
KEY `workerFk_idx` (`workerFk`),
CONSTRAINT `Person_ibfk_1` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=818 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `personMedia`
+-- Temporary table structure for view `personMedia`
--
DROP TABLE IF EXISTS `personMedia`;
/*!50001 DROP VIEW IF EXISTS `personMedia`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `personMedia` AS SELECT
1 AS `workerFk`,
1 AS `mediaValue`*/;
@@ -26031,7 +26056,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `pgc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pgc` (
`code` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
`rate` decimal(10,2) NOT NULL,
@@ -26054,7 +26079,7 @@ CREATE TABLE `pgc` (
DROP TABLE IF EXISTS `pgcEqu`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `pgcEqu` (
`vatFk` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Cuenta de IVA',
`equFk` varchar(10) COLLATE utf8_unicode_ci NOT NULL COMMENT 'Cuenta de recargo de equivalencia',
@@ -26065,13 +26090,51 @@ CREATE TABLE `pgcEqu` (
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Recoge las cuentas contables con recargo de equivalencia e identifica a la que corresponde al iva y la que corresponde al recargo';
/*!40101 SET character_set_client = @saved_cs_client */;
+--
+-- Table structure for table `plantpassport`
+--
+
+DROP TABLE IF EXISTS `plantpassport`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plantpassport` (
+ `producerFk` mediumint(3) unsigned NOT NULL,
+ `plantpassportAuthorityFk` mediumint(3) unsigned NOT NULL,
+ `number` varchar(25) CHARACTER SET utf8 DEFAULT NULL,
+ `isRequested` tinyint(2) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`producerFk`,`plantpassportAuthorityFk`),
+ KEY `plantpassport_authority_idx` (`plantpassportAuthorityFk`),
+ KEY `producer_id_idx` (`producerFk`),
+ CONSTRAINT `plantpassport_authority` FOREIGN KEY (`plantpassportAuthorityFk`) REFERENCES `plantpassportAuthority` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
+ CONSTRAINT `producer` FOREIGN KEY (`producerFk`) REFERENCES `producer` (`id`) ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='tiene la asignacion de cada productor con la autoridad certificadora';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
+--
+-- Table structure for table `plantpassportAuthority`
+--
+
+DROP TABLE IF EXISTS `plantpassportAuthority`;
+/*!40101 SET @saved_cs_client = @@character_set_client */;
+/*!40101 SET character_set_client = utf8 */;
+CREATE TABLE `plantpassportAuthority` (
+ `id` mediumint(3) unsigned NOT NULL,
+ `denomination` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
+ `countryFk` mediumint(8) unsigned DEFAULT NULL,
+ PRIMARY KEY (`id`),
+ UNIQUE KEY `denomination_UNIQUE` (`denomination`),
+ KEY `Pais_id_idx` (`countryFk`),
+ CONSTRAINT `Pais_id` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
+) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='entidades certificadoras';
+/*!40101 SET character_set_client = @saved_cs_client */;
+
--
-- Table structure for table `postCode`
--
DROP TABLE IF EXISTS `postCode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `postCode` (
`code` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`townFk` int(11) NOT NULL,
@@ -26175,7 +26238,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `postCodeBack__`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `postCodeBack__` (
`code` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`townFk` int(11) NOT NULL,
@@ -26191,7 +26254,7 @@ CREATE TABLE `postCodeBack__` (
DROP TABLE IF EXISTS `priceBuilderTag__`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `priceBuilderTag__` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`priceBuilderFk` int(11) NOT NULL,
@@ -26202,7 +26265,7 @@ CREATE TABLE `priceBuilderTag__` (
KEY `priceBuilderTag_fk2_idx` (`tagFk`),
CONSTRAINT `priceBuilderTag_fk1` FOREIGN KEY (`priceBuilderFk`) REFERENCES `priceBuilder__` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `priceBuilderTag_fk2` FOREIGN KEY (`tagFk`) REFERENCES `tag` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=22 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26211,7 +26274,7 @@ CREATE TABLE `priceBuilderTag__` (
DROP TABLE IF EXISTS `priceBuilderWarehouse__`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `priceBuilderWarehouse__` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`warehouseFk` smallint(6) unsigned NOT NULL,
@@ -26221,7 +26284,7 @@ CREATE TABLE `priceBuilderWarehouse__` (
KEY `priceBuilderWarehouse_fk2_idx` (`priceBuilderFk`),
CONSTRAINT `priceBuilderWarehouse_fk1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `priceBuilderWarehouse_fk2` FOREIGN KEY (`priceBuilderFk`) REFERENCES `priceBuilder__` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26230,7 +26293,7 @@ CREATE TABLE `priceBuilderWarehouse__` (
DROP TABLE IF EXISTS `priceBuilder__`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `priceBuilder__` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -26244,7 +26307,7 @@ CREATE TABLE `priceBuilder__` (
KEY `priceBuilder_fk2_idx` (`userFk`),
CONSTRAINT `priceBuilder_fk1` FOREIGN KEY (`itemTypeFk`) REFERENCES `itemType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `priceBuilder_fk2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26253,7 +26316,7 @@ CREATE TABLE `priceBuilder__` (
DROP TABLE IF EXISTS `priceFixed`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `priceFixed` (
`itemFk` int(10) NOT NULL,
`rate0` double NOT NULL,
@@ -26276,7 +26339,7 @@ CREATE TABLE `priceFixed` (
KEY `date_end` (`ended`),
KEY `warehouse_id` (`warehouseFk`),
CONSTRAINT `priceFixed_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=65157 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -26333,7 +26396,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `printServerQueue`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `printServerQueue` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`printerFk` tinyint(3) unsigned DEFAULT NULL,
@@ -26356,7 +26419,7 @@ CREATE TABLE `printServerQueue` (
KEY `Id_Trabajador` (`workerFk`),
CONSTRAINT `printServerQueue_ibfk_3` FOREIGN KEY (`priorityFk`) REFERENCES `queuePriority` (`id`) ON UPDATE CASCADE,
CONSTRAINT `printServerQueue_ibfk_4` FOREIGN KEY (`printerFk`) REFERENCES `vn2008`.`Impresoras` (`Id_Impresora`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=20465 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26365,7 +26428,7 @@ CREATE TABLE `printServerQueue` (
DROP TABLE IF EXISTS `printingQueueCheck`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `printingQueueCheck` (
`lastCount` int(11) unsigned NOT NULL DEFAULT '0',
`lastCheckSum` int(11) unsigned NOT NULL DEFAULT '0',
@@ -26380,14 +26443,14 @@ CREATE TABLE `printingQueueCheck` (
DROP TABLE IF EXISTS `producer`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `producer` (
`id` mediumint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
`isVisible` tinyint(1) NOT NULL DEFAULT '1',
PRIMARY KEY (`id`),
UNIQUE KEY `name_UNIQUE` (`name`)
-) ENGINE=InnoDB AUTO_INCREMENT=41633 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26396,7 +26459,7 @@ CREATE TABLE `producer` (
DROP TABLE IF EXISTS `professionalCategory`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `professionalCategory` (
`id` int(11) NOT NULL,
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -26412,7 +26475,7 @@ CREATE TABLE `professionalCategory` (
DROP TABLE IF EXISTS `profile`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profile` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`personFk` int(11) DEFAULT NULL,
@@ -26422,7 +26485,7 @@ CREATE TABLE `profile` (
KEY `profileTypeFk` (`profileTypeFk`),
CONSTRAINT `profile_ibfk_1` FOREIGN KEY (`personFk`) REFERENCES `person` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `profile_ibfk_2` FOREIGN KEY (`profileTypeFk`) REFERENCES `profileType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=697 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26431,12 +26494,12 @@ CREATE TABLE `profile` (
DROP TABLE IF EXISTS `profileType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `profileType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26445,7 +26508,7 @@ CREATE TABLE `profileType` (
DROP TABLE IF EXISTS `province`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `province` (
`id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
@@ -26462,7 +26525,7 @@ CREATE TABLE `province` (
CONSTRAINT `province_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON UPDATE CASCADE,
CONSTRAINT `province_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `vn2008`.`zones` (`zone_id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `warehouse_Id` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -26558,7 +26621,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `punchState`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `punchState` (
`workerFk` int(11) NOT NULL,
`state` tinyint(4) DEFAULT '0',
@@ -26572,7 +26635,7 @@ CREATE TABLE `punchState` (
DROP TABLE IF EXISTS `queuePriority`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `queuePriority` (
`id` tinyint(3) unsigned NOT NULL DEFAULT '0',
`priority` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -26586,7 +26649,7 @@ CREATE TABLE `queuePriority` (
DROP TABLE IF EXISTS `rateConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `rateConfig` (
`id` int(11) NOT NULL,
`rate0` int(11) DEFAULT NULL,
@@ -26603,7 +26666,7 @@ CREATE TABLE `rateConfig` (
DROP TABLE IF EXISTS `receipt`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `receipt` (
`Id` int(11) NOT NULL AUTO_INCREMENT,
`invoiceFk` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -26626,7 +26689,7 @@ CREATE TABLE `receipt` (
CONSTRAINT `receipt_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
CONSTRAINT `receipt_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE,
CONSTRAINT `recibo_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=616111 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -26686,7 +26749,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `recovery`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `recovery` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL DEFAULT '0',
@@ -26698,7 +26761,7 @@ CREATE TABLE `recovery` (
KEY `cliente_idx` (`clientFk`),
CONSTRAINT `cliente333` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE,
CONSTRAINT `cliente_cliente` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=318 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla apuntaremos los acuerdos de recobro semanal a ';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla apuntaremos los acuerdos de recobro semanal a ';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26707,12 +26770,14 @@ CREATE TABLE `recovery` (
DROP TABLE IF EXISTS `referenceCurrent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `referenceCurrent` (
`dated` date NOT NULL,
`value` decimal(10,4) NOT NULL,
`currencyFk` tinyint(3) unsigned NOT NULL,
- PRIMARY KEY (`dated`,`currencyFk`)
+ PRIMARY KEY (`dated`,`currencyFk`),
+ KEY `referenceCurrent_currencyFk _idx` (`currencyFk`),
+ CONSTRAINT `referenceCurrent_currencyFk ` FOREIGN KEY (`currencyFk`) REFERENCES `currency` (`id`) ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
@@ -26722,7 +26787,7 @@ CREATE TABLE `referenceCurrent` (
DROP TABLE IF EXISTS `referenceRate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `referenceRate` (
`currencyFk` tinyint(3) unsigned NOT NULL,
`dated` date NOT NULL,
@@ -26738,7 +26803,7 @@ CREATE TABLE `referenceRate` (
DROP TABLE IF EXISTS `referenceRateConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `referenceRateConfig` (
`simulatedValue` float unsigned NOT NULL DEFAULT '1.2309',
PRIMARY KEY (`simulatedValue`)
@@ -26746,13 +26811,13 @@ CREATE TABLE `referenceRateConfig` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `role`
+-- Temporary table structure for view `role`
--
DROP TABLE IF EXISTS `role`;
/*!50001 DROP VIEW IF EXISTS `role`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `role` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -26766,7 +26831,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `route`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `route` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`workerFk` int(11) DEFAULT NULL,
@@ -26790,7 +26855,7 @@ CREATE TABLE `route` (
KEY `route_ibfk_2_idx` (`workerFk`),
CONSTRAINT `route_ibfk_1` FOREIGN KEY (`gestdocFk`) REFERENCES `dms` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `route_ibfk_2` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=61044 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -26854,13 +26919,13 @@ DELIMITER ;
DROP TABLE IF EXISTS `routeAction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeAction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`price` decimal(10,2) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26869,7 +26934,7 @@ CREATE TABLE `routeAction` (
DROP TABLE IF EXISTS `routeComplement`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeComplement` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -26881,7 +26946,7 @@ CREATE TABLE `routeComplement` (
KEY `fgn_routeActionFk_idx` (`routeActionFk`),
CONSTRAINT `fgn_routeActionFk` FOREIGN KEY (`routeActionFk`) REFERENCES `routeAction` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fgn_workerFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1136 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26890,7 +26955,7 @@ CREATE TABLE `routeComplement` (
DROP TABLE IF EXISTS `routeGate`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeGate` (
`deviceId` varchar(30) CHARACTER SET utf8 NOT NULL,
`displayText` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -26949,7 +27014,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `routeLoadWorker`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeLoadWorker` (
`routeFk` int(10) unsigned NOT NULL,
`workerFk` int(11) NOT NULL,
@@ -26966,7 +27031,7 @@ CREATE TABLE `routeLoadWorker` (
DROP TABLE IF EXISTS `routeLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(10) unsigned NOT NULL,
@@ -26984,7 +27049,7 @@ CREATE TABLE `routeLog` (
KEY `userFk` (`userFk`),
CONSTRAINT `routeLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `route` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `routeLog_ibfk_2` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=227662 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -26993,7 +27058,7 @@ CREATE TABLE `routeLog` (
DROP TABLE IF EXISTS `routeParams`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeParams` (
`ID` int(10) unsigned NOT NULL AUTO_INCREMENT,
`kmRate` decimal(10,4) DEFAULT NULL,
@@ -27006,7 +27071,7 @@ CREATE TABLE `routeParams` (
`load5m3` decimal(10,4) DEFAULT NULL,
`load6m3` decimal(10,4) DEFAULT NULL,
PRIMARY KEY (`ID`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27015,7 +27080,7 @@ CREATE TABLE `routeParams` (
DROP TABLE IF EXISTS `routeUserPercentage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `routeUserPercentage` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workerFk` int(11) NOT NULL,
@@ -27024,7 +27089,7 @@ CREATE TABLE `routeUserPercentage` (
PRIMARY KEY (`id`),
KEY `routeUserPercentageFk_idx` (`workerFk`),
CONSTRAINT `routeUserPercentageFk` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27033,7 +27098,7 @@ CREATE TABLE `routeUserPercentage` (
DROP TABLE IF EXISTS `sale`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sale` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`itemFk` int(11) NOT NULL,
@@ -27053,7 +27118,7 @@ CREATE TABLE `sale` (
KEY `itemFk_ticketFk` (`itemFk`,`ticketFk`),
CONSTRAINT `movement_ticket_id` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `sale_ibfk_1` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=26615111 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -27158,7 +27223,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `saleChecked`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `saleChecked` (
`saleFk` int(11) NOT NULL,
`isChecked` int(11) NOT NULL DEFAULT '0',
@@ -27173,7 +27238,7 @@ CREATE TABLE `saleChecked` (
DROP TABLE IF EXISTS `saleComponent`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `saleComponent` (
`saleFk` int(11) NOT NULL,
`componentFk` int(11) NOT NULL,
@@ -27188,13 +27253,13 @@ CREATE TABLE `saleComponent` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `saleFreight`
+-- Temporary table structure for view `saleFreight`
--
DROP TABLE IF EXISTS `saleFreight`;
/*!50001 DROP VIEW IF EXISTS `saleFreight`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `saleFreight` AS SELECT
1 AS `ticketFk`,
1 AS `clientFk`,
@@ -27214,7 +27279,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `saleItemShelving`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `saleItemShelving` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`saleFk` int(11) NOT NULL,
@@ -27224,7 +27289,7 @@ CREATE TABLE `saleItemShelving` (
`ubication` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
PRIMARY KEY (`id`),
KEY `saleItemShelving_fk1_idx` (`itemShelvingFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=26208 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27233,7 +27298,7 @@ CREATE TABLE `saleItemShelving` (
DROP TABLE IF EXISTS `saleState`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `saleState` (
`saleFk` int(11) NOT NULL,
`stateFk` tinyint(3) unsigned NOT NULL,
@@ -27250,7 +27315,7 @@ CREATE TABLE `saleState` (
DROP TABLE IF EXISTS `saleTracking`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `saleTracking` (
`saleFk` int(11) NOT NULL,
`isChecked` tinyint(3) unsigned NOT NULL DEFAULT '0',
@@ -27268,7 +27333,7 @@ CREATE TABLE `saleTracking` (
KEY `saleTracking_fk2_idx` (`actionFk`),
CONSTRAINT `fgnStateFk` FOREIGN KEY (`stateFk`) REFERENCES `state` (`id`) ON UPDATE CASCADE,
CONSTRAINT `saleTracking_fk2` FOREIGN KEY (`actionFk`) REFERENCES `vncontrol`.`accion` (`accion_id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=21545889 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -27296,13 +27361,13 @@ DELIMITER ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
--
--- Temporary view structure for view `saleVolume`
+-- Temporary table structure for view `saleVolume`
--
DROP TABLE IF EXISTS `saleVolume`;
/*!50001 DROP VIEW IF EXISTS `saleVolume`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `saleVolume` AS SELECT
1 AS `ticketFk`,
1 AS `saleFk`,
@@ -27321,7 +27386,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `sample`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sample` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`code` varchar(20) CHARACTER SET utf8 NOT NULL,
@@ -27329,7 +27394,7 @@ CREATE TABLE `sample` (
`isVisible` tinyint(4) NOT NULL DEFAULT '1',
`hasCompany` varchar(45) COLLATE utf8_unicode_ci NOT NULL DEFAULT '0',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27338,7 +27403,7 @@ CREATE TABLE `sample` (
DROP TABLE IF EXISTS `sector`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sector` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -27351,7 +27416,7 @@ CREATE TABLE `sector` (
UNIQUE KEY `code_UNIQUE` (`code`),
KEY `sector_fk1_idx` (`warehouseFk`),
CONSTRAINT `sector_fk1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27360,7 +27425,7 @@ CREATE TABLE `sector` (
DROP TABLE IF EXISTS `sharingCart`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sharingCart` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workerFk` int(11) NOT NULL,
@@ -27373,7 +27438,7 @@ CREATE TABLE `sharingCart` (
KEY `Suplent` (`workerSubstitute`),
CONSTRAINT `Suplent_key` FOREIGN KEY (`workerSubstitute`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
CONSTRAINT `Trabajador_key` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2250 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -27430,7 +27495,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `sharingClient`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sharingClient` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workerFk` int(11) NOT NULL,
@@ -27442,7 +27507,7 @@ CREATE TABLE `sharingClient` (
KEY `Client` (`clientFk`),
CONSTRAINT `Clients_key` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE,
CONSTRAINT `Trabajadores_key` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=47 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -27489,7 +27554,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `shelving`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `shelving` (
`code` varchar(10) CHARACTER SET utf8 NOT NULL,
`parkingFk` int(11) DEFAULT NULL,
@@ -27537,7 +27602,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `sms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `sms` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`senderFk` int(11) NOT NULL,
@@ -27549,7 +27614,7 @@ CREATE TABLE `sms` (
`status` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=158472 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27558,7 +27623,7 @@ CREATE TABLE `sms` (
DROP TABLE IF EXISTS `smsConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `smsConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`uri` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -27566,7 +27631,7 @@ CREATE TABLE `smsConfig` (
`password` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
`title` varchar(50) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='SMS configuration parameters';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='SMS configuration parameters';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27575,7 +27640,7 @@ CREATE TABLE `smsConfig` (
DROP TABLE IF EXISTS `solunionCAP`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `solunionCAP` (
`creditInsurance` int(11) NOT NULL,
`dateStart` date NOT NULL,
@@ -27669,7 +27734,7 @@ ALTER DATABASE `vn` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
DROP TABLE IF EXISTS `specialPrice`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `specialPrice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL DEFAULT '0',
@@ -27683,7 +27748,7 @@ CREATE TABLE `specialPrice` (
CONSTRAINT `sp_customer_id` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE,
CONSTRAINT `{01A99AF1-3D3F-4B15-AC0C-C7A834F319A3}` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `{EE4ADEF6-0AC6-401F-B7C4-D797972FC065}` FOREIGN KEY (`itemFk`) REFERENCES `item` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=713 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27692,7 +27757,7 @@ CREATE TABLE `specialPrice` (
DROP TABLE IF EXISTS `state`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `state` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
@@ -27705,7 +27770,7 @@ CREATE TABLE `state` (
`isPicked` tinyint(1) NOT NULL DEFAULT '0',
PRIMARY KEY (`id`),
UNIQUE KEY `code_UNIQUE` (`code`)
-) ENGINE=InnoDB AUTO_INCREMENT=30 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27714,7 +27779,7 @@ CREATE TABLE `state` (
DROP TABLE IF EXISTS `stockBuyed`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stockBuyed` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`user` int(10) unsigned DEFAULT NULL,
@@ -27727,7 +27792,7 @@ CREATE TABLE `stockBuyed` (
UNIQUE KEY `date_UNIQUE` (`date`,`user`),
KEY `stockBuyed_user_idx` (`user`),
CONSTRAINT `stockBuyedUserFk` FOREIGN KEY (`user`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=864507 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27736,7 +27801,7 @@ CREATE TABLE `stockBuyed` (
DROP TABLE IF EXISTS `stowaway`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `stowaway` (
`id` int(11) NOT NULL COMMENT 'ticket pequeño',
`shipFk` int(11) NOT NULL COMMENT 'ticket grande',
@@ -27751,7 +27816,7 @@ CREATE TABLE `stowaway` (
DROP TABLE IF EXISTS `supplier`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplier` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(50) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -27790,7 +27855,7 @@ CREATE TABLE `supplier` (
CONSTRAINT `pay_dem_id` FOREIGN KEY (`payDemFk`) REFERENCES `payDem` (`id`) ON UPDATE CASCADE,
CONSTRAINT `pay_met_id` FOREIGN KEY (`payMethodFk`) REFERENCES `payMethod` (`id`) ON UPDATE CASCADE,
CONSTRAINT `province_id` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2993 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27799,7 +27864,7 @@ CREATE TABLE `supplier` (
DROP TABLE IF EXISTS `supplierAccount`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplierAccount` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`supplierFk` int(11) NOT NULL,
@@ -27815,7 +27880,7 @@ CREATE TABLE `supplierAccount` (
KEY `fk_proveedores_proveedores_account_idx` (`supplierFk`),
KEY `fk_Proveedores_account_entity1_idx` (`bankEntityFk`),
KEY `fk_banco_prov_account_idx` (`bankFk`)
-) ENGINE=InnoDB AUTO_INCREMENT=894 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27824,7 +27889,7 @@ CREATE TABLE `supplierAccount` (
DROP TABLE IF EXISTS `supplierExpense`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `supplierExpense` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -27848,17 +27913,17 @@ CREATE TABLE `supplierExpense` (
CONSTRAINT `pago_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE,
CONSTRAINT `pago_moneda` FOREIGN KEY (`currencyFk`) REFERENCES `currency` (`id`) ON UPDATE CASCADE,
CONSTRAINT `proveedor_pago` FOREIGN KEY (`supplierFk`) REFERENCES `supplier` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=130 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `supplierPackaging`
+-- Temporary table structure for view `supplierPackaging`
--
DROP TABLE IF EXISTS `supplierPackaging`;
/*!50001 DROP VIEW IF EXISTS `supplierPackaging`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `supplierPackaging` AS SELECT
1 AS `supplierFk`,
1 AS `itemFk`,
@@ -27877,7 +27942,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `tablet`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tablet` (
`uuid` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -27893,7 +27958,7 @@ CREATE TABLE `tablet` (
DROP TABLE IF EXISTS `tabletDepartment`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tabletDepartment` (
`tabletFk` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
`departmentFk` int(11) NOT NULL,
@@ -27909,7 +27974,7 @@ CREATE TABLE `tabletDepartment` (
DROP TABLE IF EXISTS `tag`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tag` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(45) CHARACTER SET utf8 NOT NULL,
@@ -27922,7 +27987,7 @@ CREATE TABLE `tag` (
PRIMARY KEY (`id`),
KEY `tagEdiTypeFkIdx` (`ediTypeFk`),
CONSTRAINT `fgnTag` FOREIGN KEY (`ediTypeFk`) REFERENCES `edi`.`type` (`type_id`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=111 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Categorias para etiquetar los productos';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Categorias para etiquetar los productos';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -27931,7 +27996,7 @@ CREATE TABLE `tag` (
DROP TABLE IF EXISTS `tagAbbreviation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tagAbbreviation` (
`value` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
`abbreviation` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
@@ -27945,7 +28010,7 @@ CREATE TABLE `tagAbbreviation` (
DROP TABLE IF EXISTS `tagI18n`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tagI18n` (
`tagFk` int(10) unsigned NOT NULL,
`lang` char(2) CHARACTER SET utf8 NOT NULL,
@@ -27955,13 +28020,13 @@ CREATE TABLE `tagI18n` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `tagL10n`
+-- Temporary table structure for view `tagL10n`
--
DROP TABLE IF EXISTS `tagL10n`;
/*!50001 DROP VIEW IF EXISTS `tagL10n`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `tagL10n` AS SELECT
1 AS `id`,
1 AS `name`*/;
@@ -27973,7 +28038,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `taxArea`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taxArea` (
`code` varchar(15) CHARACTER SET utf8 NOT NULL,
`ClaveOperacionFactura` varchar(1) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -27988,13 +28053,13 @@ CREATE TABLE `taxArea` (
DROP TABLE IF EXISTS `taxClass`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taxClass` (
`id` tinyint(3) unsigned NOT NULL AUTO_INCREMENT,
`description` varchar(30) COLLATE utf8_unicode_ci NOT NULL,
`code` varchar(1) COLLATE utf8_unicode_ci NOT NULL DEFAULT 'R',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28003,7 +28068,7 @@ CREATE TABLE `taxClass` (
DROP TABLE IF EXISTS `taxClassCode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taxClassCode` (
`taxClassFk` tinyint(3) unsigned NOT NULL,
`effectived` date NOT NULL,
@@ -28021,7 +28086,7 @@ CREATE TABLE `taxClassCode` (
DROP TABLE IF EXISTS `taxCode`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taxCode` (
`id` tinyint(2) unsigned NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -28039,7 +28104,7 @@ CREATE TABLE `taxCode` (
KEY `codigo` (`code`),
KEY `tipo_index` (`type`),
CONSTRAINT `taxCode_ibfk_1` FOREIGN KEY (`taxTypeFk`) REFERENCES `taxType` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=123 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28048,7 +28113,7 @@ CREATE TABLE `taxCode` (
DROP TABLE IF EXISTS `taxType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `taxType` (
`id` tinyint(2) NOT NULL AUTO_INCREMENT,
`nickname` varchar(6) COLLATE utf8_unicode_ci NOT NULL,
@@ -28061,7 +28126,7 @@ CREATE TABLE `taxType` (
KEY `serie_id` (`serial`),
KEY `Id_Pais` (`countryFk`),
CONSTRAINT `taxType_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=25 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28070,7 +28135,7 @@ CREATE TABLE `taxType` (
DROP TABLE IF EXISTS `ticket`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticket` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`clientFk` int(11) NOT NULL DEFAULT '0',
@@ -28125,7 +28190,7 @@ CREATE TABLE `ticket` (
CONSTRAINT `tickets_fk10` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE,
CONSTRAINT `tickets_fk11` FOREIGN KEY (`collectionFk`) REFERENCES `collection` (`id`) ON DELETE SET NULL ON UPDATE CASCADE,
CONSTRAINT `tickets_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `zone` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2513929 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -28262,7 +28327,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `ticketCollection`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketCollection` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ticketFk` int(11) NOT NULL,
@@ -28274,7 +28339,7 @@ CREATE TABLE `ticketCollection` (
KEY `ticketCollection_fk2_idx` (`ticketFk`),
CONSTRAINT `ticketCollection_fk1` FOREIGN KEY (`collectionFk`) REFERENCES `collection` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticketCollection_fk2` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1241 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28283,12 +28348,12 @@ CREATE TABLE `ticketCollection` (
DROP TABLE IF EXISTS `ticketConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketConfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`scopeDays` tinyint(3) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28297,7 +28362,7 @@ CREATE TABLE `ticketConfig` (
DROP TABLE IF EXISTS `ticketDms`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketDms` (
`ticketFk` int(11) NOT NULL,
`dmsFk` int(11) NOT NULL,
@@ -28334,7 +28399,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `ticketDown`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketDown` (
`ticketFk` int(11) NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -28352,7 +28417,7 @@ CREATE TABLE `ticketDown` (
DROP TABLE IF EXISTS `ticketDown_SelectionType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketDown_SelectionType` (
`id` int(11) NOT NULL,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
@@ -28362,13 +28427,13 @@ CREATE TABLE `ticketDown_SelectionType` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `ticketGetVolume__`
+-- Temporary table structure for view `ticketGetVolume__`
--
DROP TABLE IF EXISTS `ticketGetVolume__`;
/*!50001 DROP VIEW IF EXISTS `ticketGetVolume__`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ticketGetVolume__` AS SELECT
1 AS `ticketFk`,
1 AS `routeFk`,
@@ -28383,7 +28448,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `ticketLastState`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketLastState` (
`ticketFk` int(11) NOT NULL DEFAULT '0',
`ticketTrackingFk` int(11) NOT NULL,
@@ -28401,7 +28466,7 @@ CREATE TABLE `ticketLastState` (
DROP TABLE IF EXISTS `ticketLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -28419,17 +28484,17 @@ CREATE TABLE `ticketLog` (
KEY `logTicketuserFk` (`userFk`),
CONSTRAINT `ticketLog_ibfk_1` FOREIGN KEY (`originFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticketLog_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=8412961 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `ticketNotInvoiced`
+-- Temporary table structure for view `ticketNotInvoiced`
--
DROP TABLE IF EXISTS `ticketNotInvoiced`;
/*!50001 DROP VIEW IF EXISTS `ticketNotInvoiced`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ticketNotInvoiced` AS SELECT
1 AS `companyFk`,
1 AS `companyCode`,
@@ -28445,7 +28510,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `ticketObservation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketObservation` (
`id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
`ticketFk` int(11) NOT NULL,
@@ -28456,7 +28521,7 @@ CREATE TABLE `ticketObservation` (
KEY `observation_type_id` (`observationTypeFk`),
CONSTRAINT `ticketObservation_ibfk_1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticketObservation_ibfk_2` FOREIGN KEY (`observationTypeFk`) REFERENCES `observationType` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=1530942 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28465,7 +28530,7 @@ CREATE TABLE `ticketObservation` (
DROP TABLE IF EXISTS `ticketPackage`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketPackage` (
`ticket` int(11) NOT NULL,
`counter` int(10) unsigned NOT NULL DEFAULT '0',
@@ -28480,7 +28545,7 @@ CREATE TABLE `ticketPackage` (
DROP TABLE IF EXISTS `ticketPackaging`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketPackaging` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ticketFk` int(11) NOT NULL,
@@ -28496,7 +28561,7 @@ CREATE TABLE `ticketPackaging` (
CONSTRAINT `ticketPackaging_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticketPackaging_fk2` FOREIGN KEY (`packagingFk`) REFERENCES `packaging` (`id`) ON UPDATE CASCADE,
CONSTRAINT `ticketPackaging_fk3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=79234 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -28525,7 +28590,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `ticketPackagingStartingStock`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketPackagingStartingStock` (
`clientFk` int(11) NOT NULL,
`packagingFk` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
@@ -28548,7 +28613,7 @@ CREATE TABLE `ticketPackagingStartingStock` (
DROP TABLE IF EXISTS `ticketParking`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketParking` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`ticketFk` int(11) NOT NULL,
@@ -28559,17 +28624,17 @@ CREATE TABLE `ticketParking` (
KEY `ticketParking_fk1_idx` (`parkingFk`),
CONSTRAINT `ticketParking_fk1` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `ticketParking_fk2` FOREIGN KEY (`parkingFk`) REFERENCES `parking` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=16798 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `ticketPreviousPreparingList`
+-- Temporary table structure for view `ticketPreviousPreparingList`
--
DROP TABLE IF EXISTS `ticketPreviousPreparingList`;
/*!50001 DROP VIEW IF EXISTS `ticketPreviousPreparingList`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ticketPreviousPreparingList` AS SELECT
1 AS `ticketFk`,
1 AS `code`,
@@ -28587,7 +28652,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `ticketRequest`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketRequest` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(255) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -28625,7 +28690,7 @@ CREATE TABLE `ticketRequest` (
CONSTRAINT `fgnAtender` FOREIGN KEY (`atenderFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fgnRequester` FOREIGN KEY (`requesterFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE,
CONSTRAINT `fgnTicket` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=52600 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -28690,7 +28755,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `ticketService`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketService` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
@@ -28715,7 +28780,7 @@ CREATE TABLE `ticketService` (
DROP TABLE IF EXISTS `ticketServiceType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketServiceType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
@@ -28723,17 +28788,17 @@ CREATE TABLE `ticketServiceType` (
PRIMARY KEY (`id`),
KEY `ticketServiceType_expence_idx` (`expenceFk`),
CONSTRAINT `ticketServiceType_expence` FOREIGN KEY (`expenceFk`) REFERENCES `expence` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 COMMENT='Lista de los posibles servicios a elegir';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COMMENT='Lista de los posibles servicios a elegir';
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `ticketState`
+-- Temporary table structure for view `ticketState`
--
DROP TABLE IF EXISTS `ticketState`;
/*!50001 DROP VIEW IF EXISTS `ticketState`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ticketState` AS SELECT
1 AS `updated`,
1 AS `stateFk`,
@@ -28750,13 +28815,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `ticketStateToday`
+-- Temporary table structure for view `ticketStateToday`
--
DROP TABLE IF EXISTS `ticketStateToday`;
/*!50001 DROP VIEW IF EXISTS `ticketStateToday`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ticketStateToday` AS SELECT
1 AS `ticket`,
1 AS `state`,
@@ -28769,13 +28834,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `ticketTracking`
+-- Temporary table structure for view `ticketTracking`
--
DROP TABLE IF EXISTS `ticketTracking`;
/*!50001 DROP VIEW IF EXISTS `ticketTracking`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `ticketTracking` AS SELECT
1 AS `id`,
1 AS `stateFk`,
@@ -28790,7 +28855,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `ticketTrolley`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketTrolley` (
`ticket` int(11) NOT NULL,
`labelCount` int(11) NOT NULL DEFAULT '0',
@@ -28805,12 +28870,12 @@ CREATE TABLE `ticketTrolley` (
DROP TABLE IF EXISTS `ticketUpdateAction`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketUpdateAction` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`description` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla pondremos las distintas opciones que se ofrecen al comecial o al cliente al cambiar alguno de los parametros básicos de un ticket';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='En esta tabla pondremos las distintas opciones que se ofrecen al comecial o al cliente al cambiar alguno de los parametros básicos de un ticket';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28819,13 +28884,13 @@ CREATE TABLE `ticketUpdateAction` (
DROP TABLE IF EXISTS `ticketWeekly`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `ticketWeekly` (
`ticketFk` int(11) NOT NULL AUTO_INCREMENT,
`weekDay` tinyint(1) DEFAULT NULL COMMENT 'funcion de mysql Lunes = 0, Domingo = 6',
PRIMARY KEY (`ticketFk`),
CONSTRAINT `Id_Ticket_fk` FOREIGN KEY (`ticketFk`) REFERENCES `ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2511082 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -28834,7 +28899,7 @@ CREATE TABLE `ticketWeekly` (
DROP TABLE IF EXISTS `till`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `till` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -28866,7 +28931,7 @@ CREATE TABLE `till` (
KEY `fk_Cajas_Proveedores_account1_idx` (`supplierAccountFk`),
CONSTRAINT `till_ibfk_2` FOREIGN KEY (`bankFk`) REFERENCES `bank` (`id`) ON UPDATE CASCADE,
CONSTRAINT `till_ibfk_3` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=750671 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -28895,7 +28960,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `tillConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `tillConfig` (
`id` int(11) NOT NULL,
`openingBalance` decimal(10,2) NOT NULL,
@@ -28910,7 +28975,7 @@ CREATE TABLE `tillConfig` (
DROP TABLE IF EXISTS `town`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `town` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(100) COLLATE utf8_unicode_ci NOT NULL,
@@ -28920,7 +28985,7 @@ CREATE TABLE `town` (
KEY `name_idx` (`name`),
KEY `townProvinceFk` (`provinceFk`),
CONSTRAINT `townProvinceFk` FOREIGN KEY (`provinceFk`) REFERENCES `province` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=241176 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -29016,12 +29081,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `trainingCenter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `trainingCenter` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=15 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29030,7 +29095,7 @@ CREATE TABLE `trainingCenter` (
DROP TABLE IF EXISTS `trainingCourse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `trainingCourse` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workerFk` int(11) NOT NULL,
@@ -29049,7 +29114,7 @@ CREATE TABLE `trainingCourse` (
CONSTRAINT `frgnCenter` FOREIGN KEY (`centerFk`) REFERENCES `trainingCenter` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `frgnTrainingCourseType` FOREIGN KEY (`trainingCourseTypeFk`) REFERENCES `trainingCourseType` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `frgnWorker` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=452 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de trabajadores que han realizado una formación';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de trabajadores que han realizado una formación';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29058,12 +29123,12 @@ CREATE TABLE `trainingCourse` (
DROP TABLE IF EXISTS `trainingCourseType`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `trainingCourseType` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de las formaciones';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de las formaciones';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29072,7 +29137,7 @@ CREATE TABLE `trainingCourseType` (
DROP TABLE IF EXISTS `travel`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `travel` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`shipped` date DEFAULT NULL,
@@ -29101,7 +29166,7 @@ CREATE TABLE `travel` (
CONSTRAINT `travel_ibfk_2` FOREIGN KEY (`warehouseOutFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `travel_ibfk_3` FOREIGN KEY (`agencyFk`) REFERENCES `agencyMode` (`id`) ON UPDATE CASCADE,
CONSTRAINT `travel_ibfk_4` FOREIGN KEY (`cargoSupplierFk`) REFERENCES `vn2008`.`Proveedores_cargueras` (`Id_Proveedor`) ON DELETE SET NULL ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=143498 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -29189,7 +29254,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `travelObservation`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `travelObservation` (
`id` int(11) unsigned NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -29197,7 +29262,7 @@ CREATE TABLE `travelObservation` (
`description` text COLLATE utf8_unicode_ci NOT NULL,
`created` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=20 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de travel';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de travel';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29206,7 +29271,7 @@ CREATE TABLE `travelObservation` (
DROP TABLE IF EXISTS `travelRecalc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `travelRecalc` (
`travelFk` int(10) unsigned NOT NULL,
PRIMARY KEY (`travelFk`)
@@ -29219,7 +29284,7 @@ CREATE TABLE `travelRecalc` (
DROP TABLE IF EXISTS `travelThermograph`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `travelThermograph` (
`thermographFk` varchar(45) COLLATE utf8_unicode_ci NOT NULL,
`created` date NOT NULL,
@@ -29241,13 +29306,13 @@ CREATE TABLE `travelThermograph` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `user`
+-- Temporary table structure for view `user`
--
DROP TABLE IF EXISTS `user`;
/*!50001 DROP VIEW IF EXISTS `user`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `user` AS SELECT
1 AS `id`,
1 AS `name`,
@@ -29264,7 +29329,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `userConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `userConfig` (
`userFk` int(10) unsigned NOT NULL,
`warehouseFk` smallint(6) DEFAULT NULL,
@@ -29281,7 +29346,7 @@ CREATE TABLE `userConfig` (
DROP TABLE IF EXISTS `vehicle`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `vehicle` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`numberPlate` varchar(10) COLLATE utf8_unicode_ci NOT NULL,
@@ -29300,7 +29365,7 @@ CREATE TABLE `vehicle` (
CONSTRAINT `provinceFk` FOREIGN KEY (`warehouseFk`) REFERENCES `province` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `vehicle_deliveryPointFk` FOREIGN KEY (`deliveryPointFk`) REFERENCES `deliveryPoint` (`id`) ON UPDATE CASCADE,
CONSTRAINT `vehicle_ibfk_1` FOREIGN KEY (`companyFk`) REFERENCES `company` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=453 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29309,7 +29374,7 @@ CREATE TABLE `vehicle` (
DROP TABLE IF EXISTS `warehouse`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `warehouse` (
`id` smallint(6) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(20) COLLATE utf8_unicode_ci NOT NULL,
@@ -29334,7 +29399,7 @@ CREATE TABLE `warehouse` (
KEY `Id_Paises` (`countryFk`),
KEY `isComparativeIdx` (`isComparative`),
CONSTRAINT `warehouse_ibfk_1` FOREIGN KEY (`countryFk`) REFERENCES `country` (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=58 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -29387,12 +29452,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `warehouseAlias`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `warehouseAlias` (
`id` smallint(5) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=32 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29401,7 +29466,7 @@ CREATE TABLE `warehouseAlias` (
DROP TABLE IF EXISTS `workCenter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workCenter` (
`id` int(11) NOT NULL DEFAULT '0',
`name` varchar(255) DEFAULT NULL,
@@ -29418,7 +29483,7 @@ CREATE TABLE `workCenter` (
DROP TABLE IF EXISTS `workCenterHoliday`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workCenterHoliday` (
`workCenterFk` int(11) NOT NULL,
`days` double NOT NULL,
@@ -29433,7 +29498,7 @@ CREATE TABLE `workCenterHoliday` (
DROP TABLE IF EXISTS `worker`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `worker` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`code` varchar(3) COLLATE utf8_unicode_ci NOT NULL,
@@ -29471,7 +29536,7 @@ CREATE TABLE `worker` (
KEY `empresa_id` (`companyFk`),
CONSTRAINT `Clientes` FOREIGN KEY (`clientFk`) REFERENCES `client` (`id`) ON UPDATE CASCADE,
CONSTRAINT `worker_ibfk_1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=101330 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -29524,7 +29589,7 @@ DELIMITER ;
DROP TABLE IF EXISTS `workerBosses`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerBosses` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`workerFk` int(11) NOT NULL,
@@ -29535,17 +29600,17 @@ CREATE TABLE `workerBosses` (
KEY `fg_bossFk_worker_idx` (`bossFk`),
CONSTRAINT `fg_bossFk_worker` FOREIGN KEY (`bossFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `fg_workerFk_worker` FOREIGN KEY (`workerFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2515 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerCalendar`
+-- Temporary table structure for view `workerCalendar`
--
DROP TABLE IF EXISTS `workerCalendar`;
/*!50001 DROP VIEW IF EXISTS `workerCalendar`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerCalendar` AS SELECT
1 AS `businessFk`,
1 AS `workerFk`,
@@ -29559,7 +29624,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workerClockLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerClockLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -29579,24 +29644,24 @@ CREATE TABLE `workerClockLog` (
DROP TABLE IF EXISTS `workerConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerConfig` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`defaultWorkerFk` int(11) NOT NULL,
PRIMARY KEY (`id`),
KEY `defaultWorkerFk` (`defaultWorkerFk`),
CONSTRAINT `workerConfig_ibfk_1` FOREIGN KEY (`defaultWorkerFk`) REFERENCES `worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerDepartment`
+-- Temporary table structure for view `workerDepartment`
--
DROP TABLE IF EXISTS `workerDepartment`;
/*!50001 DROP VIEW IF EXISTS `workerDepartment`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerDepartment` AS SELECT
1 AS `workerFk`,
1 AS `departmentFk`*/;
@@ -29608,7 +29673,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workerDocument`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerDocument` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`worker` int(10) unsigned DEFAULT NULL,
@@ -29618,7 +29683,7 @@ CREATE TABLE `workerDocument` (
KEY `workerDocument_ibfk_2` (`document`),
CONSTRAINT `workerDocument_ibfk_1` FOREIGN KEY (`worker`) REFERENCES `worker` (`userFk`) ON UPDATE CASCADE,
CONSTRAINT `workerDocument_ibfk_2` FOREIGN KEY (`document`) REFERENCES `dms` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=12993 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29627,13 +29692,13 @@ CREATE TABLE `workerDocument` (
DROP TABLE IF EXISTS `workerEmergencyBoss`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerEmergencyBoss` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
`value` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL COMMENT 'Table to save all responsible people phones',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29642,7 +29707,7 @@ CREATE TABLE `workerEmergencyBoss` (
DROP TABLE IF EXISTS `workerHourPrice`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerHourPrice` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dated` date NOT NULL,
@@ -29650,7 +29715,7 @@ CREATE TABLE `workerHourPrice` (
`nightInc` decimal(4,2) DEFAULT NULL,
`extraInc` decimal(4,2) DEFAULT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Recoge los acuerdos de los distintos convenios';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Recoge los acuerdos de los distintos convenios';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29659,7 +29724,7 @@ CREATE TABLE `workerHourPrice` (
DROP TABLE IF EXISTS `workerJourney`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerJourney` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userFk` int(10) unsigned NOT NULL,
@@ -29683,17 +29748,17 @@ CREATE TABLE `workerJourney` (
UNIQUE KEY `userFk_UNIQUE` (`userFk`,`dated`),
KEY `fk_workerJourney_user_idx` (`userFk`),
CONSTRAINT `fk_workerJourney_user` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=66128753 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerLabour`
+-- Temporary table structure for view `workerLabour`
--
DROP TABLE IF EXISTS `workerLabour`;
/*!50001 DROP VIEW IF EXISTS `workerLabour`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerLabour` AS SELECT
1 AS `businessFk`,
1 AS `workerFk`,
@@ -29709,7 +29774,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workerLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`originFk` int(11) NOT NULL,
@@ -29722,7 +29787,7 @@ CREATE TABLE `workerLog` (
KEY `userFk_idx` (`userFk`),
CONSTRAINT `userFk` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION,
CONSTRAINT `workerFk` FOREIGN KEY (`originFk`) REFERENCES `worker` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=16400 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29731,7 +29796,7 @@ CREATE TABLE `workerLog` (
DROP TABLE IF EXISTS `workerMana`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerMana` (
`workerFk` int(11) NOT NULL,
`size` int(11) NOT NULL DEFAULT '300',
@@ -29747,13 +29812,13 @@ CREATE TABLE `workerMana` (
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerMana__`
+-- Temporary table structure for view `workerMana__`
--
DROP TABLE IF EXISTS `workerMana__`;
/*!50001 DROP VIEW IF EXISTS `workerMana__`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerMana__` AS SELECT
1 AS `workerFk`,
1 AS `size`,
@@ -29765,13 +29830,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `workerMedia`
+-- Temporary table structure for view `workerMedia`
--
DROP TABLE IF EXISTS `workerMedia`;
/*!50001 DROP VIEW IF EXISTS `workerMedia`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerMedia` AS SELECT
1 AS `workerFk`,
1 AS `mediaValue`*/;
@@ -29783,7 +29848,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workerTeam`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTeam` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`team` int(11) NOT NULL,
@@ -29792,17 +29857,17 @@ CREATE TABLE `workerTeam` (
KEY `user_idx` (`workerFk`),
KEY `team_idx` (`team`),
CONSTRAINT `user_team` FOREIGN KEY (`workerFk`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=261 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerTeamCollegues`
+-- Temporary table structure for view `workerTeamCollegues`
--
DROP TABLE IF EXISTS `workerTeamCollegues`;
/*!50001 DROP VIEW IF EXISTS `workerTeamCollegues`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerTeamCollegues` AS SELECT
1 AS `workerFk`,
1 AS `collegueFk`*/;
@@ -29814,7 +29879,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workerTimeControl`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControl` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userFk` int(10) unsigned NOT NULL,
@@ -29828,7 +29893,7 @@ CREATE TABLE `workerTimeControl` (
KEY `warehouseFkfk1_idx` (`warehouseFk`),
CONSTRAINT `warehouseFk_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE,
CONSTRAINT `workerTimeControl_fk1` FOREIGN KEY (`userFk`) REFERENCES `account`.`user` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=8313026 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29837,7 +29902,7 @@ CREATE TABLE `workerTimeControl` (
DROP TABLE IF EXISTS `workerTimeControlConfig`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControlConfig` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`warehouseFk` smallint(6) unsigned NOT NULL,
@@ -29845,7 +29910,7 @@ CREATE TABLE `workerTimeControlConfig` (
PRIMARY KEY (`id`),
KEY `warehouseFk_1_idx` (`warehouseFk`),
CONSTRAINT `warehouseFk_2` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29854,7 +29919,7 @@ CREATE TABLE `workerTimeControlConfig` (
DROP TABLE IF EXISTS `workerTimeControlLog`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControlLog` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`userFk` int(10) NOT NULL,
@@ -29870,7 +29935,7 @@ CREATE TABLE `workerTimeControlLog` (
DROP TABLE IF EXISTS `workerTimeControlParams`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControlParams` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`dayBreak` int(11) NOT NULL,
@@ -29879,7 +29944,7 @@ CREATE TABLE `workerTimeControlParams` (
`dayWorkMax` int(11) NOT NULL,
`dayStayMax` int(11) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='All values in seconds';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='All values in seconds';
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -29888,7 +29953,7 @@ CREATE TABLE `workerTimeControlParams` (
DROP TABLE IF EXISTS `workerTimeControlPin`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControlPin` (
`workerFk` int(11) NOT NULL,
`pin` varchar(255) COLLATE utf8_unicode_ci NOT NULL,
@@ -29903,23 +29968,23 @@ CREATE TABLE `workerTimeControlPin` (
DROP TABLE IF EXISTS `workerTimeControlSchedule`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workerTimeControlSchedule` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`time` time DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `punique_trhf` (`time`)
-) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
--- Temporary view structure for view `workerTimeControlUserInfo`
+-- Temporary table structure for view `workerTimeControlUserInfo`
--
DROP TABLE IF EXISTS `workerTimeControlUserInfo`;
/*!50001 DROP VIEW IF EXISTS `workerTimeControlUserInfo`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerTimeControlUserInfo` AS SELECT
1 AS `userFk`,
1 AS `name`,
@@ -29932,13 +29997,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `workerTimeControlWorking`
+-- Temporary table structure for view `workerTimeControlWorking`
--
DROP TABLE IF EXISTS `workerTimeControlWorking`;
/*!50001 DROP VIEW IF EXISTS `workerTimeControlWorking`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerTimeControlWorking` AS SELECT
1 AS `userFk`,
1 AS `timed`,
@@ -29952,13 +30017,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `workerTimeControl_Journey`
+-- Temporary table structure for view `workerTimeControl_Journey`
--
DROP TABLE IF EXISTS `workerTimeControl_Journey`;
/*!50001 DROP VIEW IF EXISTS `workerTimeControl_Journey`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerTimeControl_Journey` AS SELECT
1 AS `userFk`,
1 AS `dated`,
@@ -29969,13 +30034,13 @@ SET @saved_cs_client = @@character_set_client;
SET character_set_client = @saved_cs_client;
--
--- Temporary view structure for view `workerTimeJourneyNG`
+-- Temporary table structure for view `workerTimeJourneyNG`
--
DROP TABLE IF EXISTS `workerTimeJourneyNG`;
/*!50001 DROP VIEW IF EXISTS `workerTimeJourneyNG`*/;
SET @saved_cs_client = @@character_set_client;
-/*!50503 SET character_set_client = utf8mb4 */;
+SET character_set_client = utf8;
/*!50001 CREATE VIEW `workerTimeJourneyNG` AS SELECT
1 AS `userFk`,
1 AS `dated`,
@@ -29991,7 +30056,7 @@ SET character_set_client = @saved_cs_client;
DROP TABLE IF EXISTS `workers20190711`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711` (
`person_id` int(11) NOT NULL DEFAULT '0',
`business_id` int(11) NOT NULL DEFAULT '0',
@@ -30016,7 +30081,7 @@ CREATE TABLE `workers20190711` (
DROP TABLE IF EXISTS `workers20190711_FichadasAbril`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711_FichadasAbril` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL DEFAULT '0',
@@ -30029,7 +30094,7 @@ CREATE TABLE `workers20190711_FichadasAbril` (
`sumable` double DEFAULT NULL,
`jornada` decimal(5,2) NOT NULL DEFAULT '8.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=8171 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30038,7 +30103,7 @@ CREATE TABLE `workers20190711_FichadasAbril` (
DROP TABLE IF EXISTS `workers20190711_FichadasJulio11`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711_FichadasJulio11` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL DEFAULT '0',
@@ -30051,7 +30116,7 @@ CREATE TABLE `workers20190711_FichadasJulio11` (
`sumable` double DEFAULT NULL,
`jornada` decimal(5,2) NOT NULL DEFAULT '8.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=328 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30060,7 +30125,7 @@ CREATE TABLE `workers20190711_FichadasJulio11` (
DROP TABLE IF EXISTS `workers20190711_FichadasJunio`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711_FichadasJunio` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL DEFAULT '0',
@@ -30073,7 +30138,7 @@ CREATE TABLE `workers20190711_FichadasJunio` (
`sumable` double DEFAULT NULL,
`jornada` decimal(5,2) NOT NULL DEFAULT '8.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=6936 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30082,7 +30147,7 @@ CREATE TABLE `workers20190711_FichadasJunio` (
DROP TABLE IF EXISTS `workers20190711_FichadasMayo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711_FichadasMayo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL DEFAULT '0',
@@ -30095,7 +30160,7 @@ CREATE TABLE `workers20190711_FichadasMayo` (
`sumable` double DEFAULT NULL,
`jornada` decimal(5,2) NOT NULL DEFAULT '8.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7855 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30104,7 +30169,7 @@ CREATE TABLE `workers20190711_FichadasMayo` (
DROP TABLE IF EXISTS `workers20190711_FichadasOctubre`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workers20190711_FichadasOctubre` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`person_id` int(11) NOT NULL DEFAULT '0',
@@ -30117,7 +30182,7 @@ CREATE TABLE `workers20190711_FichadasOctubre` (
`sumable` double DEFAULT NULL,
`jornada` decimal(5,2) NOT NULL DEFAULT '8.00',
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=7419 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30126,7 +30191,7 @@ CREATE TABLE `workers20190711_FichadasOctubre` (
DROP TABLE IF EXISTS `workingHours`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `workingHours` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`timeIn` datetime NOT NULL,
@@ -30135,7 +30200,7 @@ CREATE TABLE `workingHours` (
PRIMARY KEY (`id`),
KEY `user_working_hour_idx` (`userId`),
CONSTRAINT `user_working_hour` FOREIGN KEY (`userId`) REFERENCES `account`.`user` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=23782 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena horas de Entrada y de Salida del personal';
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena horas de Entrada y de Salida del personal';
/*!40101 SET character_set_client = @saved_cs_client */;
ALTER DATABASE `vn` CHARACTER SET utf8 COLLATE utf8_general_ci ;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
@@ -30166,7 +30231,7 @@ ALTER DATABASE `vn` CHARACTER SET utf8 COLLATE utf8_unicode_ci ;
DROP TABLE IF EXISTS `zone`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zone` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(45) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
@@ -30184,7 +30249,7 @@ CREATE TABLE `zone` (
KEY `zone_name_idx` (`name`),
CONSTRAINT `fk_zone_1` FOREIGN KEY (`warehouseFk`) REFERENCES `warehouse` (`id`) ON DELETE NO ACTION ON UPDATE CASCADE,
CONSTRAINT `fk_zone_2` FOREIGN KEY (`agencyModeFk`) REFERENCES `agencyMode` (`id`) ON DELETE NO ACTION ON UPDATE NO ACTION
-) ENGINE=InnoDB AUTO_INCREMENT=491 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30193,7 +30258,7 @@ CREATE TABLE `zone` (
DROP TABLE IF EXISTS `zoneCalendar`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zoneCalendar` (
`zoneFk` int(11) NOT NULL,
`delivered` date NOT NULL,
@@ -30210,7 +30275,7 @@ CREATE TABLE `zoneCalendar` (
DROP TABLE IF EXISTS `zoneGeo`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zoneGeo` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`type` set('country','province','town','postCode') CHARACTER SET utf8 NOT NULL,
@@ -30226,7 +30291,7 @@ CREATE TABLE `zoneGeo` (
KEY `name_idx` (`name`),
KEY `parentFk` (`parentFk`),
KEY `path` (`path`)
-) ENGINE=InnoDB AUTO_INCREMENT=597479 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -30275,12 +30340,12 @@ DELIMITER ;
DROP TABLE IF EXISTS `zoneGeoRecalc`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zoneGeoRecalc` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`isChanged` tinyint(4) NOT NULL,
PRIMARY KEY (`id`)
-) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -30289,7 +30354,7 @@ CREATE TABLE `zoneGeoRecalc` (
DROP TABLE IF EXISTS `zoneIncluded`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `zoneIncluded` (
`zoneFk` int(11) NOT NULL,
`geoFk` int(11) NOT NULL,
@@ -30361,90 +30426,90 @@ DELIMITER ;;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;;
/*!50003 SET @saved_time_zone = @@time_zone */ ;;
/*!50003 SET time_zone = 'SYSTEM' */ ;;
-/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2019-11-08 00:00:00' ON COMPLETION PRESERVE ENABLE COMMENT 'Notifica en caso de que el servidor de impresión este parado' DO BEGIN
-
- DECLARE vCurrentCount INT;
- DECLARE vCheckSum INT;
- DECLARE vIsAlreadyNotified BOOLEAN;
- DECLARE vTableQueue TEXT;
- DECLARE vLineQueue TEXT;
- DECLARE vDone BOOL DEFAULT FALSE;
- DECLARE vCur CURSOR FOR
- SELECT CONCAT('
- ', IFNULL(pq.id, ''), ' |
- ', IFNULL(p.path, ''),' |
- ', IFNULL(i.Informe, ''),' |
- ', IFNULL(e.Estado, ''),' |
- ', IFNULL(w.firstname, ''), " ", IFNULL(w.lastName, ''),' |
- ', IFNULL(pq.`error`, ''),' |
-
')
- FROM vn.printingQueue pq
- LEFT JOIN vn.worker w ON w.id = pq.worker
- LEFT JOIN vn.printer p ON p.id = pq.printer
- LEFT JOIN vn2008.Informes i ON i.Id_Informe = pq.report
- JOIN vn2008.Estados e ON e.Id_Estado = pq.state
- LIMIT 30;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND
- SET vDone = TRUE;
-
- SELECT COUNT(*), IFNULL(SUM(id),0) INTO vCurrentCount, vCheckSum
- FROM vn.printingQueue WHERE state = 1;
-
- SELECT isAlreadyNotified INTO vIsAlreadyNotified
- FROM printingQueueCheck;
-
- IF (SELECT lastCount FROM printingQueueCheck) = vCurrentCount AND
- (SELECT lastCheckSum FROM printingQueueCheck) = vCheckSum AND
- vIsAlreadyNotified = FALSE AND vCurrentCount > 0
- THEN
-
- SELECT '
-
- Id Cola |
- Ruta Impresora |
- Informe |
- Estado |
- Trabajador |
- Error |
-
' INTO vTableQueue;
-
- OPEN vCur;
-
- l: LOOP
-
- SET vDone = FALSE;
-
- FETCH vCur INTO vLineQueue;
-
- IF vDone THEN
- LEAVE l;
- END IF;
-
- SELECT CONCAT(vTableQueue, vLineQueue) INTO vTableQueue;
-
- END LOOP;
-
- CLOSE vCur;
-
- INSERT INTO vn2008.mail (`to`, subject, text)
- VALUES ('cau@verdnatura.es',
- 'servidor de impresion parado',
- CONCAT('Hay ', vCurrentCount, ' lineas bloqueadas', vTableQueue, '
'));
-
- UPDATE printingQueueCheck SET isAlreadyNotified = TRUE;
- END IF;
-
- IF (SELECT lastCount FROM printingQueueCheck) > vCurrentCount AND
- vIsAlreadyNotified = TRUE
- THEN
- UPDATE printingQueueCheck SET isAlreadyNotified = FALSE;
- END IF;
-
- UPDATE printingQueueCheck
- SET lastCount = vCurrentCount,
- lastCheckSum = vCheckSum;
-
+/*!50106 CREATE*/ /*!50117 DEFINER=`root`@`%`*/ /*!50106 EVENT `printQueue_check` ON SCHEDULE EVERY 10 MINUTE STARTS '2019-11-08 00:00:00' ON COMPLETION PRESERVE ENABLE COMMENT 'Notifica en caso de que el servidor de impresión este parado' DO BEGIN
+
+ DECLARE vCurrentCount INT;
+ DECLARE vCheckSum INT;
+ DECLARE vIsAlreadyNotified BOOLEAN;
+ DECLARE vTableQueue TEXT;
+ DECLARE vLineQueue TEXT;
+ DECLARE vDone BOOL DEFAULT FALSE;
+ DECLARE vCur CURSOR FOR
+ SELECT CONCAT('
+ ', IFNULL(pq.id, ''), ' |
+ ', IFNULL(p.path, ''),' |
+ ', IFNULL(i.Informe, ''),' |
+ ', IFNULL(e.Estado, ''),' |
+ ', IFNULL(w.firstname, ''), " ", IFNULL(w.lastName, ''),' |
+ ', IFNULL(pq.`error`, ''),' |
+
')
+ FROM vn.printingQueue pq
+ LEFT JOIN vn.worker w ON w.id = pq.worker
+ LEFT JOIN vn.printer p ON p.id = pq.printer
+ LEFT JOIN vn2008.Informes i ON i.Id_Informe = pq.report
+ JOIN vn2008.Estados e ON e.Id_Estado = pq.state
+ LIMIT 30;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND
+ SET vDone = TRUE;
+
+ SELECT COUNT(*), IFNULL(SUM(id),0) INTO vCurrentCount, vCheckSum
+ FROM vn.printingQueue WHERE state = 1;
+
+ SELECT isAlreadyNotified INTO vIsAlreadyNotified
+ FROM printingQueueCheck;
+
+ IF (SELECT lastCount FROM printingQueueCheck) = vCurrentCount AND
+ (SELECT lastCheckSum FROM printingQueueCheck) = vCheckSum AND
+ vIsAlreadyNotified = FALSE AND vCurrentCount > 0
+ THEN
+
+ SELECT '
+
+ Id Cola |
+ Ruta Impresora |
+ Informe |
+ Estado |
+ Trabajador |
+ Error |
+
' INTO vTableQueue;
+
+ OPEN vCur;
+
+ l: LOOP
+
+ SET vDone = FALSE;
+
+ FETCH vCur INTO vLineQueue;
+
+ IF vDone THEN
+ LEAVE l;
+ END IF;
+
+ SELECT CONCAT(vTableQueue, vLineQueue) INTO vTableQueue;
+
+ END LOOP;
+
+ CLOSE vCur;
+
+ INSERT INTO vn2008.mail (`to`, subject, text)
+ VALUES ('cau@verdnatura.es',
+ 'servidor de impresion parado',
+ CONCAT('Hay ', vCurrentCount, ' lineas bloqueadas', vTableQueue, '
'));
+
+ UPDATE printingQueueCheck SET isAlreadyNotified = TRUE;
+ END IF;
+
+ IF (SELECT lastCount FROM printingQueueCheck) > vCurrentCount AND
+ vIsAlreadyNotified = TRUE
+ THEN
+ UPDATE printingQueueCheck SET isAlreadyNotified = FALSE;
+ END IF;
+
+ UPDATE printingQueueCheck
+ SET lastCount = vCurrentCount,
+ lastCheckSum = vCheckSum;
+
END */ ;;
/*!50003 SET time_zone = @saved_time_zone */ ;;
/*!50003 SET sql_mode = @saved_sql_mode */ ;;
@@ -30613,84 +30678,101 @@ DELIMITER ;
/*!50003 SET character_set_client = @saved_cs_client */ ;
/*!50003 SET character_set_results = @saved_cs_results */ ;
/*!50003 SET collation_connection = @saved_col_connection */ ;
-/*!50003 DROP FUNCTION IF EXISTS `bionicCalcReverse` */;
+/*!50003 DROP FUNCTION IF EXISTS `bionicCalcReverse__` */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
/*!50003 SET @saved_col_connection = @@collation_connection */ ;
-/*!50003 SET character_set_client = utf8mb4 */ ;
-/*!50003 SET character_set_results = utf8mb4 */ ;
-/*!50003 SET collation_connection = utf8mb4_general_ci */ ;
+/*!50003 SET character_set_client = utf8 */ ;
+/*!50003 SET character_set_results = utf8 */ ;
+/*!50003 SET collation_connection = utf8_general_ci */ ;
/*!50003 SET @saved_sql_mode = @@sql_mode */ ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
-CREATE DEFINER=`root`@`%` FUNCTION `bionicCalcReverse`(vWarehouse INT,
+CREATE DEFINER=`root`@`%` FUNCTION `bionicCalcReverse__`(vWarehouse INT,
vMargin DECIMAL(10,3),
vRetailedPrice DECIMAL(10,3),
vM3 DECIMAL(10,3),
- vConsigna INT,
- vAgencia INT) RETURNS decimal(10,3)
+ vAddress INT,
+ vAgencyMode INT) RETURNS decimal(10,3)
DETERMINISTIC
BEGIN
- -- BERNAT: WORKING IN THIS FILE
- DECLARE COEFICIENTE_DE_INFLACION_GENERAL INT DEFAULT 1.3;
- DECLARE DENSIDAD_MINIMA_PESO_VOLUMETRICO INT DEFAULT 167;
- DECLARE VOLUMEN_CAJA_VERDNATURA BIGINT DEFAULT 138000;
- DECLARE vCustomer INT;
- DECLARE vComponentRecovery INT DEFAULT 17;
- DECLARE vComponentMana INT DEFAULT 39;
- DECLARE vComponentPort INT DEFAULT 15;
- DECLARE vComponentMargin INT DEFAULT 29;
- DECLARE vComponentCost INT DEFAULT 28;
- DECLARE vCost DECIMAL(10,2);
+ DECLARE vGeneralInflationCoeficient INT;
+ DECLARE vVerdnaturaVolumeBox BIGINT;
+ DECLARE vClientFk INT;
+ DECLARE vComponentRecovery VARCHAR(50) DEFAULT 'debtCollection';
+ DECLARE vComponentMana VARCHAR(50) DEFAULT 'autoMana';
+ DECLARE vComponentPort VARCHAR(50) DEFAULT 'delivery';
+ DECLARE vComponentMargin VARCHAR(50) DEFAULT 'margin';
+ DECLARE vComponentCost VARCHAR(50) DEFAULT 'purchaseValue';
+ DECLARE vComponentCostValue DECIMAL(10,2);
DECLARE vItem INT DEFAULT 98;
+ DECLARE vItemCarryBox INT;
+
+ SELECT generalInflationCoeFicient, verdnaturaVolumeBox, itemCarryBox
+ INTO vGeneralInflationCoeficient, vVerdnaturaVolumeBox, vItemCarryBox
+ FROM bionicConfig;
- SELECT clientFk INTO vCustomer FROM address WHERE id = vConsigna;
+ SELECT clientFk INTO vClientFk FROM address WHERE id = vAddress;
+
+ -- Creamos la tabla tmp.bionicComponent
+ DROP TEMPORARY TABLE IF EXISTS tmp.bionicComponent;
+ CREATE TEMPORARY TABLE tmp.bionicComponent(
+ `warehouseFk` smallint(5) unsigned NOT NULL,
+ `itemFk` int(11) NOT NULL,
+ `componentFk` int(10) unsigned NOT NULL,
+ `value` decimal(10,4) NOT NULL,
+ UNIQUE KEY `itemWarehouseComponent` (`itemFk`,`warehouseFk`,`componentFk`) USING HASH,
+ KEY `itemWarehouse` (`itemFk`,`warehouseFk`) USING BTREE
+ ) ENGINE=MEMORY DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+
+ -- Margin
+ INSERT INTO tmp.bionicComponent (warehouseFk, itemFk, componentFk, `value`)
+ SELECT vWarehouse, vItem, id, vMargin
+ FROM component
+ WHERE code = vComponentMargin;
- -- Creamos la tabla tmp.bionic_component
- DROP TEMPORARY TABLE IF EXISTS tmp.bionic_component;
- CREATE TEMPORARY TABLE tmp.bionic_component LIKE
- vn2008.template_bionic_component;
-
- -- Margen
- INSERT INTO tmp.bionic_component (warehouse_id, item_id, component_id, cost)
- SELECT vWarehouse, vItem, vComponentMargin, vMargin;
-
-- Recobro
- INSERT INTO tmp.bionic_component (warehouse_id, item_id, component_id, cost)
- SELECT vWarehouse, vItem, vComponentRecovery, ROUND(LEAST(recobro,0.25), 3)
- FROM bi.claims_ratio
- WHERE Id_Cliente = vCustomer AND recobro > 0.009;
+ INSERT INTO tmp.bionicComponent (warehouseFk, itemFk, componentFk, `value`)
+ SELECT vWarehouse, vItem, c.id, ROUND(LEAST(cr.recobro,0.25), 3)
+ FROM bi.claims_ratio cr
+ JOIN component c ON c.code = vComponentRecovery
+ WHERE cr.Id_Cliente = vClientFk AND cr.recobro > 0.009;
-- Componente de maná automático, en función del maná acumulado por el comercial.
- INSERT INTO tmp.bionic_component (warehouse_id, item_id, component_id, cost)
- SELECT vWarehouse, vItem, vComponentMana, ROUND(prices_modifier_rate, 3)
+ INSERT INTO tmp.bionicComponent (warehouseFk, itemFk, componentFk, `value`)
+ SELECT vWarehouse, vItem, co.id, ROUND(ms.prices_modifier_rate, 3)
FROM client c
- JOIN bs.mana_spellers ms ON c.salesPersonFk = ms.Id_Trabajador
- WHERE ms.prices_modifier_activated AND c.id = vCustomer LIMIT 1;
+ JOIN bs.mana_spellers ms ON c.salesPersonFk = ms.Id_Trabajador
+ JOIN component co ON co.code = vComponentMana
+ WHERE ms.prices_modifier_activated AND c.id = vClientFk LIMIT 1;
-- Reparto
- INSERT INTO tmp.bionic_component (warehouse_id, item_id, component_id, cost)
- SELECT vWarehouse, vItem, vComponentPort, COEFICIENTE_DE_INFLACION_GENERAL
+ INSERT INTO tmp.bionicComponent (warehouseFk, itemFk, componentFk, `value`)
+ SELECT vWarehouse, vItem, co.id, vGeneralInflationCoeficient
* ROUND(
- vM3
- * az.price
- * az.inflation
- / VOLUMEN_CAJA_VERDNATURA, 4
+ vM3
+ * az.price
+ * az.inflation
+ / vVerdnaturaVolumeBox, 4
)
FROM agencyMode ag
- JOIN address a ON a.id = vConsigna AND ag.id = vAgencia
- JOIN agencyProvince ap ON ap.agencyFk = ag.agencyFk AND ap.warehouseFk = vWarehouse AND ap.provinceFk = a.provinceFk
- JOIN agencyModeZone az ON az.agencyModeFk = vAgencia AND az.zone = ap.zone AND az.itemFk = 71 AND az.warehouseFk = vWarehouse;
+ JOIN address a ON a.id = vAddress AND ag.id = vAgencyMode
+ JOIN agencyProvince ap ON ap.agencyFk = ag.agencyFk
+ AND ap.warehouseFk = vWarehouse AND ap.provinceFk = a.provinceFk
+ JOIN agencyModeZone az ON az.agencyModeFk = vAgencyMode
+ AND az.zone = ap.zone AND az.itemFk = 71 AND az.warehouseFk = vWarehouse
+ JOIN component co ON co.code = vComponentPort;
-- Coste
- SELECT vRetailedPrice - SUM(cost) INTO vCost
- FROM tmp.bionic_component;
+ SELECT vRetailedPrice - SUM(`value`) INTO vComponentCostValue
+ FROM tmp.bionicComponent;
- INSERT INTO tmp.bionic_component (warehouse_id, item_id, component_id, cost)
- VALUES ( vWarehouse, vItem, vComponentCost,vCost);
+ INSERT INTO tmp.bionicComponent (warehouseFk, itemFk, componentFk, `value`)
+ SELECT vWarehouse, vItem, id,vComponentCostValue
+ FROM component
+ WHERE code = vComponentCost;
- RETURN vCost;
-
+ RETURN vComponentCostValue;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -35269,27 +35351,27 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clean__`()
-BEGIN
- DECLARE vDateShort DATETIME;
- DECLARE oneYearAgo DATE;
- DECLARE twoYearsAgo DATE;
- DECLARE fourYearsAgo DATE;
-
- SET vDateShort = TIMESTAMPADD(MONTH, -2, CURDATE());
- SET oneYearAgo = TIMESTAMPADD(YEAR,-1,CURDATE());
- SET twoYearsAgo = TIMESTAMPADD(YEAR,-2,CURDATE());
- SET fourYearsAgo = TIMESTAMPADD(YEAR,-4,CURDATE());
-
- DELETE FROM vn.message WHERE sendDate < vDateShort;
- DELETE FROM vn.messageInbox WHERE sendDate < vDateShort;
- DELETE FROM vn.messageInbox WHERE sendDate < vDateShort;
- DELETE FROM vn.workerTimeControl WHERE timed < fourYearsAgo;
- DELETE FROM vn.itemShelving WHERE created < CURDATE() AND visible = 0;
- DELETE FROM vn.ticketDown WHERE created < TIMESTAMPADD(DAY,-1,CURDATE());
- CALL shelving_clean;
-
+BEGIN
+ DECLARE vDateShort DATETIME;
+ DECLARE oneYearAgo DATE;
+ DECLARE twoYearsAgo DATE;
+ DECLARE fourYearsAgo DATE;
+
+ SET vDateShort = TIMESTAMPADD(MONTH, -2, CURDATE());
+ SET oneYearAgo = TIMESTAMPADD(YEAR,-1,CURDATE());
+ SET twoYearsAgo = TIMESTAMPADD(YEAR,-2,CURDATE());
+ SET fourYearsAgo = TIMESTAMPADD(YEAR,-4,CURDATE());
+
+ DELETE FROM vn.message WHERE sendDate < vDateShort;
+ DELETE FROM vn.messageInbox WHERE sendDate < vDateShort;
+ DELETE FROM vn.messageInbox WHERE sendDate < vDateShort;
+ DELETE FROM vn.workerTimeControl WHERE timed < fourYearsAgo;
+ DELETE FROM vn.itemShelving WHERE created < CURDATE() AND visible = 0;
+ DELETE FROM vn.ticketDown WHERE created < TIMESTAMPADD(DAY,-1,CURDATE());
+ CALL shelving_clean;
+
CALL vn.ticketPackagingRecovery;
-
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -36089,54 +36171,54 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clientRemoveWorker`()
-BEGIN
- DECLARE done BOOL DEFAULT FALSE;
- DECLARE vClientFk INT;
-
- DECLARE rs CURSOR FOR
- SELECT c.clientFk
- FROM tmp.clientGetDebt c
- LEFT JOIN tmp.risk r ON r.clientFk = c.clientFk
- WHERE IFNULL(r.risk,0) = 0;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
-
- DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
- CREATE TEMPORARY TABLE tmp.clientGetDebt
- SELECT cd.id as clientFk
- FROM bs.clientDied cd
- LEFT JOIN vn.clientProtected cp ON cp.clientFk = cd.id
- JOIN vn.client c ON c.id = cd.id
- JOIN vn.province p ON p.id = c.provinceFk
- JOIN vn.country co ON co.id = p.countryFk
- WHERE cd.Aviso = 'TERCER AVISO'
- AND cp.clientFk IS NULL
- AND co.country NOT IN ('Portugal','Francia','España exento')
- AND c.salesPersonFk IS NOT NULL;
-
- CALL vn.clientGetDebt(curdate());
-
- DROP TEMPORARY TABLE IF EXISTS tmp.contador;
- CREATE TEMPORARY TABLE tmp.contador (id INT)
- ENGINE = MEMORY;
-
- OPEN rs;
- FETCH rs INTO vClientFk;
-
- WHILE NOT done DO
- INSERT INTO tmp.contador SET id = vClientFk;
- CALL vn.clientGreugeSpray(vClientFk, TRUE, '',TRUE);
+BEGIN
+ DECLARE done BOOL DEFAULT FALSE;
+ DECLARE vClientFk INT;
+
+ DECLARE rs CURSOR FOR
+ SELECT c.clientFk
+ FROM tmp.clientGetDebt c
+ LEFT JOIN tmp.risk r ON r.clientFk = c.clientFk
+ WHERE IFNULL(r.risk,0) = 0;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.clientGetDebt;
+ CREATE TEMPORARY TABLE tmp.clientGetDebt
+ SELECT cd.id as clientFk
+ FROM bs.clientDied cd
+ LEFT JOIN vn.clientProtected cp ON cp.clientFk = cd.id
+ JOIN vn.client c ON c.id = cd.id
+ JOIN vn.province p ON p.id = c.provinceFk
+ JOIN vn.country co ON co.id = p.countryFk
+ WHERE cd.Aviso = 'TERCER AVISO'
+ AND cp.clientFk IS NULL
+ AND co.country NOT IN ('Portugal','Francia','España exento')
+ AND c.salesPersonFk IS NOT NULL;
+
+ CALL vn.clientGetDebt(curdate());
+
+ DROP TEMPORARY TABLE IF EXISTS tmp.contador;
+ CREATE TEMPORARY TABLE tmp.contador (id INT)
+ ENGINE = MEMORY;
+
+ OPEN rs;
+ FETCH rs INTO vClientFk;
+
+ WHILE NOT done DO
+ INSERT INTO tmp.contador SET id = vClientFk;
+ CALL vn.clientGreugeSpray(vClientFk, TRUE, '',TRUE);
UPDATE vn.client SET salesPersonFk = NULL WHERE id = vClientFk;
INSERT INTO vn.clientLog (originFk, userFk, `action`, description)
VALUES (vClientFk, account.userGetId(), 'update', CONCAT('Se ha desasignado el cliente por que no ha comprado en 3 meses'));
-
+
REPLACE bs.clientNewBorn(clientFk, shipped)
- VALUES(vClientFk, CURDATE());
- FETCH rs INTO vClientFk;
- END WHILE;
-
- CLOSE rs;
+ VALUES(vClientFk, CURDATE());
+ FETCH rs INTO vClientFk;
+ END WHILE;
+
+ CLOSE rs;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -36154,176 +36236,176 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `clonTravelComplete`(IN `vTravelFk` INT, IN `vDateStart` DATE, IN `vDateEnd` DATE, IN `vRef` VARCHAR(255))
-BEGIN
- -- BERNAT: WORKING IN THIS FILE
- DECLARE vTravelNew INT;
- DECLARE vEntryNew INT;
- DECLARE vDone BIT DEFAULT 0;
- DECLARE vAuxEntryFk INT;
- DECLARE vRsEntry CURSOR FOR
- SELECT e.id
- FROM vn.entry e
- JOIN vn.travel t
- ON t.id = e.travelFk
- WHERE e.travelFk = vTravelFk;
-
- DECLARE vRsBuy CURSOR FOR
- SELECT b.*
- FROM vn.buy b
- JOIN vn.entry e
- ON b.entryFk = e.id
- WHERE e.travelFk = vTravelNew and b.entryFk=entryNew
- ORDER BY e.id;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = 1;
-
- DECLARE EXIT HANDLER FOR SQLEXCEPTION
- BEGIN
- ROLLBACK;
- RESIGNAL;
- END;
-
- START TRANSACTION;
-
- INSERT INTO vn.travel (shipped,landed, warehouseInFk, warehouseOutFk, agencyFk, ref, isDelivered, isReceived, m3, kg)
- SELECT vDateStart, vDateEnd,warehouseInFk, warehouseOutFk, agencyFk, vRef, isDelivered, isReceived, m3, kg
- FROM vn.travel
- WHERE id = vTravelFk;
-
- SET vTravelNew = LAST_INSERT_ID();
- SET vDone = 0;
- OPEN vRsEntry ;
- FETCH vRsEntry INTO vAuxEntryFk;
-
- WHILE NOT vDone DO
- INSERT INTO vn.entry (supplierFk,
- ref,
- isInventory,
- isConfirmed,
- isOrdered,
- isRaid,
- commission,
- created,
- evaNotes,
- travelFk,
- currencyFk,
- companyFk,
- gestDocFk,
- invoiceInFk)
- SELECT supplierFk,
- ref,
- isInventory,
- isConfirmed,
- isOrdered,
- isRaid,
- commission,
- created,
- evaNotes,
- vTravelNew,
- currencyFk,
- companyFk,
- gestDocFk,
- invoiceInFk
- FROM vn.entry
- WHERE id = vAuxEntryFk;
-
- SET vEntryNew = LAST_INSERT_ID();
-
- /* INSERT INTO vn.buy (
- entryFk,
- itemFk,
- amount,
- buyingValue,
- quantity,
- packageFk,
- stickers,
- freightValue,
- packageValue,
- comissionValue,
- packing,
- `grouping`,
- groupingMode,
- location,
- price1,
- price2,
- price3,
- minPrice,
- producer,
- printedStickers,
- isCkecked)
- SELECT
- vEntryNew,
- itemFk,
- amount,
- buyingValue,
- quantity,
- packageFk,
- stickers,
- freightValue,
- packageValue,
- comissionValue,
- packing,
- `grouping`,
- groupingMode,
- location,
- price1,
- price2,
- price3,
- minPrice,
- producer,
- printedStickers,
- isCkecked
- FROM buy
- WHERE entryFk = vAuxEntryFk;*/
-
- INSERT INTO vn2008.Compres (Id_Entrada,
- Id_Article,
- Cantidad,
- Costefijo,
- Id_Cubo,
- Etiquetas,
- Portefijo,
- Embalajefijo,
- Comisionfija,
- Packing,
- `grouping`,
- caja,
- Nicho,
- Tarifa1,
- Tarifa2,
- Tarifa3,
- PVP,
- Productor,
- Vida,
- punteo)
- SELECT vEntryNew,
- Id_Article,
- Cantidad,
- Costefijo,
- Id_Cubo,
- Etiquetas,
- Portefijo,
- Embalajefijo,
- Comisionfija,
- Packing,
- `grouping`,
- caja,
- Nicho,
- Tarifa1,
- Tarifa2,
- Tarifa3,
- PVP,
- Productor,
- Vida,
- punteo
- FROM vn2008.Compres
- WHERE Id_Entrada = vAuxEntryFk;
-
-
- FETCH vRsEntry INTO vAuxEntryFk;
- END WHILE;
- CLOSE vRsEntry;
- COMMIT;
+BEGIN
+ -- BERNAT: WORKING IN THIS FILE
+ DECLARE vTravelNew INT;
+ DECLARE vEntryNew INT;
+ DECLARE vDone BIT DEFAULT 0;
+ DECLARE vAuxEntryFk INT;
+ DECLARE vRsEntry CURSOR FOR
+ SELECT e.id
+ FROM vn.entry e
+ JOIN vn.travel t
+ ON t.id = e.travelFk
+ WHERE e.travelFk = vTravelFk;
+
+ DECLARE vRsBuy CURSOR FOR
+ SELECT b.*
+ FROM vn.buy b
+ JOIN vn.entry e
+ ON b.entryFk = e.id
+ WHERE e.travelFk = vTravelNew and b.entryFk=entryNew
+ ORDER BY e.id;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET vDone = 1;
+
+ DECLARE EXIT HANDLER FOR SQLEXCEPTION
+ BEGIN
+ ROLLBACK;
+ RESIGNAL;
+ END;
+
+ START TRANSACTION;
+
+ INSERT INTO vn.travel (shipped,landed, warehouseInFk, warehouseOutFk, agencyFk, ref, isDelivered, isReceived, m3, kg)
+ SELECT vDateStart, vDateEnd,warehouseInFk, warehouseOutFk, agencyFk, vRef, isDelivered, isReceived, m3, kg
+ FROM vn.travel
+ WHERE id = vTravelFk;
+
+ SET vTravelNew = LAST_INSERT_ID();
+ SET vDone = 0;
+ OPEN vRsEntry ;
+ FETCH vRsEntry INTO vAuxEntryFk;
+
+ WHILE NOT vDone DO
+ INSERT INTO vn.entry (supplierFk,
+ ref,
+ isInventory,
+ isConfirmed,
+ isOrdered,
+ isRaid,
+ commission,
+ created,
+ evaNotes,
+ travelFk,
+ currencyFk,
+ companyFk,
+ gestDocFk,
+ invoiceInFk)
+ SELECT supplierFk,
+ ref,
+ isInventory,
+ isConfirmed,
+ isOrdered,
+ isRaid,
+ commission,
+ created,
+ evaNotes,
+ vTravelNew,
+ currencyFk,
+ companyFk,
+ gestDocFk,
+ invoiceInFk
+ FROM vn.entry
+ WHERE id = vAuxEntryFk;
+
+ SET vEntryNew = LAST_INSERT_ID();
+
+ /* INSERT INTO vn.buy (
+ entryFk,
+ itemFk,
+ amount,
+ buyingValue,
+ quantity,
+ packageFk,
+ stickers,
+ freightValue,
+ packageValue,
+ comissionValue,
+ packing,
+ `grouping`,
+ groupingMode,
+ location,
+ price1,
+ price2,
+ price3,
+ minPrice,
+ producer,
+ printedStickers,
+ isCkecked)
+ SELECT
+ vEntryNew,
+ itemFk,
+ amount,
+ buyingValue,
+ quantity,
+ packageFk,
+ stickers,
+ freightValue,
+ packageValue,
+ comissionValue,
+ packing,
+ `grouping`,
+ groupingMode,
+ location,
+ price1,
+ price2,
+ price3,
+ minPrice,
+ producer,
+ printedStickers,
+ isCkecked
+ FROM buy
+ WHERE entryFk = vAuxEntryFk;*/
+
+ INSERT INTO vn2008.Compres (Id_Entrada,
+ Id_Article,
+ Cantidad,
+ Costefijo,
+ Id_Cubo,
+ Etiquetas,
+ Portefijo,
+ Embalajefijo,
+ Comisionfija,
+ Packing,
+ `grouping`,
+ caja,
+ Nicho,
+ Tarifa1,
+ Tarifa2,
+ Tarifa3,
+ PVP,
+ Productor,
+ Vida,
+ punteo)
+ SELECT vEntryNew,
+ Id_Article,
+ Cantidad,
+ Costefijo,
+ Id_Cubo,
+ Etiquetas,
+ Portefijo,
+ Embalajefijo,
+ Comisionfija,
+ Packing,
+ `grouping`,
+ caja,
+ Nicho,
+ Tarifa1,
+ Tarifa2,
+ Tarifa3,
+ PVP,
+ Productor,
+ Vida,
+ punteo
+ FROM vn2008.Compres
+ WHERE Id_Entrada = vAuxEntryFk;
+
+
+ FETCH vRsEntry INTO vAuxEntryFk;
+ END WHILE;
+ CLOSE vRsEntry;
+ COMMIT;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -37498,216 +37580,216 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `entryConverter`(IN `vEntry` INT)
-BEGIN
-
- DECLARE vWarehouseIn INT;
- DECLARE vWarehouseOut INT;
- DECLARE vTravel INT;
-
- DECLARE done BOOL DEFAULT FALSE;
-
- DECLARE vId_Entrada INT;
- DECLARE vId_Article INT;
- DECLARE vEtiquetas INT;
- DECLARE vId_Cubo VARCHAR(10);
- DECLARE vPacking INT;
- DECLARE vGrouping INT;
- DECLARE vCantidad INT;
- DECLARE vCostefijo DECIMAL(10,3);
- DECLARE vPortefijo DECIMAL(10,3);
- DECLARE vEmbalajefijo DECIMAL(10);
- DECLARE vComisionfija DECIMAL(10,3);
- DECLARE vCaja INT;
- DECLARE vNicho VARCHAR(5);
- DECLARE vTarifa1 DECIMAL(10,2);
- DECLARE vTarifa2 DECIMAL(10,2);
- DECLARE vTarifa3 DECIMAL(10,2);
- DECLARE vPVP DECIMAL(10,2);
- DECLARE vCompra INT;
-
- DECLARE rs CURSOR FOR
- SELECT
- b.Id_Entrada,
- b.Id_Article,
- b.Etiquetas,
- b.Id_Cubo,
- b.Packing,
- b.`grouping`,
- b.Cantidad,
- b.Costefijo,
- b.Portefijo,
- b.Embalajefijo,
- b.Comisionfija,
- b.caja,
- b.Nicho,
- b.Tarifa1,
- b.Tarifa2,
- b.Tarifa3,
- b.PVP
- FROM vn2008.Compres b
- JOIN vn.itemConversor ic ON ic.espItemFk = b.Id_Article
- WHERE Id_Entrada = vEntry;
-
- DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
-
- SELECT warehouseInFk, warehouseOutFk, tr.id
- INTO vWarehouseIn, vWarehouseOut, vTravel
- FROM travel tr
- JOIN entry e ON e.travelFk = tr.id
- WHERE e.id = vEntry;
-
- UPDATE travel
- SET warehouseInFk = vWarehouseOut,
- warehouseOutFk = vWarehouseIn
- WHERE id = vTravel;
-
- UPDATE vn2008.Compres c
- LEFT JOIN vn.itemConversor ic ON ic.espItemFk = c.Id_Article
- SET Etiquetas = 0, Cantidad = 0
- WHERE c.Id_Entrada = vEntry
- AND ic.espItemFk IS NULL;
-
- OPEN rs;
-
- DELETE FROM vn2008.Compres WHERE Id_Entrada = vEntry;
-
- FETCH rs INTO
- vId_Entrada,
- vId_Article,
- vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP;
-
- WHILE NOT done DO
-
- -- Primero la linea original con las cantidades invertidas
- INSERT INTO vn2008.Compres
- (
- Id_Entrada,
- Id_Article,
- Etiquetas,
- Id_Cubo,
- Packing,
- `grouping`,
- Cantidad,
- Costefijo,
- Portefijo,
- Embalajefijo,
- Comisionfija,
- caja,
- Nicho,
- Tarifa1,
- Tarifa2,
- Tarifa3,
- PVP
- )
- VALUES
- (
- vId_Entrada,
- vId_Article,
- - vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- - vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP);
-
- -- Ahora la linea nueva, con el item genérico
- INSERT INTO vn2008.Compres
- (
- Id_Entrada,
- Id_Article,
- Etiquetas,
- Id_Cubo,
- Packing,
- `grouping`,
- Cantidad,
- Costefijo,
- Portefijo,
- Embalajefijo,
- Comisionfija,
- caja,
- Nicho,
- Tarifa1,
- Tarifa2,
- Tarifa3,
- PVP
- )
- SELECT
- vId_Entrada,
- genItemFk as Id_Article,
- vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP
- FROM itemConversor
- WHERE espItemFk = vId_Article;
-
- SELECT LAST_INSERT_ID()
- INTO vCompra;
-
- REPLACE vn2008.Compres_mark(Id_Compra,`comment`)
- SELECT vCompra, vId_Article;
-
-
- FETCH rs INTO
- vId_Entrada,
- vId_Article,
- vEtiquetas,
- vId_Cubo,
- vPacking,
- vGrouping,
- vCantidad,
- vCostefijo,
- vPortefijo,
- vEmbalajefijo,
- vComisionfija,
- vCaja,
- vNicho,
- vTarifa1,
- vTarifa2,
- vTarifa3,
- vPVP;
-
- END WHILE;
-
-
- CLOSE rs;
-
-
-
+BEGIN
+
+ DECLARE vWarehouseIn INT;
+ DECLARE vWarehouseOut INT;
+ DECLARE vTravel INT;
+
+ DECLARE done BOOL DEFAULT FALSE;
+
+ DECLARE vId_Entrada INT;
+ DECLARE vId_Article INT;
+ DECLARE vEtiquetas INT;
+ DECLARE vId_Cubo VARCHAR(10);
+ DECLARE vPacking INT;
+ DECLARE vGrouping INT;
+ DECLARE vCantidad INT;
+ DECLARE vCostefijo DECIMAL(10,3);
+ DECLARE vPortefijo DECIMAL(10,3);
+ DECLARE vEmbalajefijo DECIMAL(10);
+ DECLARE vComisionfija DECIMAL(10,3);
+ DECLARE vCaja INT;
+ DECLARE vNicho VARCHAR(5);
+ DECLARE vTarifa1 DECIMAL(10,2);
+ DECLARE vTarifa2 DECIMAL(10,2);
+ DECLARE vTarifa3 DECIMAL(10,2);
+ DECLARE vPVP DECIMAL(10,2);
+ DECLARE vCompra INT;
+
+ DECLARE rs CURSOR FOR
+ SELECT
+ b.Id_Entrada,
+ b.Id_Article,
+ b.Etiquetas,
+ b.Id_Cubo,
+ b.Packing,
+ b.`grouping`,
+ b.Cantidad,
+ b.Costefijo,
+ b.Portefijo,
+ b.Embalajefijo,
+ b.Comisionfija,
+ b.caja,
+ b.Nicho,
+ b.Tarifa1,
+ b.Tarifa2,
+ b.Tarifa3,
+ b.PVP
+ FROM vn2008.Compres b
+ JOIN vn.itemConversor ic ON ic.espItemFk = b.Id_Article
+ WHERE Id_Entrada = vEntry;
+
+ DECLARE CONTINUE HANDLER FOR NOT FOUND SET done = TRUE;
+
+ SELECT warehouseInFk, warehouseOutFk, tr.id
+ INTO vWarehouseIn, vWarehouseOut, vTravel
+ FROM travel tr
+ JOIN entry e ON e.travelFk = tr.id
+ WHERE e.id = vEntry;
+
+ UPDATE travel
+ SET warehouseInFk = vWarehouseOut,
+ warehouseOutFk = vWarehouseIn
+ WHERE id = vTravel;
+
+ UPDATE vn2008.Compres c
+ LEFT JOIN vn.itemConversor ic ON ic.espItemFk = c.Id_Article
+ SET Etiquetas = 0, Cantidad = 0
+ WHERE c.Id_Entrada = vEntry
+ AND ic.espItemFk IS NULL;
+
+ OPEN rs;
+
+ DELETE FROM vn2008.Compres WHERE Id_Entrada = vEntry;
+
+ FETCH rs INTO
+ vId_Entrada,
+ vId_Article,
+ vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP;
+
+ WHILE NOT done DO
+
+ -- Primero la linea original con las cantidades invertidas
+ INSERT INTO vn2008.Compres
+ (
+ Id_Entrada,
+ Id_Article,
+ Etiquetas,
+ Id_Cubo,
+ Packing,
+ `grouping`,
+ Cantidad,
+ Costefijo,
+ Portefijo,
+ Embalajefijo,
+ Comisionfija,
+ caja,
+ Nicho,
+ Tarifa1,
+ Tarifa2,
+ Tarifa3,
+ PVP
+ )
+ VALUES
+ (
+ vId_Entrada,
+ vId_Article,
+ - vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ - vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP);
+
+ -- Ahora la linea nueva, con el item genérico
+ INSERT INTO vn2008.Compres
+ (
+ Id_Entrada,
+ Id_Article,
+ Etiquetas,
+ Id_Cubo,
+ Packing,
+ `grouping`,
+ Cantidad,
+ Costefijo,
+ Portefijo,
+ Embalajefijo,
+ Comisionfija,
+ caja,
+ Nicho,
+ Tarifa1,
+ Tarifa2,
+ Tarifa3,
+ PVP
+ )
+ SELECT
+ vId_Entrada,
+ genItemFk as Id_Article,
+ vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP
+ FROM itemConversor
+ WHERE espItemFk = vId_Article;
+
+ SELECT LAST_INSERT_ID()
+ INTO vCompra;
+
+ REPLACE vn2008.Compres_mark(Id_Compra,`comment`)
+ SELECT vCompra, vId_Article;
+
+
+ FETCH rs INTO
+ vId_Entrada,
+ vId_Article,
+ vEtiquetas,
+ vId_Cubo,
+ vPacking,
+ vGrouping,
+ vCantidad,
+ vCostefijo,
+ vPortefijo,
+ vEmbalajefijo,
+ vComisionfija,
+ vCaja,
+ vNicho,
+ vTarifa1,
+ vTarifa2,
+ vTarifa3,
+ vPVP;
+
+ END WHILE;
+
+
+ CLOSE rs;
+
+
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -37769,62 +37851,62 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `entryPrepare`(IN `idE` BIGINT)
-BEGIN
- SELECT
- b.quantity / b.packing AS Paquetes,
- b.packing AS `Grouping`,
- barcode,
- 'ASEGURADO' AS asegurado,
- ic.name,
- ic.order,
- s.name AS Consignatario,
- e.supplierFk AS Id_Cliente,
- e.isOrdered,
- e.isConfirmed,
- 10 AS Calidad,
- LPAD(IFNULL(cpd.id, ip.code),
- 5,
- '0') AS path,
- b.entryFk AS Id_Ticket,
- t.landed AS Fecha,
- b.itemFk,
- b.quantity,
- i.name AS Concepte,
- i.size,
- i.inkFk,
- i.category,
- o.code AS Origen,
- 0 AS Bultos,
- wIn.`name` AS Tipo,
- 0 AS OK,
- 0 AS Reservado,
- i.stems,
- b.id AS Id_Movimiento,
- ip.code,
- 'PEDIDO ASEGURADO' AS MSG,
- 0 AS Seguro,
- i.image,
- pr.name AS producer
- FROM vn.buy b
- JOIN vn.entry e ON b.entryFk = e.id
- JOIN vn.travel t ON t.id = e.travelFk
- JOIN vn.warehouse wIn ON wIn.id = t.warehouseInFk
- JOIN vn.warehouse wOut ON wOut.id = t.warehouseOutFk
- JOIN vn.item i ON i.id = b.itemFk
- JOIN vn.itemType it ON it.id =i.typeFk
- JOIN vn.itemCategory ic ON ic.id = it.categoryFk
- JOIN vn.packaging pkg ON pkg.id = b.packageFk
- LEFT JOIN vn.itemPlacement ip ON i.id = ip.itemFk AND ip.warehouseFk = wIn.id AND ip.warehouseFk = t.warehouseOutFk
- LEFT JOIN (SELECT itemFk, code AS barcode FROM vn.itemBarcode GROUP BY itemFk) ib ON ib.itemFk = b.itemFk
- LEFT JOIN vn.origin o ON o.id = i.originFk
- LEFT JOIN vn.supplier s ON s.id = e.supplierFk
- LEFT JOIN vn.producer pr on pr.id = i.producerFk
- LEFT JOIN vn.coolerPathDetail cpd ON LEFT(ip.code, 3) = cpd.hallway
- WHERE
- NOT wIn.isFeedStock AND NOT e.isInventory AND NOT e.isRaid
- AND e.id = 158772
- AND i.typeFk IS NOT NULL
- AND ic.merchandise IS NOT FALSE;
+BEGIN
+ SELECT
+ b.quantity / b.packing AS Paquetes,
+ b.packing AS `Grouping`,
+ barcode,
+ 'ASEGURADO' AS asegurado,
+ ic.name,
+ ic.order,
+ s.name AS Consignatario,
+ e.supplierFk AS Id_Cliente,
+ e.isOrdered,
+ e.isConfirmed,
+ 10 AS Calidad,
+ LPAD(IFNULL(cpd.id, ip.code),
+ 5,
+ '0') AS path,
+ b.entryFk AS Id_Ticket,
+ t.landed AS Fecha,
+ b.itemFk,
+ b.quantity,
+ i.name AS Concepte,
+ i.size,
+ i.inkFk,
+ i.category,
+ o.code AS Origen,
+ 0 AS Bultos,
+ wIn.`name` AS Tipo,
+ 0 AS OK,
+ 0 AS Reservado,
+ i.stems,
+ b.id AS Id_Movimiento,
+ ip.code,
+ 'PEDIDO ASEGURADO' AS MSG,
+ 0 AS Seguro,
+ i.image,
+ pr.name AS producer
+ FROM vn.buy b
+ JOIN vn.entry e ON b.entryFk = e.id
+ JOIN vn.travel t ON t.id = e.travelFk
+ JOIN vn.warehouse wIn ON wIn.id = t.warehouseInFk
+ JOIN vn.warehouse wOut ON wOut.id = t.warehouseOutFk
+ JOIN vn.item i ON i.id = b.itemFk
+ JOIN vn.itemType it ON it.id =i.typeFk
+ JOIN vn.itemCategory ic ON ic.id = it.categoryFk
+ JOIN vn.packaging pkg ON pkg.id = b.packageFk
+ LEFT JOIN vn.itemPlacement ip ON i.id = ip.itemFk AND ip.warehouseFk = wIn.id AND ip.warehouseFk = t.warehouseOutFk
+ LEFT JOIN (SELECT itemFk, code AS barcode FROM vn.itemBarcode GROUP BY itemFk) ib ON ib.itemFk = b.itemFk
+ LEFT JOIN vn.origin o ON o.id = i.originFk
+ LEFT JOIN vn.supplier s ON s.id = e.supplierFk
+ LEFT JOIN vn.producer pr on pr.id = i.producerFk
+ LEFT JOIN vn.coolerPathDetail cpd ON LEFT(ip.code, 3) = cpd.hallway
+ WHERE
+ NOT wIn.isFeedStock AND NOT e.isInventory AND NOT e.isRaid
+ AND e.id = 158772
+ AND i.typeFk IS NOT NULL
+ AND ic.merchandise IS NOT FALSE;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -41502,38 +41584,38 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `itemLastEntries`(IN `vItem` INT, IN `vDays` DATE)
-BEGIN
- SELECT
- w.id AS warehouseFk,
- w.name AS warehouse,
- tr.landed,
- b.entryFk,
- b.isIgnored,
- b.price2,
- b.price3,
- b.stickers,
- b.packing,
- b.`grouping`,
- b.groupingMode,
- i.stems,
- b.quantity,
- b.buyingValue,
- b.packageFk ,
- s.id AS supplierFk,
- s.name AS supplier
- FROM itemType it
- RIGHT JOIN (entry e
- LEFT JOIN supplier s ON s.id = e.supplierFk
- RIGHT JOIN buy b ON b.entryFk = e.id
- LEFT JOIN item i ON i.id = b.itemFk
- LEFT JOIN ink ON ink.id = i.inkFk
- LEFT JOIN travel tr ON tr.id = e.travelFk
- LEFT JOIN warehouse w ON w.id = tr.warehouseInFk
- LEFT JOIN origin o ON o.id = i.originFk
- ) ON it.id = i.typeFk
- LEFT JOIN edi.ekt ek ON b.ektFk = ek.id
- WHERE b.itemFk = vItem And tr.shipped BETWEEN vDays AND CURDATE()
- ORDER BY tr.landed DESC , b.id DESC;
+BEGIN
+ SELECT
+ w.id AS warehouseFk,
+ w.name AS warehouse,
+ tr.landed,
+ b.entryFk,
+ b.isIgnored,
+ b.price2,
+ b.price3,
+ b.stickers,
+ b.packing,
+ b.`grouping`,
+ b.groupingMode,
+ i.stems,
+ b.quantity,
+ b.buyingValue,
+ b.packageFk ,
+ s.id AS supplierFk,
+ s.name AS supplier
+ FROM itemType it
+ RIGHT JOIN (entry e
+ LEFT JOIN supplier s ON s.id = e.supplierFk
+ RIGHT JOIN buy b ON b.entryFk = e.id
+ LEFT JOIN item i ON i.id = b.itemFk
+ LEFT JOIN ink ON ink.id = i.inkFk
+ LEFT JOIN travel tr ON tr.id = e.travelFk
+ LEFT JOIN warehouse w ON w.id = tr.warehouseInFk
+ LEFT JOIN origin o ON o.id = i.originFk
+ ) ON it.id = i.typeFk
+ LEFT JOIN edi.ekt ek ON b.ektFk = ek.id
+ WHERE b.itemFk = vItem And tr.shipped BETWEEN vDays AND CURDATE()
+ ORDER BY tr.landed DESC , b.id DESC;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -45271,77 +45353,77 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `saleItemShelvingMake`(IN `vTicketFk` INT, IN `vSectorFk` INT)
-BEGIN
-
- SET @rest:= CAST(0 AS DECIMAL(10,0));
- SET @saleFk := CAST(0 AS DECIMAL(10,0));
- SET @reserved := CAST(0 AS DECIMAL(10,0));
-
- UPDATE vn.itemShelving ish
- JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
- JOIN sale s ON s.id = sis.saleFk
- SET ish.visible = sis.quantity + ish.visible,
- ish.available = sis.quantity + ish.visible
- WHERE s.ticketFk = vTicketFk;
-
- DELETE sis.*
- FROM saleItemShelving sis
- JOIN sale s ON s.id = sis.saleFk
- WHERE s.ticketFk = vTicketFk;
-
- INSERT INTO saleItemShelving( saleFk,
- itemShelvingFk,
- quantity,
- ubication)
- SELECT saleFk,
- itemShelvingFk,
- CAST(Reserved as DECIMAL(10,0)) as Reserved,
- ubication
- FROM
- (SELECT saleFk,
- itemShelvingFk,
- ubication,
- @rest := IF(@saleFk = saleFk, @rest, quantity) as Falta,
- @reserved := IF(available < @rest, available, IF(@rest < packing,0,@rest)) as Reserved,
- @rest := @rest - @reserved,
- @saleFk := saleFk
- FROM
- ( SELECT s.id as saleFk,
- ish.created,
- ish.id as itemShelvingFk,
- ish.available,
- s.quantity,
- ish.packing,
- CONCAT(p.`column`, '-',p.`row`,': ', sh.code ) as ubication
- FROM vn.sale s
- JOIN vn.ticket t ON t.id = s.ticketFk
- JOIN vn.sector sc ON sc.warehouseFk = t.warehouseFk
- JOIN vn.parking p ON p.sectorFk = sc.id
- JOIN vn.shelving sh ON sh.parkingFk = p.id
- JOIN vn.itemShelving ish ON ish.shelvingFk = sh.code AND ish.itemFk = s.itemFk
- WHERE t.id = vTicketFk
- AND sc.id = vSectorFk
- AND s.quantity MOD ish.packing = 0
- AND s.quantity >= ish.packing
- ORDER BY s.id,
- sh.priority DESC,
- ish.packing DESC,
- ish.created
- ) sub
- ) sub2
- WHERE Reserved > 0;
-
- UPDATE vn.itemShelving ish
- JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
- JOIN vn.sale s ON s.id = sis.saleFk
- SET ish.available = ish.visible - sis.quantity,
- ish.visible = ish.visible - sis.quantity
- WHERE s.ticketFk = vTicketFk
- AND s.isPicked = FALSE;
-
- CALL vn.saleItemShelvingIsPicked(vTicketFk, TRUE);
-
-
+BEGIN
+
+ SET @rest:= CAST(0 AS DECIMAL(10,0));
+ SET @saleFk := CAST(0 AS DECIMAL(10,0));
+ SET @reserved := CAST(0 AS DECIMAL(10,0));
+
+ UPDATE vn.itemShelving ish
+ JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
+ JOIN sale s ON s.id = sis.saleFk
+ SET ish.visible = sis.quantity + ish.visible,
+ ish.available = sis.quantity + ish.visible
+ WHERE s.ticketFk = vTicketFk;
+
+ DELETE sis.*
+ FROM saleItemShelving sis
+ JOIN sale s ON s.id = sis.saleFk
+ WHERE s.ticketFk = vTicketFk;
+
+ INSERT INTO saleItemShelving( saleFk,
+ itemShelvingFk,
+ quantity,
+ ubication)
+ SELECT saleFk,
+ itemShelvingFk,
+ CAST(Reserved as DECIMAL(10,0)) as Reserved,
+ ubication
+ FROM
+ (SELECT saleFk,
+ itemShelvingFk,
+ ubication,
+ @rest := IF(@saleFk = saleFk, @rest, quantity) as Falta,
+ @reserved := IF(available < @rest, available, IF(@rest < packing,0,@rest)) as Reserved,
+ @rest := @rest - @reserved,
+ @saleFk := saleFk
+ FROM
+ ( SELECT s.id as saleFk,
+ ish.created,
+ ish.id as itemShelvingFk,
+ ish.available,
+ s.quantity,
+ ish.packing,
+ CONCAT(p.`column`, '-',p.`row`,': ', sh.code ) as ubication
+ FROM vn.sale s
+ JOIN vn.ticket t ON t.id = s.ticketFk
+ JOIN vn.sector sc ON sc.warehouseFk = t.warehouseFk
+ JOIN vn.parking p ON p.sectorFk = sc.id
+ JOIN vn.shelving sh ON sh.parkingFk = p.id
+ JOIN vn.itemShelving ish ON ish.shelvingFk = sh.code AND ish.itemFk = s.itemFk
+ WHERE t.id = vTicketFk
+ AND sc.id = vSectorFk
+ AND s.quantity MOD ish.packing = 0
+ AND s.quantity >= ish.packing
+ ORDER BY s.id,
+ sh.priority DESC,
+ ish.packing DESC,
+ ish.created
+ ) sub
+ ) sub2
+ WHERE Reserved > 0;
+
+ UPDATE vn.itemShelving ish
+ JOIN vn.saleItemShelving sis ON sis.itemShelvingFk = ish.id
+ JOIN vn.sale s ON s.id = sis.saleFk
+ SET ish.available = ish.visible - sis.quantity,
+ ish.visible = ish.visible - sis.quantity
+ WHERE s.ticketFk = vTicketFk
+ AND s.isPicked = FALSE;
+
+ CALL vn.saleItemShelvingIsPicked(vTicketFk, TRUE);
+
+
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -45833,33 +45915,33 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`%` PROCEDURE `scanTreeCreate`()
-BEGIN
- CALL nestTree(
- 'vn2008',
- 'scan',
- 'vn2008',
- 'scanTree'
- );
-
- UPDATE vn2008.scanTree st
- JOIN (
- SELECT sl.scan_id,
- MAX(sl.odbc_date) lastScanned,
- COUNT(DISTINCT t.routeFk) routeCount,
- MIN(t.routeFk) mod 1000 as minRoute,
- MAX(t.routeFk) mod 1000 as maxRoute,
- COUNT(sl.scan_line_id) as scanned
- FROM vn2008.scan_line sl
- JOIN expedition e ON e.id = sl.`code`
- JOIN ticket t ON t.id = e.ticketFk
- WHERE t.routeFk
- GROUP BY sl.scan_id
- ) rs ON rs.scan_id = st.id
- SET st.lastScanned = rs.lastScanned,
- st.routeCount = rs.routeCount,
- st.minRoute = rs.minRoute,
- st.maxRoute = IF(rs.minRoute != rs.maxRoute, rs.maxRoute,NULL),
- st.scanned = rs.scanned;
+BEGIN
+ CALL nestTree(
+ 'vn2008',
+ 'scan',
+ 'vn2008',
+ 'scanTree'
+ );
+
+ UPDATE vn2008.scanTree st
+ JOIN (
+ SELECT sl.scan_id,
+ MAX(sl.odbc_date) lastScanned,
+ COUNT(DISTINCT t.routeFk) routeCount,
+ MIN(t.routeFk) mod 1000 as minRoute,
+ MAX(t.routeFk) mod 1000 as maxRoute,
+ COUNT(sl.scan_line_id) as scanned
+ FROM vn2008.scan_line sl
+ JOIN expedition e ON e.id = sl.`code`
+ JOIN ticket t ON t.id = e.ticketFk
+ WHERE t.routeFk
+ GROUP BY sl.scan_id
+ ) rs ON rs.scan_id = st.id
+ SET st.lastScanned = rs.lastScanned,
+ st.routeCount = rs.routeCount,
+ st.minRoute = rs.minRoute,
+ st.maxRoute = IF(rs.minRoute != rs.maxRoute, rs.maxRoute,NULL),
+ st.scanned = rs.scanned;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -47104,10 +47186,9 @@ BEGIN
SELECT id itemFk FROM vn.item
WHERE typeFk = vTypeFk;
- CALL ticketCalculate(vLanded, vAddressFk, vAgencyModeFk);
+ CALL catalog_calculate(vLanded, vAddressFk, vAgencyModeFk);
DROP TEMPORARY TABLE tmp.item;
DROP TEMPORARY TABLE tmp.ticketLot;
-
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -51555,8 +51636,11 @@ DELIMITER ;
/*!50003 SET sql_mode = 'NO_ENGINE_SUBSTITUTION' */ ;
DELIMITER ;;
CREATE DEFINER=`root`@`localhost` PROCEDURE `workerDisable`(vUserId int)
-BEGIN
+mainLabel:BEGIN
+ IF vUserId = 14255 THEN
+ LEAVE mainLabel;
+ END IF;
DELETE FROM account.account
WHERE id = vUserId;
@@ -51570,8 +51654,7 @@ BEGIN
UPDATE `client` c
JOIN payMethod p ON p.name = 'CONTADO'
SET c.credit = 0, c.payMethodFk = p.id, hasCoreVnl = FALSE
- WHERE c.id = vUserId;
-
+ WHERE c.id = vUserId;
END ;;
DELIMITER ;
/*!50003 SET sql_mode = @saved_sql_mode */ ;
@@ -53908,12 +53991,12 @@ USE `vncontrol`;
DROP TABLE IF EXISTS `accion`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `accion` (
`accion_id` int(11) NOT NULL AUTO_INCREMENT,
`accion` varchar(15) COLLATE utf8_unicode_ci NOT NULL,
PRIMARY KEY (`accion_id`)
-) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
--
@@ -53922,7 +54005,7 @@ CREATE TABLE `accion` (
DROP TABLE IF EXISTS `fallo__`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `fallo__` (
`queja_id` int(10) unsigned NOT NULL,
`accion_id` int(11) NOT NULL,
@@ -53939,7 +54022,7 @@ CREATE TABLE `fallo__` (
DROP TABLE IF EXISTS `inter`;
/*!40101 SET @saved_cs_client = @@character_set_client */;
-/*!50503 SET character_set_client = utf8mb4 */;
+/*!40101 SET character_set_client = utf8 */;
CREATE TABLE `inter` (
`inter_id` int(11) NOT NULL AUTO_INCREMENT,
`state_id` tinyint(3) unsigned NOT NULL,
@@ -53959,7 +54042,7 @@ CREATE TABLE `inter` (
CONSTRAINT `inter_ibfk_1` FOREIGN KEY (`Id_Ticket`) REFERENCES `vn`.`ticket` (`id`) ON DELETE CASCADE ON UPDATE CASCADE,
CONSTRAINT `inter_state` FOREIGN KEY (`state_id`) REFERENCES `vn`.`state` (`id`) ON UPDATE CASCADE,
CONSTRAINT `responsable` FOREIGN KEY (`Id_Supervisor`) REFERENCES `vn`.`worker` (`id`) ON UPDATE CASCADE
-) ENGINE=InnoDB AUTO_INCREMENT=22162842 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
+) ENGINE=InnoDBDEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
/*!40101 SET character_set_client = @saved_cs_client */;
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
@@ -55041,6 +55124,24 @@ USE `vn`;
/*!50001 SET character_set_results = @saved_cs_results */;
/*!50001 SET collation_connection = @saved_col_connection */;
+--
+-- Final view structure for view `agencyProvince__`
+--
+
+/*!50001 DROP VIEW IF EXISTS `agencyProvince__`*/;
+/*!50001 SET @saved_cs_client = @@character_set_client */;
+/*!50001 SET @saved_cs_results = @@character_set_results */;
+/*!50001 SET @saved_col_connection = @@collation_connection */;
+/*!50001 SET character_set_client = utf8 */;
+/*!50001 SET character_set_results = utf8 */;
+/*!50001 SET collation_connection = utf8_general_ci */;
+/*!50001 CREATE ALGORITHM=UNDEFINED */
+/*!50013 DEFINER=`root`@`%` SQL SECURITY DEFINER */
+/*!50001 VIEW `agencyProvince__` AS select `a`.`province_id` AS `provinceFk`,`a`.`agency_id` AS `agencyFk`,`a`.`zona` AS `zone`,`a`.`warehouse_id` AS `warehouseFk`,`a`.`isVolumetric` AS `isVolumetric` from `vn2008`.`Agencias_province` `a` */;
+/*!50001 SET character_set_client = @saved_cs_client */;
+/*!50001 SET character_set_results = @saved_cs_results */;
+/*!50001 SET collation_connection = @saved_col_connection */;
+
--
-- Final view structure for view `annualAverageInvoiced`
--
@@ -56280,4 +56381,4 @@ USE `vncontrol`;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
--- Dump completed on 2019-12-13 8:42:46
+-- Dump completed on 2019-12-16 10:31:31
diff --git a/db/export-data.sh b/db/export-data.sh
index fd690854a..4dc57db41 100755
--- a/db/export-data.sh
+++ b/db/export-data.sh
@@ -52,8 +52,6 @@ TABLES=(
)
dump_tables ${TABLES[@]}
-
-
TABLES=(
bi
tarifa_componentes
diff --git a/db/export-structure.sh b/db/export-structure.sh
index da1d23daf..1959463ff 100755
--- a/db/export-structure.sh
+++ b/db/export-structure.sh
@@ -62,8 +62,8 @@ IGNORETABLES=(
--ignore-table=vn.payment
--ignore-table=vn.paymentExchangeInsurance
--ignore-table=vn.payrollCenter
- --ignore-table=vn.plantpassport
- --ignore-table=vn.plantpassportAuthority
+ --ignore-table=vn.plantpassport__
+ --ignore-table=vn.plantpassportAuthority__
--ignore-table=vn.preparationException
--ignore-table=vn.priceFixed__
--ignore-table=vn.printer
@@ -97,10 +97,10 @@ IGNORETABLES=(
mysqldump \
--defaults-file=config.production.ini \
--default-character-set=utf8 \
- --column-statistics=0 \
--no-data --comments \
--triggers --routines --events \
--databases \
${SCHEMAS[@]} \
${IGNORETABLES[@]} \
+ | sed 's/ AUTO_INCREMENT=[0-9]* //g' \
> dump/structure.sql
diff --git a/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js b/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js
index 0004b2156..7cc49cd90 100644
--- a/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js
+++ b/modules/client/back/methods/client/specs/activeWorkersWithRole.spec.js
@@ -7,7 +7,7 @@ describe('Client activeWorkersWithRole', () => {
let isSalesPerson = await app.models.Account.hasRole(result[0].id, 'salesPerson');
- expect(result.length).toEqual(14);
+ expect(result.length).toEqual(13);
expect(isSalesPerson).toBeTruthy();
});
@@ -17,7 +17,7 @@ describe('Client activeWorkersWithRole', () => {
let isBuyer = await app.models.Account.hasRole(result[0].id, 'buyer');
- expect(result.length).toEqual(11);
+ expect(result.length).toEqual(10);
expect(isBuyer).toBeTruthy();
});
});
diff --git a/modules/client/back/methods/client/specs/listWorkers.spec.js b/modules/client/back/methods/client/specs/listWorkers.spec.js
index 728268457..5f3836ba1 100644
--- a/modules/client/back/methods/client/specs/listWorkers.spec.js
+++ b/modules/client/back/methods/client/specs/listWorkers.spec.js
@@ -6,7 +6,7 @@ describe('Client listWorkers', () => {
.then(result => {
let amountOfEmployees = Object.keys(result).length;
- expect(amountOfEmployees).toEqual(49);
+ expect(amountOfEmployees).toEqual(48);
done();
})
.catch(done.fail);
diff --git a/print/core/filters/currency.js b/print/core/filters/currency.js
index 950749f57..ec6808906 100644
--- a/print/core/filters/currency.js
+++ b/print/core/filters/currency.js
@@ -3,6 +3,7 @@ const config = require('../config');
const defaultLocale = config.i18n.locale;
Vue.filter('currency', function(value, currency = 'EUR', locale = defaultLocale) {
+ if (!locale) locale = defaultLocale;
return new Intl.NumberFormat(locale, {
style: 'currency', currency
}).format(parseFloat(value));
diff --git a/print/core/filters/percentage.js b/print/core/filters/percentage.js
index ac18dc4b0..078d2fd89 100644
--- a/print/core/filters/percentage.js
+++ b/print/core/filters/percentage.js
@@ -3,6 +3,7 @@ const config = require('../config');
const defaultLocale = config.i18n.locale;
Vue.filter('percentage', function(value, minFraction = 2, maxFraction = 2, locale = defaultLocale) {
+ if (!locale) locale = defaultLocale;
return new Intl.NumberFormat(locale, {
style: 'percent',
minimumFractionDigits: minFraction,
diff --git a/print/templates/email/delivery-note-link/locale/pt.yml b/print/templates/email/delivery-note-link/locale/pt.yml
new file mode 100644
index 000000000..c008ea2c7
--- /dev/null
+++ b/print/templates/email/delivery-note-link/locale/pt.yml
@@ -0,0 +1,10 @@
+subject: Vossa Nota de Entrega
+title: "Esta é vossa nota de entrega!"
+dear: Estimado cliente
+description: Já está disponível sua nota de entrega correspondente a encomenda numero {0}.
+ Para ver-lo faça um clique neste link.
+copyLink: 'Como alternativa, podes copiar o siguinte link no teu navegador:'
+poll: Si o deseja, podes responder nosso questionário de satiscação para ajudar-nos a prestar-vos um melhor serviço. Tua opinião é muito importante para nós!
+help: Cualquer dúvida que surja, no hesites em consultar-la, Estamos aqui para
+ atender-te!
+conclusion: Obrigado por tua atenção!
\ No newline at end of file
diff --git a/print/templates/email/delivery-note/locale/pt.yml b/print/templates/email/delivery-note/locale/pt.yml
new file mode 100644
index 000000000..cbca170a3
--- /dev/null
+++ b/print/templates/email/delivery-note/locale/pt.yml
@@ -0,0 +1,9 @@
+subject: Vossa Nota de Entrega
+title: "Esta é vossa nota de entrega!"
+dear: Estimado cliente
+description: Já está disponível sua nota de entrega correspondente a encomenda {0}.
+ Podes descarregar-la fazendo um clique no arquivo anexado ao e-mail.
+poll: Si o deseja, podes responder nosso questionário de satiscação para ajudar-nos a prestar-vos um melhor serviço. Tua opinião é muito importante para nós!
+help: Cualquer dúvida que surja, no hesites em consultar-la, Estamos aqui para
+ atender-te!
+conclusion: Obrigado por tua atenção!
\ No newline at end of file
diff --git a/print/templates/reports/delivery-note/locale/fr.yml b/print/templates/reports/delivery-note/locale/fr.yml
index 4dc7d4ff9..820a1f589 100644
--- a/print/templates/reports/delivery-note/locale/fr.yml
+++ b/print/templates/reports/delivery-note/locale/fr.yml
@@ -1,26 +1,26 @@
-title: Albarán
-ticketId: Albarán
-clientId: Cliente
-deliveryAddress: Dirección de entrega
-fiscalData: Datos fiscales
-saleLines: Líneas de pedido
-date: Fecha
+title: Bon de livraison
+ticketId: BL
+clientId: Client
+deliveryAddress: Adresse de livraison
+fiscalData: Coordonnées
+saleLines: Lignes de la commande
+date: Date
reference: Ref.
-quantity: Cant.
-concept: Concepto
-price: PVP/u
-discount: Dto.
-vat: IVA
-amount: Importe
-type: Tipo
-taxBase: Base imp.
-tax: Tasa
-fee: Cuota
-total: Total
-subtotal: Subtotal
-taxBreakdown: Desglose impositivo
-packagings: Cubos y embalajes
-services: Servicios
-vatType: Tipo de IVA
-digitalSignature: Firma digital
-ticket: Albarán {0}
\ No newline at end of file
+quantity: Quant.
+concept: Concept
+price: PRIX/u
+discount: Remise
+vat: TVA
+amount: Montant
+type: Type
+taxBase: Base imposable
+tax: Taxe
+fee: Quote
+total: Total
+subtotal: Total partiel
+taxBreakdown: Répartition taxes
+packagings: Bacs et emballages
+services: Service
+vatType: Type de TVA
+digitalSignature: Signature numérique
+ticket: BL {0}
\ No newline at end of file
diff --git a/print/templates/reports/delivery-note/locale/pt.yml b/print/templates/reports/delivery-note/locale/pt.yml
new file mode 100644
index 000000000..29d94c0cd
--- /dev/null
+++ b/print/templates/reports/delivery-note/locale/pt.yml
@@ -0,0 +1,26 @@
+title: Nota de Entrega
+ticketId: Nota de Entrega
+clientId: Cliente
+deliveryAddress: Morada de Entrega
+fiscalData: Dados Fiscais
+saleLines: Linhas da encomenda
+date: Data
+reference: Ref.
+quantity: Qtde.
+concept: Conceito
+price: PVP/u
+discount: Dto.
+vat: IVA
+amount: Importe
+type: Tipo
+taxBase: Base imp.
+tax: Taxa
+fee: Quota
+total: Total
+subtotal: Sub-total
+taxBreakdown: Desglose impositivo
+packagings: Baldes e Embalagens
+services: Serviços
+vatType: Tipo de IVA
+digitalSignature: Assinatura digital
+ticket: Nota de Entrega {0}
\ No newline at end of file