From 5c03d785d1d6fd259c93f6a52704b0ee430a9650 Mon Sep 17 00:00:00 2001 From: Bobbie Soedirgo Date: Mon, 16 Jun 2025 20:48:13 +1000 Subject: [PATCH] fix: grant tables to postgres with grant option --- migrations/tenant/0038-grant-with-grant-option.sql | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 migrations/tenant/0038-grant-with-grant-option.sql diff --git a/migrations/tenant/0038-grant-with-grant-option.sql b/migrations/tenant/0038-grant-with-grant-option.sql new file mode 100644 index 00000000..e97542a1 --- /dev/null +++ b/migrations/tenant/0038-grant-with-grant-option.sql @@ -0,0 +1,6 @@ +do $$ +declare + super_user text = coalesce(current_setting('storage.super_user', true), 'postgres'); +begin + execute 'grant all on storage.buckets, storage.objects to ' || super_user || ' with grant option'; +end $$;