All Questions

Tagged with
Filter by
Sorted by
Tagged with
18 votes
8 answers
20k views

Supabase client permission denied for schema public

Whenever I've try to use @supabase/supabase-js to query the db, I get an error. error: { hint: null, details: null, code: '42501', message: 'permission denied for schema public' } I ...
rdavis's user avatar
  • 303
7 votes
1 answer
3k views

Can't migrate schema using Prisma with Supabase

When I use the Postgres database on Supabase I run the following command, npx prisma migrate dev --name init, but I get the following error (first command in screenshot): Error: db error: FATAL: ...
steve238's user avatar
  • 1,071
6 votes
2 answers
7k views

Error: Get config: Unable to establish a connection to query-engine-node-api library in Prisma and nextjs

I use nextjs fresh project with Prisma and supabase database. I'm using ubuntu. No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: ...
officialrajdeepsingh's user avatar
4 votes
1 answer
2k views

Connecting to postgres on supabase via pgBouncer from prisma

Problem running out of database connections in prod leading to errors like this; Error: Invalid `prisma.queryRaw()` invocation: Timed out fetching a new connection from the connection pool. More ...
sauntimo's user avatar
  • 1,571
3 votes
1 answer
2k views

supabase: `prisma migrate dev` sometimes times out (postgres advisory lock)

I have a supabase database (postgres 15.1.0.88) and I'm using prisma as ORM(latest version [email protected]). When trying to apply migrations with prisma migrate dev, the command most of the times ...
tlz13's user avatar
  • 116
3 votes
2 answers
2k views

How to reset the auto incremented id column to 1 whenever I seed the database in postgreSQL?

I am using Supabase as a backend which provides postgres as its database and prisma for my next-js app. I wanted to seed some dummy data into the database. The first time I run the seed script, ...
surya vivek's user avatar
3 votes
4 answers
2k views

