This commit is contained in:
hailin 2025-05-26 19:24:39 +08:00
parent c4b59f3292
commit 78aa17b367
1 changed files with 5 additions and 3 deletions

View File

@ -194,9 +194,11 @@ END$$;
-- ✅ 单独插入 bucket允许重复执行
INSERT INTO storage.buckets (id, name, owner)
VALUES ('profile_images', 'profile_images', NULL)
ON CONFLICT (id) DO NOTHING;
INSERT INTO storage.buckets (id, name, owner, public)
VALUES ('profile_images', 'profile_images', NULL, true)
ON CONFLICT (id) DO UPDATE SET public = true;
-- ✅ 单独定义权限策略(重复执行不会报错)
DO $$