Compare commits

...

42 Commits

Author SHA1 Message Date
David Domenech 0384f7d83d Merge pull request 'refs #6372 DeleteTablesFromVn2008' (!2055) from 6372-Delete-views-from-vn2008 into dev
gitea/salix/pipeline/head There was a failure building this commit Details
Reviewed-on: #2055
Reviewed-by: Carlos Andrés <carlosap@verdnatura.es>
Reviewed-by: Javi Gallego <jgallego@verdnatura.es>
2024-02-22 06:14:25 +00:00
David Domenech 5110d6e71d fix error refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-22 07:09:35 +01:00
David Domenech e4d60d20c5 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-22 05:59:00 +00:00
David Domenech 658c351860 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-21 13:36:42 +00:00
David Domenech 29accbb23e Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev Build queued... Details
2024-02-21 13:10:20 +00:00
David Domenech 5bef3989cd refs #6372
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-21 14:07:52 +01:00
David Domenech 1cf17a3d8d refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-21 07:35:57 +01:00
Pablo Natek 913e7aa1d8 fix(run): refs #6372 change version
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-20 14:22:07 +01:00
David Domenech 1fb0545817 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-20 13:21:38 +01:00
David Domenech 8f80b6ab7b Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-20 06:05:34 +00:00
David Domenech 9bc676ddfd Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-19 10:35:32 +00:00
David Domenech c12fdc2ed4 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-19 10:29:47 +00:00
David Domenech 3d47c9e5e8 refs #6372
gitea/salix/pipeline/pr-dev Build queued... Details
2024-02-19 11:27:37 +01:00
David Domenech 12f3af68bf refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-19 11:04:07 +01:00
David Domenech 1fbda19fdb Merge branch '6372-Delete-views-from-vn2008' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-19 10:58:47 +01:00
David Domenech cc600542ea Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008 2024-02-19 10:58:36 +01:00
David Domenech 2c8cd07476 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-19 07:14:52 +00:00
David Domenech 04fe6a8596 refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-15 13:58:12 +01:00
David Domenech 03b5ed064d Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-15 13:48:21 +01:00
David Domenech 0c7ca79ae0 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-14 10:03:49 +00:00
David Domenech fd785ee429 refs #6372
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-02-14 11:01:37 +01:00
David Domenech a5529f0e0a Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-12 11:29:40 +00:00
David Domenech 37a47edfdc refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-12 12:25:58 +01:00
David Domenech e1567dfb9e refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-12 11:20:12 +01:00
David Domenech b712b65d76 refs #6372
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-12 07:44:40 +01:00
David Domenech 31b07b31a9 Merge branch '6372-Delete-views-from-vn2008' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-12 07:34:36 +01:00
David Domenech 6044c160f8 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008 2024-02-12 07:21:40 +01:00
David Domenech ce0b43ed9e Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-08 05:59:03 +00:00
David Domenech 2b3a7a83a2 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-06 13:21:25 +00:00
David Domenech d82ae16257 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-06 06:39:38 +00:00
David Domenech b7bb1b9784 refs #6372 feat: vn2008 to vn
gitea/salix/pipeline/pr-dev Build queued... Details
2024-02-06 07:37:33 +01:00
David Domenech da0fe2d83a Merge branch '6372-Delete-views-from-vn2008' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-06 07:29:51 +01:00
David Domenech 0aed49d603 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008 2024-02-06 07:29:42 +01:00
Guillermo Bonet f3c0e4f60c Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev This commit looks good Details
2024-02-05 14:02:46 +00:00
David Domenech b8b1910540 Merge branch '6372-Delete-views-from-vn2008' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/pr-dev There was a failure building this commit Details
2024-01-31 14:50:58 +01:00
David Domenech df179aab81 Merge branch 'dev' into 6372-Delete-views-from-vn2008 2024-01-31 13:52:13 +00:00
David Domenech bad00167fa refs #6372 feat: vn2008 to vn 2024-01-31 14:50:56 +01:00
David Domenech a81a42c2e7 Merge branch 'dev' of https://gitea.verdnatura.es/verdnatura/salix into 6372-Delete-views-from-vn2008 2024-01-31 14:43:16 +01:00
David Domenech 4e4b1f5f16 Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/head There was a failure building this commit Details
2024-01-30 06:16:39 +00:00
David Domenech 69a14a2a2f Merge branch 'dev' into 6372-Delete-views-from-vn2008
gitea/salix/pipeline/head This commit looks good Details
2024-01-30 06:09:23 +00:00
David Domenech abbda268f5 refs #6372 feat: vn2008 to vn
gitea/salix/pipeline/head Build queued... Details
2024-01-29 09:18:11 +01:00
David Domenech 8ea3c98a13 refs #6372 feat: vn2008 to vn
gitea/salix/pipeline/head This commit looks good Details
2024-01-29 09:12:29 +01:00
30 changed files with 336 additions and 60 deletions

