Skip to content

The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.

chore: update troubleshooting guide for prisma

Qiao Hanb8c8c727e55a
diff --git a/apps/docs/docs/guides/integrations/prisma.mdx b/apps/docs/docs/guides/integrations/prisma.mdx
index b8257507f9c..e3d366fa1c5 100644
--- a/apps/docs/docs/guides/integrations/prisma.mdx
+++ b/apps/docs/docs/guides/integrations/prisma.mdx
@@ -144,30 +144,15 @@ If you want to learn more about Prisma, check out the [docs](https://www.prisma.
If you run `prisma migrate dev --name init` multiple times, it sometimes asks if you want to recreate the whole schema. If you chose yes, it will delete the public schema and recreate it. The default grants are missing after this. If you run into this problem, add a helper SQL for fixing the grants:
```sql
-CREATE SCHEMA IF NOT EXISTS "auth";
-CREATE SCHEMA IF NOT EXISTS "extensions";
-create extension if not exists "uuid-ossp" with schema extensions;
-create extension if not exists pgcrypto with schema extensions;
-create extension if not exists pgjwt with schema extensions;
-
grant usage on schema public to postgres, anon, authenticated, service_role;
-grant usage on schema extensions to postgres, anon, authenticated, service_role;
-alter user supabase_admin SET search_path TO public, extensions; -- don't include the "auth" schema
-grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role, supabase_admin;
-grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role, supabase_admin;
-grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role, supabase_admin;
+grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role;
+grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role;
+grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on tables to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on functions to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on sequences to postgres, anon, authenticated, service_role;
-
-alter default privileges for user supabase_admin in schema public grant all on sequences to postgres, anon, authenticated, service_role;
-alter default privileges for user supabase_admin in schema public grant all on tables to postgres, anon, authenticated, service_role;
-alter default privileges for user supabase_admin in schema public grant all on functions to postgres, anon, authenticated, service_role;
-
-alter role anon set statement_timeout = '3s';
-alter role authenticated set statement_timeout = '8s';
```
## Resources
diff --git a/apps/reference/docs/guides/integrations/prisma.mdx b/apps/reference/docs/guides/integrations/prisma.mdx
index e7f8d517ccc..e65cc49f08b 100644
--- a/apps/reference/docs/guides/integrations/prisma.mdx
+++ b/apps/reference/docs/guides/integrations/prisma.mdx
@@ -144,30 +144,15 @@ If you want to learn more about Prisma, check out the [docs](https://www.prisma.
If you run `prisma migrate dev --name init` multiple times, it sometimes asks if you want to recreate the whole schema. If you chose yes, it will delete the public schema and recreate it. The default grants are missing after this. If you run into this problem, add a helper SQL for fixing the grants:
```sql
-CREATE SCHEMA IF NOT EXISTS "auth";
-CREATE SCHEMA IF NOT EXISTS "extensions";
-create extension if not exists "uuid-ossp" with schema extensions;
-create extension if not exists pgcrypto with schema extensions;
-create extension if not exists pgjwt with schema extensions;
-
grant usage on schema public to postgres, anon, authenticated, service_role;
-grant usage on schema extensions to postgres, anon, authenticated, service_role;
-alter user supabase_admin SET search_path TO public, extensions; -- don't include the "auth" schema
-grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role, supabase_admin;
-grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role, supabase_admin;
-grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role, supabase_admin;
+grant all privileges on all tables in schema public to postgres, anon, authenticated, service_role;
+grant all privileges on all functions in schema public to postgres, anon, authenticated, service_role;
+grant all privileges on all sequences in schema public to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on tables to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on functions to postgres, anon, authenticated, service_role;
alter default privileges in schema public grant all on sequences to postgres, anon, authenticated, service_role;
-
-alter default privileges for user supabase_admin in schema public grant all on sequences to postgres, anon, authenticated, service_role;
-alter default privileges for user supabase_admin in schema public grant all on tables to postgres, anon, authenticated, service_role;
-alter default privileges for user supabase_admin in schema public grant all on functions to postgres, anon, authenticated, service_role;
-
-alter role anon set statement_timeout = '3s';
-alter role authenticated set statement_timeout = '8s';
```
## Resources