fix: refs #6197 add definer to events
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Juan Ferrer 2023-11-21 09:26:02 +01:00
parent 0a2fd9cf5d
commit bf7c67dbde
2 changed files with 2 additions and 2 deletions

View File

@ -9,7 +9,7 @@ module.exports = Self => {
Self.observe(hook, async() => {
try {
await Self.rawSql(`
CREATE EVENT account.role_sync
CREATE DEFINER = CURRENT_ROLE EVENT account.role_sync
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 5 SECOND
DO CALL role_sync;
`);

View File

@ -14,7 +14,7 @@ module.exports = Self => {
async function doCalc(ctx) {
try {
await Self.rawSql(`
CREATE EVENT zoneClosure_doRecalc
CREATE DEFINER = CURRENT_ROLE EVENT zoneClosure_doRecalc
ON SCHEDULE AT CURRENT_TIMESTAMP + INTERVAL 15 SECOND
DO CALL zoneClosure_recalc;
`);