https://www.prisma.io/ logo
Join SlackCommunities
Powered by
# orm-help
  • m

    Martin Šošić

    04/11/2022, 11:57 AM
    Hey, I keep getting this error message for any
    <http://prisma.io|prisma.io>
    webpage that I try to open -> just wanted to check, are you aware of this (or is this maybe happening just on my side?)
    v
    n
    m
    • 4
    • 4
  • m

    Muhammad Ahmad

    04/11/2022, 1:07 PM
    Copy code
    model Profile {
      id String @id @default(cuid())
      name String
      address String
      image blob
      created_at DateTime @default(now())
      updated_at DateTime @updatedAt
    }
    
    model Token {
      id String @id @default(cuid())
      profile_id Profile[]
      featured_status Boolean
      category String
      file blob
      description String
      info String
      type String
      last_selling_price Float
      ownership_chain String
      created_at DateTime @default(now())
      updated_at DateTime @updatedAt
    }
    Hello I am trying to add one to many relation (one profile can have many tokens) but I think this isn't correct. Also code editor giving me red lines on blob type and bytea for storing images.
    n
    d
    • 3
    • 3
  • j

    Jeremiah

    04/11/2022, 7:11 PM
    Hello, I have a question I think about databases in general that I don't understand and I would appreciate if someone could point me somewhere to learn how this aspect of Prisma works. I introspected a Prisma model from a database I already have set up and there are a lot of paired types (which you can also see in the example docs, such as
    XOR<UserCreateInput,
    UserUncheckedCreateInput>
    I'm wondering what the Unchecked means, what the difference between these two types is, and how Prisma decides which one to use when executing a Create mutation.
    n
    • 2
    • 4
  • a

    Alex Cavazos

    04/11/2022, 8:59 PM
    Does someone have an example
    Dockerfile
    for a
    Next.js 12
    application that gets built with Docker and uses Prisma? I am not sure at what point to run
    npx prisma generate
    . I tried right before the
    npm run build
    step but I get
    Error: Unknown binaryTarget linux-arm64-openssl-undefined and no custom binaries were provided
    n
    • 2
    • 1
  • g

    Gurudev sharma

    04/11/2022, 9:01 PM
    hi team i have one issue
  • g

    Gurudev sharma

    04/11/2022, 9:01 PM
    my twistlock defender self hosted version cant able to scan it
    n
    • 2
    • 1
  • g

    Gurudev sharma

    04/11/2022, 9:01 PM
    the images
  • g

    Gurudev sharma

    04/11/2022, 9:01 PM
    can some one help
  • l

    Luís Felipe

    04/11/2022, 11:57 PM
    Hi guys! The prisma cloud doesn't support mongodb?
    n
    • 2
    • 6
  • r

    Richard Ku

    04/12/2022, 12:52 AM
    Hi, I have 2 questions here, 1. I found https://npm.io/package/prisma-json-schema-generator to convert the prisma schema to json, do we have any tool to convert JSON with the same spec back to Prisma schema? 2. is there a way (maybe an annotation in prisma schema) to disable mutation in when using the prima client for a given model? Thanks.
    n
    • 2
    • 2
  • t

    Timotius Anrez

    04/12/2022, 8:06 AM
    👋 Hello, team!
    👋 2
  • d

    Dog

    04/12/2022, 8:39 AM
    Hi guys 👋 I'm new to prisma, so sorry for such a basic question haha. I come from using django, where everything is handled for you, and so I'm not completely sure of what the best way of implementing user auth could be. Do you guys know of any resources that could help me? I know I have to create the user model, make sure passwords are hashed, implement sessions (or something like that) and etc BUT, as I said, I'm not sure because I am used to having something like django to handle all that for you.
    n
    m
    • 3
    • 11
  • h

    Hwanseok Yu

    04/12/2022, 9:28 AM
    Hi! I found an issue https://github.com/prisma/prisma/pull/12427, and it seems very simillar to my case. I'm using
    yarn workspace
    and import
    Prisma Client
    from
    api
    package to
    front-end
    package because of
    next-auth
    . But, when I run it,
    Prisma Client
    try to get schema from
    front-end
    package. If I understand this issue correctly, I should use
    @dev
    version, right?
    n
    • 2
    • 1
  • m

    Marius

    04/12/2022, 11:21 AM
    Hey, Im looking into using nest with apollo and prisma to create a GraphQL. I am using the generated prisma types to expose args for the user. I have a relationship similar to User -> [Client] (1:n). The generated types (user-create.input) exposes create, connect and createOrConnect input fields. Whats the best way for limiting the input type to only showing create, and not connect or createOrConnect? Do I just manually make a new type, or is there some good way of getting the type generated or keeping it in line with my prisma schema
    n
    • 2
    • 2
  • s

    Soumyajit

    04/12/2022, 12:42 PM
    Hey, facing a very weird issue where prisma migrate is throwing
    Error: P1000
    while the
    @prisma/client
    is able to connect with the same .env values. Anyone else faced this issue? Any pointers as to what can fix it?
    a
    • 2
    • 2
  • o

    Omar

    04/12/2022, 1:22 PM
    Just been wondering if there will ever be a "Prisma Database". I mean you guys have already worked with a lot of them so far, so maybe you know how to build a developer first and a developer friendly database. What do you think guys?
    n
    • 2
    • 1
  • j

    John Smeeth

    04/12/2022, 1:52 PM
    hi all,
  • j

    John Smeeth

    04/12/2022, 1:54 PM
    I see this input from prisma.d.ts. How can i use it? I've tried as below
    import { Prisma } from '@prisma/client'
    but I got this error What wrong with me?
    i
    d
    a
    • 4
    • 8
  • j

    John Smeeth

    04/12/2022, 1:55 PM
  • d

    Dog

    04/12/2022, 3:04 PM
    Hi, if anyone can maybe help in this threat I would really appreciate it! https://prisma.slack.com/archives/CA491RJH0/p1649752783137409
    r
    n
    • 3
    • 9
  • j

    Jonas

    04/12/2022, 6:13 PM
    Hey! How would I filter for all records that were created at some time yesterday?
    m
    n
    • 3
    • 2
  • j

    Jacob Coker-Dukowitz

    04/12/2022, 8:27 PM
    When I have the prisma client in a custom location
    db/generated/client
    , prisma works fine. However, when I try to keep the client in its default location in
    node_modules
    , I get this error:
    Copy code
    (node:56637) UnhandledPromiseRejectionWarning: Error: Unable to load Node-API Library from node_modules/.prisma/client/libquery_engine-darwin.dylib.node, Library may be corrupt
    Any thoughts? The only related thing I can find online (unsupported node version), and in this slack thread (prisma not supported in M1) seem unrelated, as I'm using Node v 12.16.0 on a MacBook Pro, with Prisma v3.9.1 (and the client works fine when in a different location). Anyone able to help me understand whats happening?
    a
    • 2
    • 3
  • t

    TK Aloufi

    04/12/2022, 9:11 PM
    Hello everyone, I'm wondering what is the difference between
    Copy code
    npx prisma migrate dev
    and
    Copy code
    npx prisma migrate
    a
    • 2
    • 1
  • h

    Hwanseok Yu

    04/13/2022, 3:40 AM
    I'm using
    prisma@3.12.0
    , but still have trouble with prisma client in yarn workspace.
    Copy code
    // .../my-app/packages/web/pages/api/auth/[...nextauth].ts
    
    ...
    import { PrismaClient } from "@my-app/prisma";
    
    const prisma = new PrismaClient();
    
    ...
    when I run it, it throw error
    Copy code
    Error: ENOENT: no such file or directory, open '.../my-app/packages/web/.next/server/pages/api/auth/schema.prisma'
    How can I fix it?
    n
    • 2
    • 8
  • e

    Ethan Phan

    04/13/2022, 4:07 AM
    I’m trying to add pg_trgm and relevant index for fuzzysearch in postgresql. Following the advice from full-text-search documentation page, I added the index manually from an empty migration file like this. According to the documentation it’s supposed to ignore the unknown indexes, but it doesn’t. It forces create a migration that drop the index for me. Anyone knows a way around this?
    n
    r
    • 3
    • 5
  • j

    John Smeeth

    04/13/2022, 4:43 AM
    hi all, I'm using prisma and agenda to run jobs, in each job I create new instance of prisma by
    const prisma = new PrismaClient()
    and connect to portgres on GCP, but I got error in connection in job as below
    Copy code
    Error in connector: Error querying the database: db error: FATAL: remaining connection slots are reserved for non-replication superuser connections
    How can I manage connection to database efficient to avoid get many connection? thank you
    n
    • 2
    • 1
  • c

    Chip Clark

    04/13/2022, 5:13 AM
    Problem with Prisma 3.12.0 running nestjs/cli@8.2.0 with node-windows@1.0.0-beta.7 and nodejs v14.17.6 Start service with node-windows works fine with Prisma 3.11.1 - but as soon as I upgraded to Prisma 3.12.0 - node-windows would run, but the service wouldn't start. Error 1067. Reinstalled Prisma 3.11.1 and node-windows service starts as expected.
    n
    • 2
    • 4
  • j

    Julien Demarque

    04/13/2022, 8:26 AM
    Hello! I am trying to get a select and I can't find a way to what I need, if anyone has an idea: Basically in my model, baseRuns have stepRuns and stepRuns have a stepId and createdAt property. I want to select baseRuns with their stepRuns, but only the last created stepRun per stepId. Is there any way to do that?
    n
    • 2
    • 3
  • m

    Mathie

    04/13/2022, 9:31 AM
    Hello ! How to add a middleware (Hook) with Prisma & NestJS ? (to hash the password before save the document)
    n
    • 2
    • 2
  • m

    Mathie

    04/13/2022, 12:05 PM
    Hi again .. I have this error in my docker container when I run " npx prisma generate " : Error: EACCES: permission denied, open '/app/node_modules/.prisma/client/index.d.ts
    n
    • 2
    • 1
1...562563564...637Latest