View File

@ -137,9 +137,6 @@ INSERT INTO vn.ticket (clientFk, warehouseFk, shipped, nickname, refFk, addressF
INSERT INTO vn.sale (itemFk, ticketFk, concept, quantity, originalQuantity, price, discount, priceFixed, reserved, isPicked, isPriceFixed, created, isAdded)
VALUES (1, 24, 'Ranged weapon longbow 2m', 1.00, NULL, 8.07, 0, 0.00, 0, 0, 0, '2022-07-06 00:00:00', 0);
*/
INSERT INTO vn2008.zones (zone_id,name,printingOrder)
VALUES (1,'zone Test',1);
-- XXX: lab
INSERT INTO `vn`.`businessReasonEnd` (`id`, `reason`)

View File

@ -1,27 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` FUNCTION `vn`.`isPalletHomogeneus`(vExpedition INT)
RETURNS tinyint(1)
NOT DETERMINISTIC
READS SQL DATA
BEGIN
DECLARE vScanId INT;
DECLARE vDistinctRoutesInThePallet INT;
SELECT scan_id INTO vScanId
FROM vn2008.scan_line
WHERE code = vExpedition
LIMIT 1;
SELECT COUNT(*) INTO vDistinctRoutesInThePallet
FROM (
SELECT DISTINCT t.Id_Ruta
FROM vn2008.scan_line sl
JOIN expedition e ON e.id = sl.code
JOIN vn2008.Tickets t ON t.Id_Ticket = e.ticketFk
WHERE sl.scan_id = vScanId
AND t.Id_Ruta
) t1;
RETURN vDistinctRoutesInThePallet = 1;
END$$
DELIMITER ;

View File

@ -0,0 +1,8 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate`
AFTER UPDATE ON `vn`.`saleLabel`
FOR EACH ROW
IF NEW.stem >= (SELECT s.quantity FROM sale s WHERE s.id = NEW.saleFk) THEN
UPDATE sale s SET s.isPicked = TRUE WHERE s.id = NEW.saleFk;
END IF$$
DELIMITER ;

View File

@ -1,9 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`exchangeInsuranceInPrevious`
AS SELECT `ei`.`finished` AS `dated`,
`ei`.`amount` AS `amount`,
`ei`.`rate` AS `rate`
FROM `vn`.`exchangeInsurance` `ei`
WHERE `ei`.`amount` <> 0
AND `ei`.`financialProductTypefk` = 'SC'

View File

@ -1,6 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`unaryScanLineBuy`
AS SELECT `u`.`scan_line_id` AS `unaryScanLineFk`,
`u`.`Id_Article` AS `itemFk`
FROM `vn2008`.`unary_scan_line_buy` `u`

View File

@ -1,6 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn`.`unaryScanLineExpedition`
AS SELECT `u`.`scan_line_id` AS `unaryScanLineFk`,
`u`.`expedition_id` AS `expeditionFk`
FROM `vn2008`.`unary_scan_line_expedition` `u`

View File

@ -45,7 +45,6 @@ proc: BEGIN
DELETE FROM cl_main WHERE Fecha < vDate18;
DELETE FROM hedera.`order` WHERE date_send < vDate18;
DELETE FROM vn.message WHERE sendDate < vDate;
DELETE FROM travel_reserve WHERE odbc_date < vDate;
DELETE FROM cache.departure_limit WHERE Fecha < util.VN_CURDATE() - INTERVAL 1 MONTH;

View File

@ -1,8 +0,0 @@
DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn2008`.`movement_label_afterUpdate`
AFTER UPDATE ON `movement_label`
FOR EACH ROW
IF NEW.stem >= (SELECT Cantidad FROM Movimientos WHERE Id_Movimiento = NEW.Id_Movimiento) THEN
UPDATE Movimientos SET OK = 1 WHERE Id_Movimiento = NEW.Id_Movimiento;
END IF$$
DELIMITER ;

View File

@ -0,0 +1,4 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`financialProductType`AS
SELECT * FROM vn.financialProductType;

View File

@ -0,0 +1,13 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`flight`
AS SELECT
`f`.`id` AS `flight_id`,
`f`.`duration` AS `duration`,
`f`.`flightPath` AS `route`,
`f`.`days` AS `days`,
`f`.`airlineFk` AS `airline_id`,
`f`.`airportArrivalFk` AS `airport_out`,
`f`.`airportDepartureFk` AS `airport_in`
FROM
`vn`.`flight` `f`;

View File

@ -0,0 +1,11 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`gastos_resumen`
AS SELECT
`es`.`expenseFk` AS `Id_Gasto`,
`es`.`year` AS `year`,
`es`.`month` AS `month`,
`es`.`amount` AS `importe`,
`es`.`companyFk` AS `empresa_id`
FROM
`vn`.`expenseManual` `es`;

View File

@ -0,0 +1,9 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`integra2`
AS SELECT
`i2`.`postCode` AS `postal_code`,
`i2`.`frequency` AS `frequency`,
`i2`.`warehouseFk` AS `warehouse_id`
FROM
`vn`.`integra2` `i2`;

View File

@ -0,0 +1,8 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`integra2_province`
AS SELECT
`ip`.`provinceFk` AS `province_id`,
`ip`.`franchise` AS `franquicia`
FROM
`vn`.`integra2Province` `ip`;

View File

@ -0,0 +1,16 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`pago_sdc`
AS SELECT `ei`.`id` AS `pago_sdc_id`,
`ei`.`amount` AS `importe`,
`ei`.`dated` AS `fecha`,
`ei`.`dueDated` AS `vencimiento`,
`ei`.`entityFk` AS `entity_id`,
`ei`.`ref` AS `ref`,
`ei`.`rate` AS `rate`,
`ei`.`companyFk` AS `empresa_id`,
`ei`.`financialProductTypefk` AS `financialProductTypefk`,
`ei`.`upperBarrier` AS `upperBarrier`,
`ei`.`lowerBarrier` AS `lowerBarrier`,
`ei`.`strike` AS `strike`
FROM `vn`.`exchangeInsurance` `ei`

View File

@ -0,0 +1,9 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`warehouse_pickup`
AS SELECT
`wp`.`warehouseFk` AS `warehouse_id`,
`wp`.`agencyModeFk` AS `agency_id`
FROM
`vn`.`warehousePickup` `wp`;

View File

@ -0,0 +1 @@
ALTER TABLE IF EXISTS `vn2008`.`financialProductType` RENAME `vn`.`financialProductType`;

View File

@ -0,0 +1,8 @@
ALTER TABLE IF EXISTS `vn2008`.`flight` RENAME `vn`.`flight`;
ALTER TABLE IF EXISTS `vn`.`flight`
CHANGE COLUMN IF EXISTS `flight_id` `id` varchar(10) NOT NULL,
CHANGE COLUMN IF EXISTS `airline_id` `airlineFk` smallint(2) unsigned DEFAULT NULL,
CHANGE COLUMN IF EXISTS `route` `flightPath` varchar(20) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `airport_out` `airportArrivalFk` varchar(3) NOT NULL,
CHANGE COLUMN IF EXISTS `airport_in` `airportDepartureFk` varchar(3) NOT NULL;

View File

@ -0,0 +1,18 @@
ALTER TABLE IF EXISTS vn2008.gastos_resumen DROP FOREIGN KEY IF EXISTS gastos_resumen_expense_FK;
ALTER TABLE IF EXISTS `vn2008`.`gastos_resumen` RENAME `vn`.`expenseManual`;
ALTER TABLE IF EXISTS `vn`.`expenseManual`
CHANGE COLUMN IF EXISTS `Id_Gasto` `expenseFk` varchar(10) NOT NULL,
CHANGE COLUMN IF EXISTS `importe` `amount` decimal(10,2) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `empresa_id` `companyFk` int(11) NOT NULL;
ALTER TABLE IF EXISTS vn.expenseManual COLLATE=utf8mb3_general_ci;
ALTER TABLE IF EXISTS vn.expenseManual MODIFY COLUMN IF EXISTS expenseFk varchar(10) CHARACTER SET utf8mb3 COLLATE utf8mb3_general_ci NOT NULL;
ALTER TABLE IF EXISTS vn.expenseManual ADD CONSTRAINT expenseManual_expense_FK FOREIGN KEY IF NOT EXISTS (expenseFk) REFERENCES vn.expense(id) ON DELETE CASCADE ON UPDATE CASCADE;
ALTER TABLE IF EXISTS vn.expenseManual MODIFY COLUMN IF EXISTS companyFk int(10) unsigned NOT NULL;
ALTER TABLE IF EXISTS vn.expenseManual ADD CONSTRAINT expenseManual_company_FK FOREIGN KEY IF NOT EXISTS (companyFk) REFERENCES vn.company(id) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -0,0 +1,10 @@
ALTER TABLE IF EXISTS `vn2008`.`integra2` RENAME `vn`.`integra2`;
ALTER TABLE IF EXISTS `vn`.`integra2`
CHANGE COLUMN IF EXISTS `postal_code` `postCode` varchar(10) NOT NULL,
CHANGE COLUMN IF EXISTS `frequency` `frequency` decimal(10,2) DEFAULT NULL,
CHANGE COLUMN IF EXISTS `warehouse_id` `warehouseFk` smallint(6) unsigned NOT NULL;
ALTER TABLE IF EXISTS vn.integra2 ADD CONSTRAINT integra2_warehouse_FK
FOREIGN KEY (warehouseFk) REFERENCES vn.warehouse(id) ON DELETE CASCADE ON UPDATE CASCADE;

View File

@ -0,0 +1,4 @@
ALTER TABLE IF EXISTS `vn2008`.`integra2_province` RENAME `vn`.`integra2Province`;
ALTER TABLE IF EXISTS `vn`.`integra2Province`
CHANGE COLUMN IF EXISTS `franquicia` `franchise` varchar(65) NOT NULL,
CHANGE COLUMN IF EXISTS `province_id` `provinceFk` smallint(6) unsigned NOT NULL;

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS vn2008.intervalos__;

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS vn2008.mail_templates__;

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS vn2008.ticket_location__;

View File

@ -0,0 +1 @@
DROP TABLE IF EXISTS vn2008.turn__;

View File

@ -0,0 +1,8 @@
DROP TRIGGER IF EXISTS `vn2008`.`movement_label_afterUpdate`;
DROP VIEW IF EXISTS `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn2008`.`movement_label` RENAME `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn`.`saleLabel`
CHANGE COLUMN IF EXISTS `Id_movimiento` `saleFk` int(11) NOT NULL;

View File

@ -0,0 +1,11 @@
DROP VIEW IF EXISTS `vn`.`exchangeInsurance`;
ALTER TABLE IF EXISTS `vn2008`.`pago_sdc` RENAME `vn`.`exchangeInsurance`;
ALTER TABLE IF EXISTS `vn`.`exchangeInsurance`
CHANGE COLUMN IF EXISTS `pago_sdc_id` `id` int(11) NOT NULL AUTO_INCREMENT,
CHANGE COLUMN IF EXISTS `importe` `amount` decimal(10,2) NOT NULL,
CHANGE COLUMN IF EXISTS `fecha` `dated` date NOT NULL,
CHANGE COLUMN IF EXISTS `vencimiento` `dueDated` date NOT NULL,
CHANGE COLUMN IF EXISTS `entity_id` `entityFk` int(10) unsigned NOT NULL,
CHANGE COLUMN IF EXISTS `empresa_id` `companyFk`int(10) unsigned NOT NULL DEFAULT 442;

View File

@ -0,0 +1,7 @@
ALTER TABLE IF EXISTS `vn2008`.`warehouse_pickup` RENAME `vn`.`warehousePickup`;
ALTER TABLE IF EXISTS `vn`.`warehousePickup`
CHANGE COLUMN IF EXISTS `warehouse_id` `warehouseFk` smallint(5) unsigned NOT NULL,
CHANGE COLUMN IF EXISTS `agency_id` `agencyModeFk` int(11) DEFAULT NULL;
ALTER TABLE `vn`.`warehousePickup` COMMENT='Agencia de recogida para cada almacén';

View File

@ -0,0 +1,155 @@
ALTER TABLE IF EXISTS vn2008.template_bionic_component RENAME vn2008.template_bionic_component__;
ALTER TABLE IF EXISTS vn2008.template_bionic_component__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.template_bionic_lot RENAME vn2008.template_bionic_lot__;
ALTER TABLE IF EXISTS vn2008.template_bionic_lot__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.template_bionic_price RENAME vn2008.template_bionic_price__;
ALTER TABLE IF EXISTS vn2008.template_bionic_price__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.tmpNEWTARIFAS RENAME vn2008.tmpNEWTARIFAS__;
ALTER TABLE IF EXISTS vn2008.tmpNEWTARIFAS__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.unaryScanFilter RENAME vn2008.unaryScanFilter__;
ALTER TABLE IF EXISTS vn2008.unaryScanFilter__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.unary_source RENAME vn2008.unary_source__;
ALTER TABLE IF EXISTS vn2008.unary_source__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.viaxpress RENAME vn2008.viaxpress__;
ALTER TABLE IF EXISTS vn2008.viaxpress__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.warehouse_filtro RENAME vn2008.warehouse_filtro__;
ALTER TABLE IF EXISTS vn2008.warehouse_filtro__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.warehouse_group RENAME vn2008.warehouse_group__;
ALTER TABLE IF EXISTS vn2008.warehouse_group__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.warehouse_joined RENAME vn2008.warehouse_joined__;
ALTER TABLE IF EXISTS vn2008.warehouse_joined__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.warehouse_lc RENAME vn2008.warehouse_lc__;
ALTER TABLE IF EXISTS vn2008.warehouse_lc__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.wh_selection RENAME vn2008.wh_selection__;
ALTER TABLE IF EXISTS vn2008.wh_selection__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.trolley RENAME vn2008.trolley__;
ALTER TABLE IF EXISTS vn2008.trolley__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.zones RENAME vn2008.zones__;
ALTER TABLE IF EXISTS vn2008.zones__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.tblIVA RENAME vn2008.tblIVA__;
ALTER TABLE IF EXISTS vn2008.tblIVA__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.filtros RENAME vn2008.filtros__;
ALTER TABLE IF EXISTS vn2008.filtros__ COMMENT='refs #6372 @deprecated 2023-11-21;';
ALTER TABLE IF EXISTS vn2008.form_query RENAME vn2008.form_query__;
ALTER TABLE IF EXISTS vn2008.form_query__ COMMENT='refs #6372 @deprecated 2023-11-21;';
ALTER TABLE IF EXISTS vn2008.guillen RENAME vn2008.guillen__;
ALTER TABLE IF EXISTS vn2008.guillen__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.guillen_carry RENAME vn2008.guillen_carry__;
ALTER TABLE IF EXISTS vn2008.guillen_carry__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.integra2_escala RENAME vn2008.integra2_escala__;
ALTER TABLE IF EXISTS vn2008.integra2_escala__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.invoice_observation RENAME vn2008.invoice_observation__;
ALTER TABLE IF EXISTS vn2008.invoice_observation__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.nichos RENAME vn2008.nichos__;
ALTER TABLE IF EXISTS vn2008.nichos__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.payroll_bonificaciones RENAME vn2008.payroll_bonificaciones__;
ALTER TABLE IF EXISTS vn2008.payroll_bonificaciones__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.payroll_datos RENAME vn2008.payroll_datos__;
ALTER TABLE IF EXISTS vn2008.payroll_datos__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.payroll_embargos RENAME vn2008.payroll_embargos__;
ALTER TABLE IF EXISTS vn2008.payroll_embargos__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.payroll_tipobasess RENAME vn2008.payroll_tipobasess__;
ALTER TABLE IF EXISTS vn2008.payroll_tipobasess__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.preparation_exception RENAME vn2008.preparation_exception__;
ALTER TABLE IF EXISTS vn2008.preparation_exception__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.payrroll_apEmpresarial RENAME vn2008.payrroll_apEmpresarial__;
ALTER TABLE IF EXISTS vn2008.payrroll_apEmpresarial__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.rec_translator RENAME vn2008.rec_translator__;
ALTER TABLE IF EXISTS vn2008.rec_translator__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.recibida_agricola RENAME vn2008.recibida_agricola__;
ALTER TABLE IF EXISTS vn2008.recibida_agricola__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.rounding RENAME vn2008.rounding__;
ALTER TABLE IF EXISTS vn2008.rounding__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.scanTree RENAME vn2008.scanTree__;
ALTER TABLE IF EXISTS vn2008.scanTree__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.sort_merge_results_ernesto RENAME vn2008.sort_merge_results_ernesto__;
ALTER TABLE IF EXISTS vn2008.sort_merge_results_ernesto__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.route RENAME vn2008.route__;
ALTER TABLE IF EXISTS vn2008.route__ COMMENT='refs #6372 @deprecated 2023-11-28;';
ALTER TABLE IF EXISTS vn2008.travel_reserve RENAME vn2008.travel_reserve__;
ALTER TABLE IF EXISTS vn2008.travel_reserve__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.wks RENAME vn2008.wks__;
ALTER TABLE IF EXISTS vn2008.wks__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.unary RENAME vn2008.unary__;
ALTER TABLE IF EXISTS vn2008.unary__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.unary_scan RENAME vn2008.unary_scan__;
ALTER TABLE IF EXISTS vn2008.unary_scan__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.unary_scan_line RENAME vn2008.unary_scan_line__;
ALTER TABLE IF EXISTS vn2008.unary_scan_line__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.unary_scan_line_buy RENAME vn2008.unary_scan_line_buy__;
ALTER TABLE IF EXISTS vn2008.unary_scan_line_buy__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.unary_scan_line_expedition RENAME vn2008.unary_scan_line_expedition__;
ALTER TABLE IF EXISTS vn2008.unary_scan_line_expedition__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.widget RENAME vn2008.widget__;
ALTER TABLE IF EXISTS vn2008.widget__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.scan RENAME vn2008.scan__;
ALTER TABLE IF EXISTS vn2008.scan__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.scan_line RENAME vn2008.scan_line__;
ALTER TABLE IF EXISTS vn2008.scan_line__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.tipsa RENAME vn2008.tipsa__;
ALTER TABLE IF EXISTS vn2008.tipsa__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.payroll_basess RENAME vn2008.payroll_basess__;
ALTER TABLE IF EXISTS vn2008.payroll_basess__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.pago_sdc RENAME vn2008.pago_sdc__;
ALTER TABLE IF EXISTS vn2008.pago_sdc__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.transport RENAME vn2008.transport__;
ALTER TABLE IF EXISTS vn2008.transport__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.travel_pattern RENAME vn2008.travel_pattern__;
ALTER TABLE IF EXISTS vn2008.travel_pattern__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.jerarquia RENAME vn2008.jerarquia__;
ALTER TABLE IF EXISTS vn2008.jerarquia__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.language RENAME vn2008.language__;
ALTER TABLE IF EXISTS vn2008.language__ COMMENT='refs #6372 @deprecated 2023-12-13;';
ALTER TABLE IF EXISTS vn2008.link RENAME vn2008.link__;
ALTER TABLE IF EXISTS vn2008.link__ COMMENT='refs #6372 @deprecated 2023-12-13;';

View File

@ -0,0 +1,32 @@
-- flight
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`flight` AS
SELECT 1;
GRANT SELECT, INSERT, UPDATE ON TABLE vn2008.flight TO `logistic`;
GRANT SELECT, INSERT, UPDATE ON TABLE vn.flight TO `logistic`;
-- integra2_province
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`integra2_province` AS
SELECT 1;
GRANT SELECT ON TABLE vn2008.integra2_province TO `employee`;
GRANT SELECT ON TABLE vn.integra2Province TO `employee`;
-- link
GRANT SELECT ON TABLE vn.company TO `administrative`;
GRANT SELECT ON TABLE vn.company TO `hr`;
-- warehouse_pickup
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`warehouse_pickup` AS
SELECT 1;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `logistic`;
GRANT SELECT ON TABLE vn.warehousePickup TO `logistic`;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `claimManager`;
GRANT SELECT ON TABLE vn.warehousePickup TO `claimManager`;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `employee`;
GRANT SELECT ON TABLE vn.warehousePickup TO `employee`;
GRANT SELECT ON TABLE vn2008.warehouse_pickup TO `deliveryAssistant`;
GRANT SELECT ON TABLE vn.warehousePickup TO `deliveryAssistant`;