Triggers in MySQL error

The recommended method of customizing your AppGini-generated application is through hooks. But sometimes you might need to add functionality not accessible through hooks. You can discuss this here.
Post Reply
mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Triggers in MySQL error

Post by mdannatt » 2023-02-21 17:11

Hoping someone can help me
I use a mysql trigger to update a table. The problem is that every time the creator(me) of the trigger logs out and then logs back in again, I am greeted with this message when adding a record which then tries to activate the trigger:
"The user specified as a definer ('_EU_39b60bba9bee6181'@'%') does not exist"
I guess appgini assigns some random token to a user for each session, but I'm just guessing. The token value changes and therefore the trigger no longer works because the original creator must remain on the database.

Does anyone have any more insight into this? A fix/workaround? Or am I going to have to place the trigger in the relevant table hooks folder?
Roses are red, Violets are blue, unexpected '}' on line 32

mdannatt
Veteran Member
Posts: 41
Joined: 2020-01-27 17:34

Re: Triggers in MySQL error

Post by mdannatt » 2023-02-22 08:49

As an update to this, I have replaced my trigger with equivalent code in function_after_insert. Problem solved.
Roses are red, Violets are blue, unexpected '}' on line 32

Post Reply