diff --git a/storage_v1.19.1/migrations/tenant/0002-storage-schema.sql b/storage_v1.19.1/migrations/tenant/0002-storage-schema.sql index 3ac4d12..b4cd1cb 100644 --- a/storage_v1.19.1/migrations/tenant/0002-storage-schema.sql +++ b/storage_v1.19.1/migrations/tenant/0002-storage-schema.sql @@ -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 $$