S
Supabase3y ago
ven

code '42501', details null, hint null, message 'permission denied for schema ' error. what do i do?

// console.log("client", client);
// get users
client
.from("User")
.select("*")
.then(({ data, error }) => {
console.log("data", data);
console.log("error", error);
});
// console.log("client", client);
// get users
client
.from("User")
.select("*")
.then(({ data, error }) => {
console.log("data", data);
console.log("error", error);
});
11 Replies
ven
venOP3y ago
using @nuxt/supabase client
garyaustin
garyaustin3y ago
Are you using Prisma? You are using a capital named table which is a bad idea, but Prisma forces that. Prisma also plays games with the grants on the schemas.
ven
venOP3y ago
yes. using prisma.
garyaustin
garyaustin3y ago
Prisma | Supabase
Connect your Supabase postgres database to your Prisma project.
ven
venOP3y ago
is there a workaround? thank you. will i have to run this every time i do a mirgation?
garyaustin
garyaustin3y ago
I don't use Prisma, so not sure.
ven
venOP3y ago
that worked. thank you so much
garyaustin
garyaustin3y ago
Normally I think you access the database thru Prisma and not thru the API, when using it, but not sure.
ven
venOP3y ago
i was trying to run some seeding scripts but i think prisma has a seeding algo thank you though
NanoBit
NanoBit3y ago
Yea they do, just make a seed.ts and add it to package.json for prisma I never needed to run this, so maybe it’s a one-off for u
ven
venOP3y ago
thank you @NanoBit

Did you find this page helpful?