How can I implement Full text search by using Prisma + PostgreSQL ? (I'm using Supabase as the database)

This is my schema file: generator client { provider = "prisma-client-js" previewFeatures = ["fullTextSearch","fullTextIndex"] } datasource db { provider = "...
Aviroop Jana's user avatar
3 votes
0 answers
906 views

Authentication error Supabase and Prisma on Nextjs

This is the error message I’m getting when i run npx prisma db push I’ve created a project, database and a table in Supabase I also have the schema.prisma file and passing the DATABASE_URL from ...
Louis's user avatar
  • 31
2 votes
1 answer
488 views

Where to place prisma seed.ts in Next.js 13 with appDir to apply seed data into supabase?

I am trying to apply seed data into supabase database from the Next.js 13 app that using appDir. In some tutorials and articles, you can place seed file in pages/api and once it runs next api server, ...
Vicky's user avatar
  • 21
2 votes
1 answer
604 views

Prisma & Supabase - Segmentation fault (core dumped)

I got the following error, while trying to populate my Supabase table using Prisma... Segmentation fault (core dumped) I'm using NodeJ, and the following script import { createRequire } from "...
Henri's user avatar
  • 1,661
1 vote
1 answer
445 views

found an error today while pushing the postgres prisma schema

While pushing the postgres prisma schema, I encountered with this error: Error: Schema engine error: **ERROR: prepared statement "s0" does not exist** I was trying to push the schema to ...
Shahbaz Ali's user avatar
1 vote
4 answers
800 views

Next 13 with Prisma DB: Seed.ts not working

I'm building a web app with Next 13. I'm using Prisma for my ORM with SupaBase hosting my Postgres database. I've been following a modern Next 13 course updated about a month ago and I'm at the stage ...
Ethan's user avatar
  • 578
1 vote
1 answer
622 views

Prevent Postgres column to be EMPTY using supabase & prisma

I've started a new project using Prisma & Supabase but I'm facing an issue. I have some required String columns. Is there a way to prevent those columns to accept empty string value (''). Do you ...
BghinC's user avatar
  • 161
1 vote
3 answers
5k views

Prisma migration fail with supabase

I'm trying to generate some migrations using Prisma. I'm using Supabase which is using Postgres under the hood. Also, I tried to run the following command with the local emulator and with the "...
jean-smaug's user avatar
1 vote
1 answer
2k views

Prisma ORM, PgBouncer, Supabase stack - what is causing these database connection timeouts on production?

I'm working with a tech stack of Prisma ORM and Postgres on Supabase with PgBouncer enabled. We're also using Google Cloud Run to deploy our Node/Express API. When looking through logs for production, ...
truthordare's user avatar
1 vote
1 answer
1k views

Using Prisma Client with Supabase Edge Functions

I am trying to use the generated @prisma/client together with Supabase Edge functions. When running npx prisma generate the default location would be in my node_modules folder, which is a problem ...
Aaron3219's user avatar
  • 2,168
1 vote
1 answer
150 views

How to recreate auth.users table in supabase

Is there a way to recreate the default auth.users table after having deleted it? I deleted it due to my poor skills at migration. I can't sign up at all now and I assume this is because the auth.users ...
Gianna's user avatar
  • 225
1 vote
0 answers
550 views

Realtime Supabase not working when I do a migration with Prisma

i'm working on a project using nextjs, react, typescript, Supabase and Prisma. And I Plan to build a chat with Realtime. The Realtime database work when I create it, but when I do a migration with ...
meknessi's user avatar
1 vote
0 answers
754 views

PrismaClientValidationError: Argument is missing - How to resolve?

I'm encountering a PrismaClientValidationError when trying to update a record using the Prisma ORM. The error specifically states that the argument 'companies' is missing in the 'prisma....
delfincortesb's user avatar
1 vote
0 answers
373 views

Many-To-Many relationship when using Clerk as Auth with Next.js app + Prisma ORM

I'm using Clerk for authentication in a next.js application with the help of Prisma as an ORM. I know how to manage post model by using authorId for example, but I have problems with many-to-many, ...
javad's user avatar
  • 13
1 vote
1 answer
721 views

When trying to use multischema with Prisma and Supabase, can't migrate

I'm learning to use Supabase w/ Postgres in Supabase with the following schema: // This is your Prisma schema file, // learn more about it in the docs: https://pris.ly/d/prisma-schema generator ...
Fares's user avatar
  • 1,241
1 vote
2 answers
710 views

Supabase connection returning undefined

I have a Vercel deployed Remix project with Supabase on the backend, Postgresql and using Prisma as the ORM. I have set up connection pooling as well as a direct connection to Supabase, but anytime I ...
T. Duke's user avatar
  • 836
1 vote
0 answers
702 views

Prisma db seed not working on a remote supabase instance

I am working on a Nextjs project and would like to build a preview environment on Vercel where I use supabase (remote postgres) for database. I would like to run prisma db seed in the preview ...
rooo's user avatar
  • 133
1 vote
2 answers
1k views

Prisma migrate command gets stuck

I am trying to use Prisma with a local instance of Supabase running on docker. I created a very basic model inside prisma/schema.prisma file: // This is your Prisma schema file, // learn more about it ...
user1449456's user avatar
1 vote
0 answers
2k views

Introspecting based on datasource defined in prisma/schema.prisma / Error: P4002

starting new project and ran prisma db init, then i ran prisma db pull. Getting this error: **Introspecting based on datasource defined in prisma/schema.prisma Error: P4002 The schema of the ...
front-end-performer's user avatar
0 votes
1 answer
3k views

Trigger and function to insert user id into another table

I am using Prisma as my schema and migrating it to supabase with prisma migrate dev One of my tables Profiles, should reference the auth.users table in supabase, in sql something like this id uuid ...
Anders Kitson's user avatar
0 votes
1 answer
1k views

Invalid `prisma.dayEvent.create()` invocation: Null constraint violation on the fields: (`id`)

When I'm trying to create event in calendar this error throws: Invalid `prisma.dayEvent.create()` invocation: Null constraint violation on the fields: (`id`) Which is weird cause id have default() ...
Grayza's user avatar
  • 207
0 votes
2 answers
357 views

configure db authentication to allow sign up only to known email addresses

I want to build an app (in react js) for myself, my family, and some close friends (+/- 40 people). But having this app live, anyone could go on the apps web address and submit a sign up form, and yes ...
Elias Babenko's user avatar
0 votes
1 answer
2k views

Prisma .findUnique() error: Unknown arg `email` in where.email for type userWhereUniqueInput. Did you mean `id`

I'm new to Prisma so bear with me. I have a (Postgres) DB on Supabase and I have the following model: model user { created_at DateTime? @default(now()) @db.Timestamptz(6) email String @...
Neil Girardi's user avatar
  • 4,707
0 votes
1 answer
301 views

Next-Auth in App Dir with Prisma on Supabase Postgres and SendGrid EmailProvider server throwing [MISSING_ADAPTER_METHODS_ERROR]

I am using Next-Auth with PrismaAdapter, Prisma connected to a Supabase Postgres database in a Next.js 13 App Dir project. I also have a SendGrid connection which I am unsure whether I configured ...
1voy's user avatar
  • 49
0 votes
1 answer
1k views

Supabase error: Cancelling statement due to statement timeout

I am developing a project using Next.js, Supabase and Prisma. After defining the data models in the schema.prisma file, I ran npx prisma migrate dev to sync the Prisma schema with the database. ...
HKS's user avatar
  • 774
0 votes
1 answer
319 views

Prisma schema doesn't match DB schema

I've got a Person table that looks like this in the schema: model Person { id String @id @default(uuid()) firstName String? lastName String? roles Role[] ...
Chris Haupt's user avatar
0 votes
1 answer
816 views

Prisma - How to reference SQL view in schema

I am designing a database schema for a multi-tenant project where a single user might have multiple "profiles", one for different tenants. I am using Supabase to provide a Postgres database ...
J. Sheets's user avatar
  • 237
0 votes
1 answer
17 views

Supabase Prisma Error: P1001: Can't reach database server at `aws-0-ap-southeast-1.pooler.supabase.com`:`5432`

I am trying to build a next.js project with Supabase and Prisma. This is part of my schema.prisma file: generator client { provider = "prisma-client-js" previewFeatures = ["...
Inaara Kalani's user avatar
0 votes
0 answers
13 views

Trying to use Prisma for a simple use case, but I'm encountering an error: 'Invalid prisma.bookmark.findUnique() invocation.'

I'm working on a feature to add bookmarks based on userId and toolId. These two elements are passed from the frontend. I have debugged, and my API call is working fine until I add a link to PrismaDB. ...
Wamz's user avatar
  • 113
0 votes
0 answers
12 views

PrismaClientValidationError: Invalid `prisma.roomMember.create()` invocation

If I attempt to create a room without including a RoomMember, everything works as expected. However, when I try to create a member using the createRoomAction, I encounter the following error message: ...
saeed Alh's user avatar
0 votes
1 answer
32 views

Why "npx prisma db pull" is blocked on Introspecting?

hello I want to add a table in my database (supabase). So I add this in supabase. And when I try to pull my table (from database supabase) with npx prisma db pull for uptdate prisma schema the command ...
toto's user avatar
  • 1
0 votes
0 answers
27 views

I deployed my next project on vercel but it doesn't work(it works well in local)

I am building project with next.js and now I completed login and signup with prisma and supabase and deployed. It works well in local but when I submit login form in vercel, I get 405 error(this ...
Chester Reynolds's user avatar
0 votes
1 answer
381 views

can't access to supabase in vercel deployed product Nextjs14

I am creating web app with Nextjs14, prisma, and supabase (postgreSQL). in localhost it works well, but I deployed it in vercel and then errors happen. I did integration in vercel to connect to ...
nakamura johnielo's user avatar
0 votes
1 answer
53 views

The column `EventChart.åå` does not exist in the current database

I've been building a dashboard app with Prisma, Next.js and supabase. When I request a get method, prisma says that column EventChart.åå does not exist, which I've never used this weird alphabet "...
Kohki Umetsu's user avatar
0 votes
1 answer
174 views

Prisma error TypeError: Cannot read properties of undefined (reading 'findMany')

I've been building a dashboard app with Prisma, Next.js and supabase. Somehow EventChart model in schema.prisma didn't work, so I decided to add a new model EventAreaChart and migrated but when I ...
Kohki Umetsu's user avatar
0 votes
1 answer
163 views

Prisma Supabase Connection failed Error: Schema engine error: ERROR: prepared statement "s0" does not exist

npm install prisma --save-dev npx prisma init --datasource-provider postgresql Setup .env database url from supabase. DATABASE_URL="postgres://postgres.pnfqkgzzcnikiuchyljz:g2lIVbri0JazB7eV@aws-0-...
Shivam Kushwaha's user avatar
0 votes
1 answer
81 views

How should i dockerize a NestJS with Prisma server?

Im really newbie to docker, so I was following this tutorial of how to dockerize it. The image builds fine but when running the container, prisma cannot connect to the database. The database is hosted ...
José Carlos's user avatar
0 votes
0 answers
104 views

Trouble creating an empty array as a default value instead of NULL in prisma

I am trying to create an empty array as a default value instead of null. Here is my schema: model User { id String @id @default(uuid()) name String comments Comment[] image ...
Mossy82's user avatar
  • 185
0 votes
1 answer
165 views

Migrate error using Nuxt, Prisma, Supabase

npx prisma migrate status Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": PostgreSQL database "postgres", schema "...
Jasurbek Mannonov's user avatar
0 votes
0 answers
129 views

How do I best protect Nuxt API endpoints (Supabase db)?

I'm using Prisma with Nuxt to communicate with Supabase db. Not using RLS, as the recommended way with Prisma seems to be protecting routes on the server side instead. My question is if the below is ...
plantsplantsplants's user avatar
0 votes
0 answers
94 views

Supabase in combination with Prisma

I like the Prisma scheme generation; would it be bad practise to use Prisma to generate models, add RLS within Supabase and create the supabase migrations that way?
nehalist's user avatar
  • 1,474
0 votes
0 answers
43 views

How to optimize inserting bulk data into Supabase?

I’m new to Supabase and created an application to simulate a game scoring app. I have the following tables: weeks, rounds, games, subgames, scores. In this instance, I’m generating a set of data with ...
Bill L.'s user avatar
  • 121
0 votes
1 answer
217 views

Prisma Error with Supabase: must be owner of event trigger pgsodium_trg_mask_update

I've been using Prisma with a PostgreSQL database hosted on Supabase and encountered a perplexing issue. When I try to execute npx prisma db push, I get this pesky error message: Error: db error: ...
Mel Macaluso's user avatar
  • 3,570
0 votes
2 answers
77 views

Prisma findUnique relation within relation of User

I have a database with the following schema Whereby User has lotInterests and within this table I want to select the Lot with a matching address. What I have tried: const foundLot = await prisma.user....
Simon Palmer's user avatar