Prisma Truncate!

Hi everybody ! I need help with Prisma and Neon, so I used Prisma to create the tables and everything but now when I got in the console on the neon website and try to truncate a table it says permission denied ! what should I do ?

thank you for reading <3

Hi! We (yet) don’t give permission to truncate tables from the console. You can run the same query using executeRawUnsafe()

Let me know if this solves the issue :slight_smile:

1 Like

The SQL interface of our website currently uses a special PostgreSQL role to connect to your database and doesn’t have the same permissions as the credentials you are given in the UI.

You can always drop truncate and drop tables if you’re the owner of those tables, and because the tables were likely created with the psql connection user, you’ll have to use that user to truncate the tables.

We’re planning on improving the experience, but for now, this is the workaround.

See also my response here: Truncate a table? - #2 by Matthias