prisma Questions

6

We seem to have gotten our prisma migrations into a bad state. When we get the latest code and run prisma migrate dev we get Migration 20210819161149_some_migration failed to apply cleanly to the...
Footstalk asked 19/8, 2021 at 19:28

5

Solved

So I am using Prisma for the first time and my provider is mongodb and when I want to create a model it throws me an error Invalid `prisma.user.create()` invocation: Prisma needs to perform tran...
Magnesia asked 18/5, 2022 at 3:2

5

I have a Next.js project where I'm using Prisma to read from Postgresql. I have code like: const rows = await prisma.receipts.findMany({ where: { action_receipts: { // https://www.prisma.io/docs...
Dordrecht asked 7/2, 2022 at 22:31

6

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...
Omegaomelet asked 21/1, 2023 at 18:59

6

Solved

Hi I have three models model User { user_id Int @id @default(autoincrement()) email String @unique name String? User_Account User_Account[] } model Account { account_id Int @id @default (auto...
Relapse asked 8/11, 2021 at 16:35

6

Solved

I tried to deploy my nextjs application to vercel. This project is built using Prisma and Nextauth. The deployement went well, however when I go the url of my project it shows this error: Applicati...
Litchfield asked 14/7, 2023 at 9:21

5

Solved

I'm being told I have an invalid connection string for my MongoDB data provider. Specifically, I'm getting this: The provided database string is invalid. MongoDB connection string error: Missing de...
Shoveler asked 10/10, 2022 at 11:7

6

Solved

I'm learning Prisma ORM from video tutorials and official docs. They are explain and write All model code in one file called schema.prisma. It's ok but, when application grow it became messy. So, h...
Sanctified asked 17/2, 2022 at 18:34

5

I am trying to create an API using Next.js & Prisma. I have two model user & profile. I want to create user & also profile field from req.body using postman. datasource db { provider =...
Esther asked 4/7, 2021 at 16:24

3

I started writting tests revolving around prisma(v3.6.0) usage in my application. To do so I followed the official prisma page Unit testing with prisma and I am using jest-mock-extended. My issue i...
Tool asked 21/12, 2021 at 10:6

9

Solved

When i generate my prisma client with prisma generate, i got an index.d.ts with all types from my database. But the probleme is that all type are "single" and there is no relations. When ...
Lantha asked 13/7, 2021 at 16:21

5

Solved

How can make a change to the database with Prisma.js without having to reset the whole thing? if I have used this command npx prisma migrate dev --name role-makeOptional-NormalizedName I will lose...
Digestant asked 23/6, 2021 at 18:0

4

Solved

consider following Prisma schema: model Conversation { id Int @id @default(autoincrement()) createdAt DateTime @db.Timestamp(6) messages ConversationMessage[] } model ConversationMessage { id ...
Timms asked 11/6, 2021 at 3:41

6

I can't seem to find what the error in the invocation is function findUser(req, res) { const username = req.body.username; prisma.user.findUnique({ where: { username: username }, select: { us...
Unilingual asked 6/5, 2021 at 1:37

5

I'm confused about how Prisma code generation in production works. The Prisma CLI is supposed to be installed in devDependencies, yet the npx prisma generate command needs to be available in produc...
Gelsemium asked 19/9, 2020 at 19:20

4

Solved

I'm developing some simple Todo App BE using NestJS with Prisma ORM and use MongoDB as the DB. I'm using a FREE and SHARED MongoDB cluster that is hosted in MongoDB Altas cloud. Also I added 0.0.0....
Carver asked 13/8, 2022 at 11:58

4

Hi am having this problem, i try to make subscriptions with graphql in nextjs, but something is wrong and i dont have any idea how fix it. I am having websocket error - "WebSocket connection t...
Bundestag asked 25/4, 2022 at 11:56

1

Solved

I am using next-auth with a custom provider and the Prisma adapter and I only want to store the values: id, name, country, avatar, and gender. However, I am getting this error: [next-auth][error][a...
Cobb asked 28/5, 2022 at 0:4

3

Solved

Hi I have following issue. I have prisma transaction but I would like to pass the prisma transaction client into a function like this: ... prisma.$transaction(async (tx) => { someFunction(t...
Rb asked 1/10, 2023 at 9:23

14

Solved

I am getting this error message from prisma when I am running the GraphQL query. Environment variable not found: DATABASE_URL.\n --> schema.prisma:6\n | \n 5 | provider = \"postgresql\&quot...
Knelt asked 1/6, 2021 at 21:29

11

I'm using next-auth with Prisma and Graphql, I followed these instructions to set up the adapter and my models accordingly: https://next-auth.js.org/adapters/prisma Authentication works but when I ...
Weinhardt asked 19/12, 2021 at 5:43

5

I'm trying to deploy to Vercel but my deployment crashed due to the following problem: PrismaClientInitializationError: Prisma has detected that this project was built on Vercel, which caches depen...
Lois asked 27/6, 2023 at 21:28

1

I am trying to access my User objection.js model from getStaticProps and getStaticPaths. However, I need to run import Knex from "knex"; import knexfile from "./knexfile"; impor...
Frasco asked 15/8, 2021 at 16:49

2

Solved

I'm planning to create a seeder for my projects table. I'm using createMany to insert multiple data in just a query (see code below). But the problem is, it does not recognize createMany and throws...
Electrophorus asked 30/5, 2022 at 11:9

13

Solved

I am using prisma, postgres, docker, kubernets. npx prisma migrate dev working. and npx prisma generate produce below output: ✔ Generated Prisma Client (2.23.0) to ./node_modules/@prisma/client in ...
Deerstalker asked 29/5, 2021 at 1:3

© 2022 - 2024 — McMap. All rights reserved.