Prisma

P

Prisma

The official Discord server of Prisma! Find us online at prisma.io

Join

Null constraint violation on the fields: (`ownerId`)

With the following schema when I try and create a new Project I get then Null constraint violation for field ownerId which doesn't exist anymore ```js model Project { id String @id @unique @default(cuid(2)) name String...

unique constraint failed on where column? how is possible?

In production, once in a while our customer gets an error on the backend """Invalid prisma.trainerProposalXrefDbo.update() invocation: Unique constraint failed on the fields: (id)""" on the following code """ `const promise1 = txClient.trainerProposalXrefDbo.update({...

NestJS + prisma optimize

I'm trying to add prisma optimize to project with nest.js framework. As I can see in logs - it initializes, but there is no data recorded ``` import { FactoryProvider,...

n:m relations between tables and view

I have a view "DepartmentInfo" as well as model "User". The user can be part of many departments and a department can have many users -- we are talking about n:m relation. ...

Type of extended Prisma client is too long (TS7056)

Hello, I am currently trying to install the following extension in my Prisma environment. https://github.com/yxx4c/prisma-extension-redis ``` // It is not possible for Typescript to create the type for extendedClient...

AppleMac

I am new to Prisma. Can it be used on an AppleMac?

Migrate prisma lost data

Hello there, I have an issue while I try to migrate something. While preforming that command : npx prisma migrate dev --create-only --name rename-column a SQL file is created so I modify it by : ALTER TABLE "Token" RENAME COLUMN "token" TO "tokens"; and I still lost my data inside that column. Is this even possible to rename a column without lost all datas ??...

No matter what command I run, I keep getting the error “maximum call stack size exceeded.”

Hello, I’m encountering an issue where running commands like npx prisma generate and npx prisma migrate reset --force results in the error “maximum call stack size exceeded.” I came across guidance on X (Twitter) and decided to join Discord for further assistance. Originally, I was working on a Mac Studio, but after moving my development environment to a MacBook, this error has been consistently occurring. Docker is running properly....
No description

Unexpected error login into prisma console

Hello guys, I am no longer able to login to the prisma console platform. I keep getting this error, "unexpected server error" as seen in the attached image. Please, how do I fix this?
No description

Prisma Migrate dev --create-only resets my DB!

```jack@dance-party Wanyama % npx prisma migrate dev --name "add_other_to_win_state" --create-only Environment variables loaded from .env Prisma schema loaded from prisma/schema.prisma Datasource "db": MySQL database "wanyama" at "eu01.jpy.gg:3307"...

Easy prisma question, users or chatroomusers in functions

I'm making a chat and i want to be sure what to use in my situation in functions like prisma.chatroom. create ({data:{name,users or prisma.chatroom. create ...
No description

Purge Global Cache via API

I was wondering if there was any way to programmatically purge the global Accelerate cache via the API. I understand that there's still a limit of 10x an hour but it would be nice to have an automation setup in our data pipeline to purge the cache whenever we update our daily datasets

Cannot import type in svelte component

Hi, I'm trying to use prisma-generated types in a Svelte (client side) component. ```jsx <script lang="ts"> import { TagType } from '@prisma/client'; import { cn } from '$lib/utils';...

Cannot Use Locally Host MongoDB in Prisma

I have try to connect the mongodb using prisma. It throw an error. It will show an error of url that i have provide to the DATABASE_URL=mongodb://localhost:2174/testdb

Console down still/again?

I see an incident that occurred this morning and was marked as resolved. Seems the console is down again? We've also noticed many timeouts today happened rather irregularly? Any update if this is happening to others or we will continue to investigate on our end.

Get "normal" database credentials from prisma.io Postgres db.

Hey! I want to connect my primsa postgres db to metabase. For this I need the "normal" postgres credentials, how can I get them?...

Update help

Hey, i want to apply a newer prisma schema to an older database (adding all new tables). The problem is, that it suggests me clearing the database but this isn't an option. It tells me something like "migration drift"

Why `prisma generate --sql` needs to have `DATABASE_URL`?

I'm getting this error when executing prisma generate --sql but not if executing prisma generate: ``` 4.679 api:build: > prisma generate --sql 4.679 api:build: ...

How to create a new database w/ schema from Node - not CLI?

Hey all, trying to figure a problem out. I'm building a desktop app (Electron, Node, React, Prisma, etc) that will run from user's computer. In my use case users can create multiple instances of the app - think a different savegame in a video game. For this, I would really like to have different databases for each instance - db1.db, db2.db, db3.db, etc. I know how to solve this with storing all the data in one Sqlite db and indexing etc, but would prefer totally different DBs I know how to do all of this from CLI with db push, migrate, and other commands. But can't figure out how to do it from Node itself What I would like to do is if a user creates a new instance, I build a filename and path, then create the new datbase file w/ schema at that location. And a PrismaClient instance is created for it. ...