-
Notifications
You must be signed in to change notification settings - Fork 33
Description
I have this trigger.
CREATE OR REPLACE TRIGGER user_account_encrypt_secret_trigger_email
BEFORE INSERT OR UPDATE OF email ON user_account
FOR EACH ROW
EXECUTE FUNCTION user_account_encrypt_secret_email();but it pgschema generates plan with
CREATE OR REPLACE TRIGGER user_account_encrypt_secret_trigger_email
BEFORE INSERT OR UPDATE ON user_account
FOR EACH ROW
EXECUTE FUNCTION user_account_encrypt_secret_email();as you can see OF email is gone.
So in my registration flow where I execute UPDATE query to set user verified status to TRUE trigger is being triggered and email gets encrypted once more making my user data unusable :(.
I would really appreciate fixing this since I can't really use pgschema without it.
I never wrote in Go but if someone could just tell me where I should look at I'm pretty sure I can prepare a merge request with it working.
I really love how pgschema works and what it does but if I can't make encryption work I will have no other choice and I will have to change tooling...
As a temporary workaround I created overriding migrations that i execute after plan.
However it is not really convenient and I would prefer to have handled by this tool if it's possible before I will let other people work with it.