refs #6372 DeleteTablesFromVn2008 #2055

Merged
davidd merged 41 commits from 6372-Delete-views-from-vn2008 into dev 2024-02-22 06:14:26 +00:00
4 changed files with 9 additions and 15 deletions
Showing only changes of commit 5bef3989cd - Show all commits

View File

@ -1,6 +1,6 @@
DELIMITER $$ DELIMITER $$
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`movementLabel_afterUpdate` CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`saleLabel_afterUpdate`
AFTER UPDATE ON `vn`.`movementLabel` AFTER UPDATE ON `vn`.`saleLabel`
FOR EACH ROW FOR EACH ROW
IF NEW.stem >= (SELECT s.quantity FROM sale s WHERE s.id = NEW.saleFk) THEN 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; UPDATE sale s SET s.isPicked = TRUE WHERE s.id = NEW.saleFk;

View File

@ -1,10 +0,0 @@
CREATE OR REPLACE DEFINER=`root`@`localhost`
SQL SECURITY DEFINER
VIEW `vn2008`.`movement_label`
AS SELECT
`m`.`saleFk` AS `Id_movimiento`,
`m`.`label`,
`m`.`stem`,
`m`.`created`
FROM
`vn`.`movementLabel` `m`;

View File

@ -1,6 +1,8 @@
DROP TRIGGER IF EXISTS `vn2008`.`movement_label_afterUpdate`; DROP TRIGGER IF EXISTS `vn2008`.`movement_label_afterUpdate`;
ALTER TABLE IF EXISTS `vn2008`.`movement_label` RENAME `vn`.`movementLabel`; DROP VIEW IF EXISTS `vn`.`saleLabel`;
ALTER TABLE IF EXISTS `vn`.`movementLabel` 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; CHANGE COLUMN IF EXISTS `Id_movimiento` `saleFk` int(11) NOT NULL;

View File

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