salix/db/changes/233801/00-notificationBookEntry.sql

15 lines
613 B
MySQL
Raw Normal View History

2023-09-04 09:59:55 +00:00
INSERT IGNORE INTO util.`notification` (id, `name`, description)
SELECT MAX(id) + 1, 'book-entry-deleted', 'accounting entries deleted'
FROM util.`notification`;
INSERT IGNORE INTO util.`notificationAcl` (notificationFk, roleFk)
VALUES(
(SELECT id FROM util.`notification` WHERE `name` = 'book-entry-deleted'),
(SELECT id FROM vn.`role` r WHERE `name` = 'administrative'));
INSERT IGNORE INTO util.`notificationSubscription` (notificationFk, userFk)
VALUES(
(SELECT id FROM util.`notification` WHERE `name` = 'book-entry-deleted'),
(SELECT id FROM account.`user` WHERE `name` = 'admon'));