The Postgres development platform. Supabase gives you a dedicated Postgres database to build your web, mobile, and AI applications.
TypeScript aialternativeauthdatabasedenoembeddingsexamplefirebasenextjsoauth2pgvectorpostgispostgrespostgresqlpostgrestrealtimesupabasevectorswebsockets
fix #7441
Aditya Agarwal606fc4b57289
diff --git a/web/docs/guides/integrations/prisma.mdx b/web/docs/guides/integrations/prisma.mdxindex 09411d99dfe..2ffa0ba8850 100644--- a/web/docs/guides/integrations/prisma.mdx+++ b/web/docs/guides/integrations/prisma.mdx@@ -160,6 +160,37 @@ Error querying the database: db error: ERROR: prepared statement “s0” alreadThis is a known issue and it is being worked on, you can follow the progress on this [GitHub issue](https://github.com/prisma/prisma/issues/6485).If you want to learn more about Prisma, check out the [docs](https://www.prisma.io/docs). Also in case you have any questions or run into any issue, feel free to start a discussion in the repo’s [discussions section](https://github.com/prisma/prisma/discussions).+## Troubleshooting++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 recreates 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;++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- [Prisma](https://prisma.io) official website.