|
|
|
@ -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=16982 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Global users';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=16998 DEFAULT 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 */ ;
|
|
|
|
@ -1923,7 +1923,7 @@ CREATE TABLE `XDiario_ALL` (
|
|
|
|
|
KEY `Cuenta` (`SUBCTA`),
|
|
|
|
|
KEY `empresa` (`empresa_id`),
|
|
|
|
|
KEY `Fecha` (`Fecha`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=15200321 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=15989092 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -1977,7 +1977,7 @@ CREATE TABLE `analisis_ventas` (
|
|
|
|
|
`Importe` double NOT NULL,
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
KEY `Año` (`Año`,`Semana`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=120136075 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=121446775 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -2458,7 +2458,7 @@ CREATE TABLE `rutasBoard` (
|
|
|
|
|
KEY `rutasBoard_ix1` (`year`),
|
|
|
|
|
KEY `rutasBoard_ix2` (`month`),
|
|
|
|
|
KEY `rutasBoard_ix3` (`warehouse_id`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=202289 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=204333 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -3353,34 +3353,14 @@ BEGIN
|
|
|
|
|
FROM bs.ventas v
|
|
|
|
|
JOIN vn2008.time tm ON tm.date = v.fecha
|
|
|
|
|
JOIN vn2008.Movimientos m ON m.Id_Movimiento = v.Id_Movimiento
|
|
|
|
|
JOIN vn2008.Articles a ON a.Id_Article = m.Id_Article
|
|
|
|
|
JOIN vn2008.Tipos tp ON tp.tipo_id = a.tipo_id
|
|
|
|
|
JOIN vn2008.Tipos tp ON tp.tipo_id = v.tipo_id
|
|
|
|
|
JOIN vn2008.reinos r ON r.id = tp.reino_id
|
|
|
|
|
JOIN vn2008.Tickets t ON t.Id_Ticket = m.Id_Ticket
|
|
|
|
|
WHERE tm.period BETWEEN lastCOMP AND vn2008.vnperiod(CURDATE())- 3
|
|
|
|
|
AND t.Id_Cliente NOT IN(400,200)
|
|
|
|
|
AND r.display <> 0
|
|
|
|
|
AND t.warehouse_id NOT IN (0,13)
|
|
|
|
|
GROUP BY Id_Article, Periodo, warehouse_id;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
|
REPLACE vn2008.Comparativa(Periodo, Id_Article, warehouse_id, Cantidad,price)
|
|
|
|
|
SELECT vn2008.vnperiod(T.Fecha) AS Periodo
|
|
|
|
|
, Id_Article
|
|
|
|
|
, warehouse_id
|
|
|
|
|
, SUM(Cantidad) AS Total
|
|
|
|
|
, SUM(Cantidad * Preu * (100 - Descuento) / 100) precio
|
|
|
|
|
FROM vn2008.Movimientos M
|
|
|
|
|
JOIN vn2008.Tickets T USING (Id_Ticket)
|
|
|
|
|
JOIN vn2008.Articles A USING (Id_Article)
|
|
|
|
|
LEFT JOIN vn2008.Tipos ti ON ti.tipo_id = A.tipo_id
|
|
|
|
|
LEFT JOIN vn2008.reinos r ON r.id = ti.reino_id
|
|
|
|
|
WHERE T.Fecha BETWEEN TIMESTAMPADD(DAY,-60,CURDATE()) AND TIMESTAMPADD(DAY,-30,CURDATE())
|
|
|
|
|
AND T.Id_Cliente NOT IN(400,200)
|
|
|
|
|
AND display <> 0 AND warehouse_id NOT IN (0,13)
|
|
|
|
|
GROUP BY Id_Article, Periodo, warehouse_id;
|
|
|
|
|
*/
|
|
|
|
|
GROUP BY m.Id_Article, Periodo, t.warehouse_id;
|
|
|
|
|
|
|
|
|
|
END IF;
|
|
|
|
|
END ;;
|
|
|
|
@ -5195,7 +5175,7 @@ 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=384953 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=389045 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -5447,7 +5427,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=6084646 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=6150178 DEFAULT CHARSET=utf8 COLLATE=utf8_bin;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -5522,7 +5502,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=63108688 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=63599968 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -8487,7 +8467,7 @@ CREATE TABLE `cache_calc` (
|
|
|
|
|
KEY `cache_id` (`cache_id`),
|
|
|
|
|
KEY `cacheName` (`cacheName`),
|
|
|
|
|
KEY `expires` (`expires`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=443363 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=444761 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -8555,7 +8535,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=2344377 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2358763 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -9939,7 +9919,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=24992905 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=25131346 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -9997,7 +9977,7 @@ CREATE TABLE `ekt` (
|
|
|
|
|
KEY `barcode` (`barcode`),
|
|
|
|
|
KEY `fec` (`fec`),
|
|
|
|
|
KEY `putOrderFk` (`putOrderFk`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1126338 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1129567 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -10018,7 +9998,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=666917 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=670143 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -10280,7 +10260,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=696782 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=699795 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -10536,7 +10516,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=9184685 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=9236797 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -11233,7 +11213,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=175046 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=175768 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -11914,7 +11894,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=2274503 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2278835 DEFAULT 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 */ ;
|
|
|
|
@ -12033,7 +12013,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=13617979 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=13648482 DEFAULT 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 */ ;
|
|
|
|
@ -12457,7 +12437,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=377563 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=378331 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Transactions realized through the virtual TPV';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -12492,7 +12472,7 @@ CREATE TABLE `visit` (
|
|
|
|
|
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=2026231 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2030434 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -12512,7 +12492,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=4534627 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4544138 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -12537,7 +12517,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=2677108 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2681644 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -12557,7 +12537,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=3969298 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3975879 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -16295,7 +16275,7 @@ CREATE TABLE `cdr` (
|
|
|
|
|
KEY `dstchannel` (`dst_channel`),
|
|
|
|
|
KEY `disposition` (`disposition`),
|
|
|
|
|
KEY `src` (`src`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=319164 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=319593 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -17182,7 +17162,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=3041 DEFAULT CHARSET=utf8;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3042 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -20198,7 +20178,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=4090192 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4092000 DEFAULT 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 */ ;
|
|
|
|
@ -20442,7 +20422,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=29774 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=29796 DEFAULT 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 */ ;
|
|
|
|
@ -20562,7 +20542,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=4234 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=4236 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Observaciones de los consignatarios';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -20593,7 +20573,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=286 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=287 DEFAULT 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 */ ;
|
|
|
|
@ -20642,7 +20622,7 @@ CREATE TABLE `agencyMode` (
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
KEY `Agencias` (`name`),
|
|
|
|
|
KEY `Vista` (`deliveryMethodFk`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1240 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1242 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21039,7 +21019,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=356198896 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=357201336 DEFAULT 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 */ ;
|
|
|
|
@ -21349,7 +21329,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=72313 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=72385 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Reclamaciones, tabla principal';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21371,7 +21351,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=158400 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de las reclamaciones';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=158543 DEFAULT 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 */ ;
|
|
|
|
@ -21450,7 +21430,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=61811 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=61841 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Causas de las reclamaciones';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21492,7 +21472,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=120830 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=120889 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Acciones en respuesta a las reclamaciones';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21519,7 +21499,7 @@ 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=7990 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8104 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21708,7 +21688,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=16982 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=16998 DEFAULT 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 */ ;
|
|
|
|
@ -21878,7 +21858,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=85845 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=85923 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21954,7 +21934,7 @@ 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=242651 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=242871 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -21989,7 +21969,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=79079 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=79099 DEFAULT 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 */ ;
|
|
|
|
@ -22084,7 +22064,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=18617 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=18635 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -22123,7 +22103,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=49 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT 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 */ ;
|
|
|
|
@ -22221,7 +22201,7 @@ 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=51 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=61 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -22780,7 +22760,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=3273 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3275 DEFAULT 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 */ ;
|
|
|
|
@ -22824,7 +22804,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=3193 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalla los clientes que tienen seguro de credito';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3197 DEFAULT 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 */ ;
|
|
|
|
@ -22915,6 +22895,21 @@ CREATE TABLE `deliveryMethod` (
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=5 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `deliveryPoint`
|
|
|
|
|
--
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `deliveryPoint`;
|
|
|
|
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
|
|
|
|
/*!50503 SET character_set_client = utf8mb4 */;
|
|
|
|
|
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 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
|
-- Table structure for table `delivery_zip`
|
|
|
|
|
--
|
|
|
|
@ -23095,7 +23090,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=372 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=373 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -23177,7 +23172,7 @@ CREATE TABLE `dms` (
|
|
|
|
|
UNIQUE KEY `emp_id` (`companyFk`,`hardCopyNumber`,`warehouseFk`),
|
|
|
|
|
KEY `trabajador_id` (`workerFk`),
|
|
|
|
|
KEY `warehouse_id` (`warehouseFk`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1403357 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='document managment system';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1404541 DEFAULT 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 */ ;
|
|
|
|
@ -23324,7 +23319,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=19523 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=19530 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -23546,7 +23541,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=183147 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='InnoDB free: 88064 kB; (`Id_Proveedor`) REFER `vn2008/Provee';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=183332 DEFAULT 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 */ ;
|
|
|
|
@ -23748,7 +23743,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=180342 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=180843 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -24009,7 +24004,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=3458565 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3462659 DEFAULT 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 */ ;
|
|
|
|
@ -24251,7 +24246,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=3837585 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=COMPACT;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3840027 DEFAULT 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 */ ;
|
|
|
|
@ -24440,7 +24435,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=28524 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=28664 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -24744,7 +24739,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=525169 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=525196 DEFAULT 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 */ ;
|
|
|
|
@ -24870,7 +24865,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=139574 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Desglosa la base imponible de una factura en funcion del tipo de gasto/venta';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=139601 DEFAULT 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 */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -24913,7 +24908,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=1193042 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1193075 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -24992,7 +24987,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=378775 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=379398 DEFAULT 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 */ ;
|
|
|
|
@ -25119,7 +25114,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=43077 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=43079 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -25334,7 +25329,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=105062 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=105952 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -25361,7 +25356,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=1173556 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1175978 DEFAULT 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 */ ;
|
|
|
|
@ -25411,7 +25406,7 @@ 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=84841 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=85397 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de nichos de picking que hay que reponer';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -25512,7 +25507,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=147330 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=InnoDB AUTO_INCREMENT=149406 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 ';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
/*!50003 SET @saved_cs_client = @@character_set_client */ ;
|
|
|
|
|
/*!50003 SET @saved_cs_results = @@character_set_results */ ;
|
|
|
|
@ -25629,7 +25624,7 @@ 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=79537 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle de los itemShelving afectados por las ordenes de reposicion de nicho';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=80100 DEFAULT 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 */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -25701,7 +25696,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=50807 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Detalle del producto que se retira de los carros, relacionando la linea de movimiento correspondiente';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=52393 DEFAULT 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 */ ;
|
|
|
|
@ -25828,7 +25823,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=1418382 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1423085 DEFAULT 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 */ ;
|
|
|
|
@ -25972,7 +25967,7 @@ 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=903211 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Define la clase de iva por artículo y pais';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=907126 DEFAULT 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 */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -26219,7 +26214,7 @@ CREATE TABLE `mail` (
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
KEY `sent_idx` (`sent`),
|
|
|
|
|
KEY `creation_idx` (`creationDate`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1960438 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1961902 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -26301,7 +26296,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=17319 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17329 DEFAULT 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 */ ;
|
|
|
|
@ -26416,7 +26411,7 @@ CREATE TABLE `message` (
|
|
|
|
|
KEY `sender` (`sender`),
|
|
|
|
|
KEY `recipient` (`recipient`),
|
|
|
|
|
KEY `uuid` (`uuid`(8))
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2071554 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2073368 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -26438,7 +26433,7 @@ CREATE TABLE `messageInbox` (
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
KEY `uuid` (`uuid`(8)),
|
|
|
|
|
KEY `finalRecipient` (`finalRecipient`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2248005 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2249875 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -26627,7 +26622,7 @@ CREATE TABLE `packageChecked` (
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
UNIQUE KEY `entryFk_UNIQUE` (`itemFk`),
|
|
|
|
|
KEY `fkItem_idx` (`itemFk`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3391 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=3403 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -26710,7 +26705,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=27790 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Tabla con los parkings del altillo';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=27847 DEFAULT 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 */ ;
|
|
|
|
@ -27198,7 +27193,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=65055 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=65073 DEFAULT 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 */ ;
|
|
|
|
@ -27303,7 +27298,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=3795 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=6797 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -27397,7 +27392,7 @@ CREATE TABLE `producer` (
|
|
|
|
|
`isVisible` tinyint(1) NOT NULL DEFAULT '1',
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
UNIQUE KEY `name_UNIQUE` (`name`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=17832 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=29575 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -27486,7 +27481,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=216 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=217 DEFAULT 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 */ ;
|
|
|
|
@ -27500,17 +27495,8 @@ DELIMITER ;;
|
|
|
|
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`province_beforeInsert`
|
|
|
|
|
BEFORE INSERT ON `province` FOR EACH ROW
|
|
|
|
|
BEGIN
|
|
|
|
|
DECLARE vParentFk INT;
|
|
|
|
|
|
|
|
|
|
IF NEW.`name` = '' THEN
|
|
|
|
|
SIGNAL SQLSTATE '45000'
|
|
|
|
|
SET MESSAGE_TEXT = 'Column `name` cannot be empty';
|
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
|
|
SELECT geoFk INTO vParentFk
|
|
|
|
|
FROM country WHERE id = NEW.countryFk;
|
|
|
|
|
|
|
|
|
|
SET NEW.geoFk = zoneGeo_new('province', NEW.`name`, vParentFk);
|
|
|
|
|
SET NEW.geoFk = zoneGeo_new('province', NEW.`name`,
|
|
|
|
|
(SELECT geoFk FROM country WHERE id = NEW.countryFk));
|
|
|
|
|
END */;;
|
|
|
|
|
DELIMITER ;
|
|
|
|
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
|
|
|
@ -27550,24 +27536,15 @@ DELIMITER ;;
|
|
|
|
|
/*!50003 CREATE*/ /*!50017 DEFINER=`root`@`%`*/ /*!50003 TRIGGER `vn`.`province_afterUpdate`
|
|
|
|
|
AFTER UPDATE ON `province` FOR EACH ROW
|
|
|
|
|
BEGIN
|
|
|
|
|
DECLARE vParentFk INT;
|
|
|
|
|
IF !(OLD.countryFk <=> NEW.countryFk) THEN
|
|
|
|
|
CALL zoneGeo_setParent(NEW.geoFk,
|
|
|
|
|
(SELECT geoFk FROM country WHERE id = NEW.countryFk));
|
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
|
|
IF !(OLD.`name` <=> NEW.`name`) THEN
|
|
|
|
|
IF NEW.`name` = '' THEN
|
|
|
|
|
SIGNAL SQLSTATE '45000'
|
|
|
|
|
SET MESSAGE_TEXT = 'Column `name` cannot be empty';
|
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
|
|
UPDATE zoneGeo SET `name` = NEW.`name`
|
|
|
|
|
WHERE id = NEW.geoFk;
|
|
|
|
|
END IF;
|
|
|
|
|
|
|
|
|
|
IF !(OLD.countryFk <=> NEW.countryFk) THEN
|
|
|
|
|
SELECT geoFk INTO vParentFk
|
|
|
|
|
FROM country WHERE id = NEW.countryFk;
|
|
|
|
|
|
|
|
|
|
CALL zoneGeo_setParent(NEW.geoFk, vParentFk);
|
|
|
|
|
END IF;
|
|
|
|
|
END */;;
|
|
|
|
|
DELIMITER ;
|
|
|
|
|
/*!50003 SET sql_mode = @saved_sql_mode */ ;
|
|
|
|
@ -27686,7 +27663,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=614423 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=615052 DEFAULT 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 */ ;
|
|
|
|
@ -27864,7 +27841,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=60738 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=60860 DEFAULT 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 */ ;
|
|
|
|
@ -27955,7 +27932,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=1114 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1119 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -28058,7 +28035,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=217941 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=221807 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -28143,7 +28120,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=26550874 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=26578866 DEFAULT 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 */ ;
|
|
|
|
@ -28358,7 +28335,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=21381834 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=21423993 DEFAULT 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 */ ;
|
|
|
|
@ -28492,7 +28469,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=2236 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2238 DEFAULT 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 */ ;
|
|
|
|
@ -28668,7 +28645,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=157507 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=157767 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -28861,7 +28838,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=857460 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=860748 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -28924,7 +28901,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=2980 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2985 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -28949,7 +28926,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=891 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=892 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -29256,7 +29233,7 @@ CREATE TABLE `ticket` (
|
|
|
|
|
CONSTRAINT `ticket_ibfk_9` FOREIGN KEY (`routeFk`) REFERENCES `route` (`id`) ON UPDATE CASCADE,
|
|
|
|
|
CONSTRAINT `tickets_fk10` FOREIGN KEY (`refFk`) REFERENCES `invoiceOut` (`ref`) ON UPDATE CASCADE,
|
|
|
|
|
CONSTRAINT `tickets_zone_fk` FOREIGN KEY (`zoneFk`) REFERENCES `zone` (`id`) ON UPDATE CASCADE
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2504721 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=2507679 DEFAULT 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 */ ;
|
|
|
|
@ -29405,7 +29382,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=919 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=958 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -29566,7 +29543,7 @@ 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=8332163 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8355055 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -29603,7 +29580,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=1525157 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1526820 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Todas las observaciones referentes a un ticket';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -29658,7 +29635,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=78708 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=78908 DEFAULT 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 */ ;
|
|
|
|
@ -29721,7 +29698,7 @@ 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=15354 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Almacena los distintos lugares donde puede estar aparcado cada uno de los prepedidos';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=15826 DEFAULT 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 */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -29787,7 +29764,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=52480 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=52514 DEFAULT 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 */ ;
|
|
|
|
@ -30080,7 +30057,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=748410 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=749044 DEFAULT 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 */ ;
|
|
|
|
@ -30303,7 +30280,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=444 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de trabajadores que han realizado una formación';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=446 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Lista de trabajadores que han realizado una formación';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -30355,7 +30332,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=142546 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci ROW_FORMAT=DYNAMIC;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=142610 DEFAULT 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 */ ;
|
|
|
|
@ -30652,10 +30629,13 @@ CREATE TABLE `vehicle` (
|
|
|
|
|
`isActive` tinyint(4) NOT NULL DEFAULT '1',
|
|
|
|
|
`warehouseFk` smallint(6) unsigned DEFAULT NULL,
|
|
|
|
|
`description` varchar(45) COLLATE utf8_unicode_ci DEFAULT NULL,
|
|
|
|
|
`deliveryPointFk` int(11) DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (`id`),
|
|
|
|
|
KEY `empresa_id` (`companyFk`),
|
|
|
|
|
KEY `provinceFk_idx` (`warehouseFk`),
|
|
|
|
|
KEY `vehicle_deliveryPointFk_idx` (`deliveryPointFk`),
|
|
|
|
|
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;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
@ -31001,7 +30981,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=12963 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=12971 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -31066,7 +31046,7 @@ 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=65513384 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=65656734 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -31105,7 +31085,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=16287 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=16295 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -31186,7 +31166,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=8308187 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas';
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=8309403 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci COMMENT='Fichadas';
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -31542,7 +31522,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=489 DEFAULT CHARSET=utf8;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=490 DEFAULT CHARSET=utf8;
|
|
|
|
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
|
|
|
|
|
|
|
|
|
--
|
|
|
|
@ -31584,7 +31564,7 @@ CREATE TABLE `zoneGeo` (
|
|
|
|
|
KEY `name_idx` (`name`),
|
|
|
|
|
KEY `parentFk` (`parentFk`),
|
|
|
|
|
KEY `path` (`path`)
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=597478 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=597479 DEFAULT 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 */ ;
|
|
|
|
@ -41120,7 +41100,7 @@ BEGIN
|
|
|
|
|
io.companyFk,
|
|
|
|
|
RIGHT(io.ref, LENGTH(io.ref) - 1) AS invoiceNum,
|
|
|
|
|
IF(ct.politicalCountryFk = vSpainCountryFk, vSpainCountryFk, IF(ct.isUeeMember = vIsUeeMember,2,4)) AS TERIDNIF,
|
|
|
|
|
CONCAT(IF(ct.isUeeMember = vIsUeeMember,ct.code,''),c.fi) AS TERNIF,
|
|
|
|
|
CONCAT(IF(ct.isUeeMember = vIsUeeMember AND ct.politicalCountryFk <> vSpainCountryFk,ct.code,''),c.fi) AS TERNIF,
|
|
|
|
|
c.socialName AS TERNOM,
|
|
|
|
|
ior.serial AS SERIE_RT,
|
|
|
|
|
RIGHT(ior.ref, LENGTH(ior.ref) - 1) AS FACTU_RT,
|
|
|
|
@ -55200,7 +55180,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=22003588 DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=22042784 DEFAULT 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 */ ;
|
|
|
|
@ -58817,4 +58797,4 @@ USE `vncontrol`;
|
|
|
|
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|
|
|
|
|
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
|
|
|
|
|
|
|
|
|
|
-- Dump completed on 2019-12-05 14:02:43
|
|
|
|
|
-- Dump completed on 2019-12-09 13:57:58
|
|
|
|
|