From 95fa776e41d10d5c20e929cd00819300c8fbf519 Mon Sep 17 00:00:00 2001 From: JAVIER SEGARRA MARTINEZ Date: Thu, 29 Feb 2024 12:49:50 +0000 Subject: [PATCH] refs 5858 feat: sql files --- .../10881-greenHydrangea/01-notification.vn.sql | 12 ++++++++++++ .../10881-greenHydrangea/01-notification.vnx.sql | 10 ---------- 2 files changed, 12 insertions(+), 10 deletions(-) create mode 100644 db/versions/10881-greenHydrangea/01-notification.vn.sql delete mode 100644 db/versions/10881-greenHydrangea/01-notification.vnx.sql diff --git a/db/versions/10881-greenHydrangea/01-notification.vn.sql b/db/versions/10881-greenHydrangea/01-notification.vn.sql new file mode 100644 index 000000000..414a14688 --- /dev/null +++ b/db/versions/10881-greenHydrangea/01-notification.vn.sql @@ -0,0 +1,12 @@ +SET @MaxId = SELECT MAX(id)+1 from util.notification n) +INSERT INTO IGNORE util.notification (id, name,description) + VALUES ( +(@MaxId, 'zone-included','An email to notify zoneCollisions'); + +INSERT INTO IGNORE util.notificationSubscription (notificationFk,userFk) + VALUES( + @MaxId, 100); + + +INSERT INTO IGNORE util.notificationAcl (notificationFk,roleFk) + SELECT @MaxId, (SELECT id from `account`.`role` where name = "system") FROM util.notification WHERE name= "zone-included"; diff --git a/db/versions/10881-greenHydrangea/01-notification.vnx.sql b/db/versions/10881-greenHydrangea/01-notification.vnx.sql deleted file mode 100644 index d05902461..000000000 --- a/db/versions/10881-greenHydrangea/01-notification.vnx.sql +++ /dev/null @@ -1,10 +0,0 @@ -INSERT INTO util.notification (id, name,description) - VALUES ( -(SELECT MAX(id)+1 from util.notification n) , 'zone-included','An email to notify zoneCollisions'); - -INSERT INTO util.notificationSubscription (notificationFk,userFk) - SELECT id, account.myUser_getId() FROM util.notification WHERE name= "zone-included"; - - -INSERT INTO util.notificationAcl (notificationFk,roleFk) - SELECT id, (SELECT id from `account`.`role` where name = "system") FROM util.notification WHERE name= "zone-included";