Forums | Mahara Community
Remove triggers from Mahara Database
08 August 2018, 7:57 PM
I would like to start a discussion about removing triggers from the Mahara database. My reasoning is:
- Mahara supports two DB types - MySql and Postgres. Each DB has different syntax when it comes to creating/updating/deleting triggers. This makes it complicated to develop and maintain.
- Mahara already has the concept of events in place. We can move the functionality of each trigger into an event. We would then have more control over the event. For example, don't action an event during an upgrade.
- Triggers make it difficult to see what is actually happening. They are not transparent. If you weren't aware that there is a trigger on the table, it can make it difficult to track down why something is behaving in a certain way.
Please, let's hear your thoughts.
09 August 2018, 1:51 PM
The launchpad item is https://bugs.launchpad.net/bugs/1785985
This was discussed in yesterday's developer meeting if you want to read the notes for that. The gist is that others are in favour of it. "Mahara events could be used instead of triggers. Events can be filtered depending on what is happening, e.g. to avoid doing certain things during an upgrade."