#5858 - zoneCollisions #1853
|
@ -2816,8 +2816,8 @@ INSERT INTO `util`.`notification` (`id`, `name`, `description`)
|
|||
(3, 'not-main-printer-configured', 'A printer distinct than main has been configured'),
|
||||
(4, 'supplier-pay-method-update', 'A supplier pay method has been updated'),
|
||||
(5, 'modified-entry', 'An entry has been modified'),
|
||||
(6, 'book-entry-deleted', 'accounting entries deleted'),
|
||||
(7, 'zone-included','An email to notify zoneCollisions');
|
||||
(6, 'book-entry-deleted', 'accounting entries deleted');
|
||||
|
||||
INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
||||
VALUES
|
||||
(1, 9),
|
||||
|
@ -2826,8 +2826,7 @@ INSERT INTO `util`.`notificationAcl` (`notificationFk`, `roleFk`)
|
|||
(3, 9),
|
||||
(4, 1),
|
||||
(5, 9),
|
||||
(6, 9),
|
||||
(7, 1);
|
||||
(6, 9);
|
||||
|
||||
INSERT INTO `util`.`notificationQueue` (`id`, `notificationFk`, `params`, `authorFk`, `status`, `created`)
|
||||
VALUES
|
||||
|
@ -2844,8 +2843,7 @@ INSERT INTO `util`.`notificationSubscription` (`notificationFk`, `userFk`)
|
|||
(2, 1109),
|
||||
(1, 9),
|
||||
(1, 3),
|
||||
(6, 9),
|
||||
(7, 9);
|
||||
(6, 9);
|
||||
|
||||
|
||||
INSERT INTO `vn`.`routeConfig` (`id`, `defaultWorkCenterFk`)
|
||||
|
@ -3064,6 +3062,3 @@ INSERT INTO `vn`.`clientSms` (`id`, `clientFk`, `smsFk`, `ticketFk`)
|
|||
(4, 1103, 4, 32),
|
||||
(13, 1101, 1, NULL),
|
||||
(14, 1101, 4, 27);
|
||||
|
||||
UPDATE salix.ACL
|
||||
SET principalId='employee' WHERE model ="Notification";
|
||||
|
|
|
@ -0,0 +1,9 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` EVENT `VN_SCHEDULER`
|
||||
ON SCHEDULE EVERY 1 DAY
|
||||
STARTS CURRENT_TIMESTAMP + INTERVAL 1 DAY
|
||||
DO BEGIN
|
||||
CALL `VN_SCHEDULER`();
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
|
@ -0,0 +1,8 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` PROCEDURE `util`.`VN_SCHEDULER`()
|
||||
BEGIN
|
||||
-- Obtener datos de la tabla vn_schedules
|
||||
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
|
@ -1,11 +0,0 @@
|
|||
DELIMITER $$
|
||||
|
||||
CREATE EVENT IF NOT EXISTS `zone_getCollisions`
|
||||
ON SCHEDULE EVERY 1 DAY
|
||||
STARTS CURRENT_TIMESTAMP + INTERVAL 1 DAY
|
||||
DO BEGIN
|
||||
CALL `zone_getCollisions`();
|
||||
ALTER EVENT `zone_getCollisions` DISABLE;
|
||||
END$$
|
||||
|
||||
DELIMITER ;
|
|
@ -10,6 +10,8 @@ BEGIN
|
|||
`userFk` = account.myUser_getId();
|
||||
|
||||
-- Activo el evento 'zone_getCollisions'
|
||||
jsegarra marked this conversation as resolved
Outdated
|
||||
UPDATE mysql.event SET status = 1 WHERE name = 'zone_getCollisions';
|
||||
-- UPDATE `mysql`.`event` SET status = 1 WHERE name = 'zone_getCollisions';
|
||||
|
||||
-- Insert en vn_schedules 'zone_getCollisions'
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
DELIMITER $$
|
||||
CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeInsert`
|
||||
BEFORE INSERT ON `zoneIncluded`
|
||||
FOR EACH ROW
|
||||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
-- Activo el evento 'zone_getCollisions'
|
||||
UPDATE mysql.event SET status = 1 WHERE name = 'zone_getCollisions';
|
||||
-- Insert en vn_schedulesla key 'zone_getCollisions'
|
||||
|
||||
END$$
|
||||
jsegarra marked this conversation as resolved
Outdated
jgallego
commented
estamos generando una dependencia en util de vn. estamos generando una dependencia en util de vn.
Util no tiene que conocer vn.
Simplemente crea el schedule que se ejecute todas las noches en vn, ya està.
|
||||
DELIMITER ;
|
||||
|
|
|
@ -5,7 +5,7 @@ CREATE OR REPLACE DEFINER=`root`@`localhost` TRIGGER `vn`.`zoneIncluded_beforeUp
|
|||
BEGIN
|
||||
SET NEW.editorFk = account.myUser_getId();
|
||||
|
||||
-- Activo el evento 'zone_getCollisions'
|
||||
UPDATE mysql.event SET status = 1 WHERE name = 'zone_getCollisions';
|
||||
-- Activo el evento 'zone_getCollisions' -- Insert en vn_schedules 'zone_getCollisions'
|
||||
|
||||
END$$
|
||||
DELIMITER ;
|
||||
|
|
Loading…
Reference in New Issue
no ponemos dos saltos de linea nunca