Currently, webhooks are tied to collection name, but they "break" when user renames collection.
It's the same for permissions. They also have fields, and they can also change name.
Simplest solution might be to use either id or table name, or to listen for emitter to emit change and then rename.
I can't use FK since, they are not always collection. For example, webhook can be used for some other things as well. Same as for authz.
Currently, webhooks are tied to collection name, but they "break" when user renames collection. It's the same for permissions. They also have fields, and they can also change name.
Simplest solution might be to use either id or table name, or to listen for emitter to emit change and then rename.
I can't use FK since, they are not always collection. For example, webhook can be used for some other things as well. Same as for authz.