salix/db/versions/10881-greenHydrangea/01-notification.sql

16 lines
624 B
MySQL
Raw Permalink Normal View History

INSERT IGNORE INTO util.notification ( `name`,`description`)
2024-03-04 10:57:10 +00:00
VALUES
2024-03-13 10:58:25 +00:00
( 'zone-included','An email to notify zoneCollisions');
2024-03-13 14:00:12 +00:00
-- Change value if destionation user should be different
2024-03-13 10:58:25 +00:00
SET @DESTINATION_USER = "pepe";
2024-03-13 10:54:02 +00:00
SET @MaxId = LAST_INSERT_ID();
2024-03-13 10:54:02 +00:00
2024-03-04 10:57:10 +00:00
INSERT IGNORE INTO util.notificationSubscription (notificationFk,userFk)
2024-02-29 12:49:50 +00:00
VALUES(
2024-03-13 10:58:25 +00:00
@MaxId, (SELECT id from `account`.`user` where name = @DESTINATION_USER));
2024-02-29 12:49:50 +00:00
2024-03-04 10:57:10 +00:00
INSERT IGNORE INTO util.notificationAcl (notificationFk,roleFk)
2024-03-13 10:58:25 +00:00
SELECT @MaxId, (SELECT role from `account`.`user` where name = @DESTINATION_USER) FROM util.notification WHERE name= "zone-included";