2024-03-09 10:27:29 +00:00
|
|
|
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');
|
|
|
|
|
|
|
|
SET @DESTINATION_USER = "pepe";
|
2024-03-13 10:54:02 +00:00
|
|
|
|
2024-03-09 10:27:29 +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";
|