In order to add support for custom database triggers you need to do the following:
Extend the DatabaseTriggerLoadService class
This new class will be used to dynamically load the specified database triggers.
Akioma.Swat.Server.Startup.DatabaseTriggerLoadService is a SWAT class which implements the IDatabaseTriggerLoadService interface. You can specify the triggers to load in the LoadTriggers method of the class.
It is recommended to extend the existing SWAT implementation instead of writing a new implementation for the interface, since triggers may also be loaded from SWAT.
The new class implementation will look similar to this:
Override the existing IDatabaseTriggerLoadService service
In order to make use of this new class, we will need to override the default trigger load service in the services.xml file by including the following: