Hello guys
I'm working on a migration script that has rollbacks as well.
If I create a trigger on auth.users through postgres user I can not drop the trigger and get the following error: must be owner of relation users
I guess this is because auth.users is owned by super user and hence postgres can't drop the trigger.
Anyway I can overcome this issue?
s
silentworks
01/21/2022, 7:42 PM
You need to elevate the postgres user to a superuser. If you search on the Supabase GitHub discussions you will find a discussion where I asked this. I can’t share the link at the moment as I’m away from my computer and don’t have it on my phone.
m
moein
01/21/2022, 8:17 PM
Ah cool
Will have a look now
Thanks mate
moein
01/22/2022, 4:03 PM
In the end I'm gonna leave the trigger out of the migration since on supabase cloud doesn't allow changing postgres user role.
s
silentworks
01/22/2022, 5:15 PM
You can change the privilege of the postgres user, but you shouldn't leave it as a super user