I’m trying to use the pg notify trigger in user migration and I have a genserver which is listening to particular channel in this case it will be the user. If anything changes it gives me the notification. but then I have put this worker in my application
worker( Notifications.Listener, ["user_changes", [name: Notifications.Listener]], restart: :permanent )
But for this I have a trigger in the migration and I have put worker to only listen to that. How can I make this a general thing?
Do I have to put trigger in all the migration so that I can recieve the notification like this
So from the design point of view how can I make a general genserver which can listen to all the pg notify trigger